Point every project URL at Forgejo, and say what mirrors where #1062
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1062
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/forgejo-canonical"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The project moved to Forgejo and the links did not follow: the README said to clone from
GitHub, the hardware-request button opened a GitHub issue form, SECURITY.md sent vulnerability
reports to a GitHub advisory page, package.json advertised a GitHub repository, and the generated
wiki linked to GitHub throughout. A stale URL fails no test, so all of it sat there looking fine
while sending contributors to a mirror.
What changed
scripts/canonical.js- the single definition of where the project lives, with the URL formsand the reasoned exceptions in one place. Change it there and the checker reports every file that
has to follow.
scripts/check-canonical-urls.js- fails the build on drift, and runs in CI. It found threestale links plus two scripts still calling
ghon its first run, all missed by a manual sweep.scripts/forgejo-api.js- replaces theghCLI in both triage scripts.ghis installed andauthenticated on this workstation, so it would have answered about the GitHub mirror and reported
a backlog nobody is working on. A missing token is now "cannot look" and exits 2, never 0.
/blob/->/src/branch/), wiki, badges,package.json repository/bugs/homepage, and the issue-template contact links.
docs/MIRRORING.md- what stays in sync and what cannot.The sync question, answered
refs/pull/<n>/headinto Forgejo PRs, keyed on head SHAThe rule: one writer, one reader. Forgejo writes, GitHub reads. Two-way mirroring races on every
force-push and neither platform can then be trusted about what the code is.
Two defects the guard found in itself
github.com, so a file whose only sin was agh auth statusinstruction was skipped before the rule saw it.
And one in a script I wrote
scripts/cf-access-bypass.jscalledprocess.exit()while undici still held a socket open, whichtrips a libuv assertion on Windows and reported exit 0 for a refused run - the same
silently-wrong-exit-code class it exists to prevent. Now it sets
process.exitCodeand lets Nodedrain.
Test
test/canonical-urls.test.js- 34 assertions, including planting real drift in the working tree andasserting the guard catches it, because this repo has already been bitten by an invariant that could
never fail.
102 suites, 4954 assertions, all passing.
Still blocked, and it is why this matters
git.jayw.uksits behind Cloudflare Access, and a wildcard Access application covers*.jayw.uk- even a nonsense hostname is redirected to the login page, which is whyha.andplex.only work because they carry specific bypasses. So renewing the URLs does not yet help astranger: they still reach a login page, and GitHub remains the de-facto front door. One Access
policy (bypass for
jaylouisw/packetforge*) fixes it, andscripts/cf-access-bypass.jsis ready todo it the moment a token with
Access: Apps and Policies: Editexists.Closes #1061.