Issue Enrichment: allowed_non_write_users bypass not taking effect for non-write actors
Problem
.github/workflows/issue_enrichment.yml sets allowed_non_write_users: "*" (via #13154, merged 2026-07-15 05:03 UTC) to let claude-code-action's write-permission gate bypass for issues opened by non-write contributors — otherwise the enrichment action rejects nearly every community-filed issue. As of this writing, that bypass has not been observed to take effect for a real non-write actor.
Evidence
- Issue #13155 (opened by
milotype, confirmedread-only collaborator permission) triggered an Issue Enrichment run at2026-07-15T12:24:12Z— 7+ hours after #13154 merged. It failed:Actor does not have write permissions to the repository. - Re-running that same job (
gh run rerun 29415075400) still fails identically. The failure log showsALLOWED_NON_WRITE_USERS:(empty) and"allowed_non_write_users": ""at runtime — the bypass value never reached the action, despite being set to"*"in the workflow file on master. - Tracing the run's
headSha(e3c0b6794d472dac7d0bd21978525db6136f48b4) shows it resolves to a commit from 2026-07-13, two commits behind current master and not an ancestor-inclusive of #13154's fix. The run (created 07-15 12:24 UTC, well after the 05:03 UTC merge) was resolved against a stale snapshot of the workflow file. - The two
successruns seen today were both for issues opened bymekarpeles(staff, pre-existingwriteaccess) — they never exercised the bypass gate at all, so they aren't evidence the fix works.
Hypothesis
This looks like GitHub Actions' known lag in resolving the workflow-file version for events not tied to a git ref (issues, issue_comment, etc.) — the default-branch snapshot used to resolve the workflow can trail real pushes by an unpredictable window, unlike push/pull_request runs which pin to an explicit commit. Re-running an old run reuses its original (stale) resolution rather than picking up the current file.
Next steps
- Confirm with a genuinely new
issues: openedevent (not a rerun) from a non-write, non-staff account once enough time has passed since #13154 merged. - If it still fails on a fresh event, the bug is elsewhere (e.g. a mismatch between the pinned
anthropics/claude-code-action@v1resolution and the input wiring) and needs further isolation. openlibrary-botis not a valid test account for this — it already haswritepermission on the repo (confirmed viagh api repos/internetarchive/openlibrary/collaborators/openlibrary-bot/permission), so it would bypass the gate for an unrelated reason.
Related
- #13160 — Epic: AI Workflows (parent)
- #13154 — the fix this bug reports on
- #13155 — the real-world issue that surfaced this
⚠️ Contributors, this issue will be ready to work on once:
- [ ] Needs: Investigation — the bypass still needs to be confirmed against a genuinely new
issues: openedevent from a non-write actor (see Context below — the evidence cited for the current failure predates the fix and doesn't establish a GitHub Actions bug)
Context
- The
allowed_non_write_users: "*"bypass and its rationale comment live atissue_enrichment.yml#L46-L51, merged via #13154. - Timestamp correction: PR #13154 was created at
2026-07-15T05:03:18Zbut not merged until2026-07-15T17:33:38Z(confirmed viagh api repos/internetarchive/openlibrary/pulls/13154). The issue's evidence section appears to use the creation time as the merge time. - Pulling the actual run history (
gh api repos/internetarchive/openlibrary/actions/workflows/306909784/runs) changes the read on the two data points cited:- Run
29415075400attempt 1 was created at2026-07-15T12:24:12Z— over 5 hours before #13154 actually merged (17:33:38Z). Its failure is expected/correct: the bypass genuinely wasn't on master yet at that point. It isn't evidence of a lag bug. - Attempt 2 (the
gh run rerun) still resolvedhead_sha: e3c0b6794d472dac7d0bd21978525db6136f48b4— identical to attempt 1 — even though the rerun itself was invoked later (mekarpeles's comment on #13155, timed21:55:02Z, lines up with the rerun'srun_started_at: 21:55:36Z, well after the 17:33:38Z merge). A rerun reusing its original run's resolved commit rather than re-resolving against current master fully accounts for the identical failure, without needing a "workflow-file resolution lag" explanation. - No genuinely fresh
issues: openedrun from a non-write actor has occurred since the merge. The three post-merge runs withhead_sha: 8404a0c(20:27:52Z,20:32:25Z,21:49:03Z) were all triggered bymekarpeles(pre-existing write access) — consistent with point 4 in the issue body that these don't exercise the gate. - Tangential: run
28984836071(2026-07-09, pre-fix) showsjimchamp— who is on theissue_enrichment.mdblessed-staff list — also failing the actor-permission check. That list tracks who gets full-vs-templated enrichment treatment; it isn't the same set as GitHub collaborator "write" permission, so it's a separate axis from this bug.
- Run
Issue Assessment
Open questions
- [x] Does the "GitHub Actions workflow-resolution lag" hypothesis explain the observed failures? (Answer: evidence points against it — the original failure predates the merge, and the rerun's identical
head_shais explained by rerun semantics reusing the original run's resolved commit, not by lag in resolving the default-branch workflow file.) - [ ] Has a real
issues: openedevent from a non-write, non-staff account fired since2026-07-15T17:33:38Z(the actual merge time)? Not as of this research — this needs to happen naturally (or be arranged with a genuinely non-write test account) before the bypass can be called confirmed or refuted.
Full triage checklist
- [x] Triage — correct labels applied or removed
- [x] Problem / opportunity — problem is clear, audience identified, actionable
- [x] Scope — issue is well-scoped; does not try to do too many things
- [x] Justification — reasoning and impact stated; sufficient for leads to prioritize
- [x] Success & testing criteria — implicit but clear: a fresh non-write
issues: openedevent must succeed - [x] Proposal & breakdown — concrete "Next steps" plan present and actionable
- [x] If bug: environment & repro steps — run IDs, timestamps, and log excerpts given in lieu of browser/OS (not applicable to a CI bug)
- [x] Risks, concerns, open questions — identified and surfaced
- [x] Richy context — relevant code, commits, PRs, and run history reviewed; no duplicate found
- [x] References — run IDs and permalinks present where needed
[!NOTE] This comment was automatically generated by Richy, Open Library's issue enrichment assistant, on behalf of @mekarpeles. This is NOT a sign-off. This issue needs lead review before work begins.
Supporting data point: the new pr_autoresponder.yml (#13164) ran on its own PR and the log shows the allowed_non_write_users="*" bypass firing correctly (Bypassing write permission check for mekarpeles due to allowed_non_write_users='*') — using the current workflow file, not a stale one. pull_request events are ref-tied to the PR's head commit, unlike issues events, which may be why this one isn't hitting the same resolution-lag bug. Doesn't resolve this issue (that test was staff, still not a real non-write actor) but is consistent with the ref-tied-vs-not theory.
Can be closed, see proof of working w/ non-staff: https://github.com/internetarchive/openlibrary/issues/13170#issuecomment-4988551509