Repository navigation
fix(ci): chain-release uses PAT so scrape-pack completion fires chain-image - #217
Merged
laradji merged 1 commit intoMay 7, 2026
Conversation
…dispatch The default GITHUB_TOKEN is allowed to call workflow_dispatch, but the resulting run's completion does not spawn workflow_run downstreams (anti-recursion gate). scrape-pack ran fine on the v0.7.2 tag push but chain-image never fired; a manual probe with a real user PAT did fire chain-image. Same failure mode #148 fixed for release.yml -> update-package-channels.yml. - Rewrite header comment to describe the gate accurately. - Add Validate secrets step mirroring release.yml's PAT check. - Switch GH_TOKEN on the dispatch step to CHAIN_DISPATCH_TOKEN. Closes #216.
laradji
deleted the
emdash/feat-anti-recursion-dispatch-scrape-pack-chain-image-workflow-010np
branch
May 7, 2026 17:00
8 tasks
laradji
pushed a commit
that referenced
this pull request
May 7, 2026
The `gh api .../runs/<id> --jq '.inputs.tag'` read in chain-image's Resolve-tag step always returns null — the runs REST endpoint does NOT expose workflow_dispatch inputs. Latent since #209; surfaced once #217 made chain-image actually fire. Embed inputs.tag in scrape-pack.yml's top-level run-name (`scrape-pack (v<x.y.z>)` or `scrape-pack (cache-warm)`), then parse it out of `github.event.workflow_run.display_title` on the chain-image side. Stable-tag filter and cache-warm gate preserved exactly. Closes #218.
3 of 6 tasks
laradji
added a commit
that referenced
this pull request
May 7, 2026
The `gh api .../runs/<id> --jq '.inputs.tag'` read in chain-image's Resolve-tag step always returns null — the runs REST endpoint does NOT expose workflow_dispatch inputs. Latent since #209; surfaced once #217 made chain-image actually fire. Embed inputs.tag in scrape-pack.yml's top-level run-name (`scrape-pack (v<x.y.z>)` or `scrape-pack (cache-warm)`), then parse it out of `github.event.workflow_run.display_title` on the chain-image side. Stable-tag filter and cache-warm gate preserved exactly. Closes #218. Co-authored-by: Nacer Laradji <nacer.laradji@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}withsecrets.CHAIN_DISPATCH_TOKENonchain-release.yml'sDispatch scrape-pack.ymlstep. The default token's anti-recursion gate allows the dispatch itself but suppresses the downstreamworkflow_runtrigger on scrape-pack's completion, sochain-image.ymlnever fires. A user-owned PAT re-enables the chain.workflow_run).Validate secretsfail-fast step mirroringrelease.yml'sRELEASE_PUBLISH_TOKENcheck (matches the fix(ci): use PAT in release.yml so release.published fires downstream #148 precedent).Closes #216. Same anti-recursion class as #148 (which fixed
release.yml -> update-package-channels.yml).Operator action required before this is effective
CHAIN_DISPATCH_TOKEN: fine-grained PAT, scopelaradji/deadzoneonly,Actions: Read and write, no other permissions. Single-purpose secret, easier to audit/rotate than extendingRELEASE_PUBLISH_TOKEN.Diagnostic recap (from #216)
workflow_dispatchgithub-actions[bot]workflow_dispatchlaradjiSame event, same branch, same successful completion — only the actor differs. PAT swap makes
triggering_actora real user.Test plan
python3 -c "import yaml; yaml.safe_load(...)"passes.workflow_run.conclusion == 'success', tag-push event,^v[0-9]+\\.[0-9]+\\.[0-9]+$stable-tag regex) unchanged.release.yml → chain-release → scrape-pack → chain-image → docker-publishruns without manualgh workflow runcalls. PR cannot be marked done until this validates.Out of scope
Per #216: no changes to
scrape-pack.yml,chain-image.yml,docker-publish.yml, orrelease.yml. The break is on the chain-release dispatch hop only.Note on AC: the issue mentions adding a bullet to
CLAUDE.md"Release operator secrets". That file is gitignored in this repo (see.gitignore); the operator can update their private copy outside the PR.