fix(ci): force anon checkout of public molecule-ci to bypass Gitea cross-repo 404 #2
No reviewers
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-ci#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/anon-cross-repo-checkout"
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?
Follow-up to #1 + the molecule-ci public-flip.
After lowercasing the org slug (#1) and flipping molecule-ci public, plugin/template/org-template CI still failed at the SECOND
actions/checkout@v4step (the one that fetches molecule-ci itself for canonical validator scripts).The exact failure shape
From
act_runnerlog onplugin-molecule-careful-bash@663bf72:actions/checkout@v4sendsAuthorization: basic <github.token>— the per-job Gitea-issued token, scoped to the calling plugin/template repo only. On Gitea, an authenticated request that lacks repo-permission 404s instead of falling back to anonymous-public-read (a Gitea-vs-GitHub behaviour difference).Verified: anonymous
git clone https://git.moleculesai.app/molecule-ai/molecule-ci.gitsucceeds. The auth header is what trips the 404.The fix
Pass
token: ''to force anonymous fetch on the cross-repo checkouts. molecule-ci is public; no auth is needed for read.3 sites updated:
validate-plugin.yml(1 site)validate-workspace-template.yml(2 sites — both jobs in the file)validate-org-template.yml(1 site)Each gets a comment block pointing here so the next reader doesn't undo it.
Verification plan (post-merge)
plugin-molecule-careful-bash#2(the validation canary)CI / validate (push)andCI / validate (pull_request)should go GREEN end-to-endWhy this is the smallest correct fix
Alternatives considered:
secrets: inherit. Not worth it for a public repo.git diff-based change detection that the validator scripts may rely on later.token: ''is one line per site, no new state, no new credential, preserves the SSOT.Hostile self-review
Three weakest spots:
token: ''is a quiet contract — if a future Gitea version changes the public-anon behaviour (e.g., requires auth even for public repos), this fix silently becomes wrong. Mitigation: the inline comment block flags WHY the empty token is intentional, and links to the failure shape, so a future reader who sees auth-failure logs can find the diff between this state and the broken state.~/.molecule-ai/handbook.mdas a follow-up.token: ''line silently breaks CI again. The CI green/red is the test, but it's downstream. Acceptable for a 4-line config edit; not worth a guard test.Rollout / rollback
plugin-molecule-careful-bash#2CI → if GREEN, mass-merge the 33 downstream PRs.git revertthis PR. molecule-ci#1 stays in (lowercase fix is independently correct).🤖 Generated with Claude Code
After lowercasing the slug (molecule-ci#1) and flipping molecule-ci public, plugin/template/org-template CI still failed at the SECOND actions/checkout step (the one that fetches molecule-ci itself for canonical validator scripts). Failure mode in act_runner log: Run actions/checkout@v4 repository: molecule-ai/molecule-ci path: .molecule-ci-canonical Syncing repository: molecule-ai/molecule-ci [git config http.https://git.moleculesai.app/.extraheader AUTHORIZATION: basic ***] ::error::The target couldn't be found. ❌ Failure - Main actions/checkout@v4 Root cause: actions/checkout@v4 sends `Authorization: basic <github.token>` — the per-job Gitea-issued token, scoped to the calling plugin/template repo only. On Gitea, an authenticated request that lacks repo-permission 404s instead of falling back to anonymous-public-read (a Gitea-vs-GitHub behaviour difference). Anonymous git clone of molecule-ci succeeds; the auth header is what trips the 404. Fix: pass `token: ''` to force anonymous fetch on the cross-repo checkouts. molecule-ci is public; no auth is needed for read. 3 sites updated: * validate-plugin.yml (1 site) * validate-workspace-template.yml (2 sites — both jobs in the file) * validate-org-template.yml (1 site) Verified by: re-triggering plugin-molecule-careful-bash#2 will be GREEN end-to-end after this lands. The 33 downstream lowercase-slug PRs are NOT mass-merged until that verification. Refs: internal#46 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Narrow fix to verified root cause (Gitea 404-on-authed-public). Merging.