Repository navigation
Description
Two cheap experiments decide the shape of the release gate. Both are blockers in the sense that building for the wrong answer wastes the build — #136's 0a should not start until they are settled.
1. Does a local uses: ./path composite action work inside a container: job?
This determines whether one repo can hold both the sandbox and the gate role, which is the question #136 turns on.
If a workflow can actions/checkout this repo at an arbitrary ref into a path and then call uses: ./path/build-lectures, a single gate.yml in the existing canary — carrying a workflow_dispatch input for the candidate ref and a digest-pinned container — holds every property #136 asks for, with no second repo and no v0-next tag. GitHub forbids expressions in uses:, but a checked-out path is not a ref, so the constraint does not apply.
The reason this is not obvious is #83. ${{ github.action_path }} expands to the runner's path, while inside a container: job the action is mounted at /__w/_actions/... — so bash received a nonexistent path and exited 127 before the script ran. That is documented at build-jupyter-cache/action.yml:361-365, and it is the same host-vs-container path-mapping class that local uses: would exercise.
- In a throwaway branch of
QuantEcon/test-actions-lecture-intro, add a workflow with acontainer:block that checks this repo out into./actions-repoand callsuses: ./actions-repo/build-lectureson the trimmed toc - Record whether the composite resolves, and whether anything inside it that reaches for
github.action_pathstill breaks
Works → harden the canary with a gate.yml; #136 can close as superseded and 0b loses the v0-next tag entirely. Fails → a second ref namespace is genuinely required, #136 stands, and the v0-next design in #135 is the right one.
2. Would a dispatch-driven gate be vacuously green on the preview path?
Both preview actions gate three steps on github.event_name == 'pull_request':
preview-netlify/action.yml:48,:63,:101preview-cloudflare/action.yml:60,:75,:148
So a gate run triggered by workflow_dispatch or repository_dispatch skips the build, the deploy and the comment, and reports green having deployed nothing. This is inherited unchanged by a new fixture repo, so it is not an argument for either option — it is a prerequisite for both, and precisely the "test that cannot fail" pattern of #108.
- Confirm the skip behaviour on a dispatch run
- Decide the fix: widen the condition to accept the gate's trigger, or give the gate an explicit input that satisfies it — without weakening the fork trust-check the same condition provides (see fix(preview): surface deploy errors, pin CLIs, remove unsafe fork guidance #105)
Related: the canary's publish.yml has no workflow_dispatch at all (on: push: tags: 'publish*'), so the publish path cannot currently be driven by a gate either. It has run 9 times ever, last on 2026-02-10 — publish-gh-pages has had zero end-to-end exercise across v0.7.0 → v0.11.1, which is the strongest standing argument for doing this work.
Why this is separate
#135 and #136 both assume a design. These two checks test the assumptions underneath both, cost well under a day, and one of the outcomes removes a repo and a tag from the plan. Blocks #138 item 0a.
Activity
quantecon-services commentedon Sep 28, 2026
Spike result, 2026-09-28
Q1: works. A container job in the canary checked out this repo at a SHA into
./actions-repo, then calleduses: ./actions-repo/<action>. The canary's whole CI chain ran that way:restore-jupyter-cachebuild-lectures, once per builderpreview-netlifyandpreview-cloudflarebuild-jupyter-cacheran that way too. Nothing was downloaded fromquantecon/actions.Q2: confirmed. On
pushandworkflow_dispatch, both preview actions go green having deployed nothing, and nothing in the log says so.All three runs used canary branch
spike/143-local-usesat8634225, candidatec0ac111(main), imagequantecon-build@sha256:f41071c3…, and runner 2.337.0:What the raw logs show
Local actions resolve in a container.
Run ./actions-repo/restore-jupyter-cache,Run ./actions-repo/build-lectures(once per builder),Run ./actions-repo/preview-netlifyandRun ./actions-repo/preview-cloudflare.Download action repository 'quantecon/actions…'line.quantecon/actions/…@c0ac111, downloaded exactly that ref.github.action_pathin a container. The spike ran a probe action at./actions-repo/….${{ github.action_path }}written into a script is the host path/home/runner/work/…/./actions-repo/…. A sibling script reached through it fails with rc 127, so the build-jupyter-cache: container-mode failures are silent, undebuggable, and use unpinned sub-actions #83 shape still holds.env:, or read as$GITHUB_ACTION_PATH, arrives as/__w/…and works.action.ymlhere uses the inline form, so nothing breaks.The preview path through a local path, on the PR.
detect-changes, which runs$GITHUB_ACTION_PATH/../scripts/detect-changed-lectures.sh, succeeded and reportedlectures/spike_143_marker.md.pr-69--jade-tarsier-d98a19.netlify.appandpr-69.qe-preview-canary.pages.dev. Each served a marker file unique to the run.The
build-jupyter-cacheresidual.quantecon/actions@v0(a53dbe4, v0.12.0).uses:lines to./actions-repo/<sibling>. After that nothing was downloaded, and the build passed with 6 notebooks executed. A nested./resolves against the workspace (Local composite actions always relative to top level repository actions/runner#1348).Q2.
check-trustandinstall-clisucceeded.detect-changes,deployand the comment step wereskipped,deploy-urlwas empty, and nothing appeared in the log.Deploying preview for PR #..., aliaspr-). So removing the clause is not a fix.What the spike does not show
c0ac111, which is main and the same as the control. Nothing was staged to fail, so 0d is untested.build-jupyter-cachejobs built cold. A gate that restores the canary's cache will not exercise execution or network reads.build-jupyter-cacheran withbuilders: html. So only 2 of its 4 nested calls ran. The rewired run also tests a patchedaction.yml, not the shipped bytes.publish-gh-pages,deploy-cloudflare,setup-environmentbeyond its container skip path, and every failure path.c0ac111matchedmainand aclaude/*branch. A gate that deploys with secrets should accept only main andv*tags._actionsdownload and the tag move. For local actions,GITHUB_ACTION_REPOSITORYandGITHUB_ACTION_REFare also empty; nothing reads them today.What this means for #138
Release gating: a gate.yml in the canary tests the candidate before v0 moves #135. The
v0-nexttag is not needed. The gate can be agate.ymlwhoseworkflow_dispatchinput is the candidate SHA, run on main beforev0moves. With the four-line rewrite it also reachesbuild-jupyter-cache's sibling chain, whichv0-nextcould not.Release gate fixture: content and hygiene for the canary's gate.yml #136. Its mechanism argument is gone, but not the whole issue.
@v0pin are set per workflow, not per repo: the spike pinned a digest from a job output.build-jupyter-cachebuilders, network-free builds (intersphinx), a committed image digest, and a cache scope separate from the canary's CI.The Q2 fix is a prerequisite for a dispatch-driven gate's preview leg, and for 0c. The design I'd recommend:
dispatch-alias, restricted to a reserveddispatch-prefix so it can never hitpr-Nor Cloudflare production;workflow_dispatch, plusschedulefor 0c. It must never become a deny-list: thepull_requestliteral is what keepspull_request_targetout (fix(preview): surface deploy errors, pin CLIs, remove unsafe fork guidance #105);deployedoutput, and a::notice::on every run that does not deploy;deployed == 'true'.The PR-only half (the
pr-Nalias, change detection, the comment) still needs a PR leg. That can be manual at first; draft ci: bump docker/login-action from 3 to 4 #69 shows it works.0c. Scheduling the canary's
ci.ymlas it stands would give a green run that tested nothing (Q2).publish.ymlneedsworkflow_dispatchand its job-levelif:removed. Otherwise a dispatched run skips its only job, tests nothing and never goes red.Docs this contradicts
docs/dev/PLAN.md0b: "no parameterised-ref design is possible". A checkout plus a local path is one.docs/dev/PLAN.md0a: "both are repo-level". The image and the@v0pin are per workflow; only Dependabot and the lecture content are repo-level.docs/dev/PLAN.mdline 42: "A manual dispatch can exercise preview on demand". It skips the deploy.preview-netlify/README.md:180andpreview-cloudflare/README.md:189: "A notification is logged when deployment is skipped". Not on non-PR events.@v0and:latestas reasons, but both are per workflow._config.yml:77).Decisions left open
gate.ymlin the canary, or a new fixture repo. The canary is cheapest: its secrets, Netlify site and Cloudflare project already exist.v*tags only, and whether the gate's secrets sit in an environment that only main can use.:latestresolved once per run; cold or warm builds; and whether intersphinx is off for gate builds.publish-gh-pages: whether the gate includes it. It would overwrite the canary's Pages site, and thegithub-pagesenvironment's branch policy is unverified.Clean-up. Draft QuantEcon/test-actions-lecture-intro#69 is closed and
spike/143-local-usesis deleted. The spike workflow is still readable from #69's commits. The runs and logs remain, and so do the evidence artifacts (90-day retention). Thepr-69preview deployments remain, as after earlier staging PRs.Generated by Claude Code
docs: correct the statements the #143 spike disproved (#211)
qe: correct the handover against the tracker as of 2026-11-04
mmcky commentedon Nov 4, 2026
Decisions recorded, 2026-11-04 (maintainer decision session):
gate.ymlin the canary (QuantEcon/test-actions-lecture-intro), not a new repo. The gate's fixture lives in its own folder, which Dependabot does not scan, and the image is pinned in the workflow. Release gate fixture: content and hygiene for the canary's gate.yml #136 is re-scoped to the fixture's content and hygiene, and Release gating: a gate.yml in the canary tests the candidate before v0 moves #135 drops thev0-nexttag.dispatch-alias prefix, an event allow-list, adeployedoutput and a notice whenever nothing deploys. Filed as preview-netlify, preview-cloudflare: deploy outsidepull_requeston request, and report whether anything was deployed #227, which also takes in preview-netlify, preview-cloudflare: install the deploy CLI only on pull_request runs #193. Not a gate that opens PRs.mainor av*tag of this repo, checked before any secret is read. The gate's deploy secrets live in a canary environment that only the canary'smainbranch can use.publish-gh-pages: included. The gate redeploys the canary's own Pages site from the canary'smain. Release-asset packaging is covered by fixture tests in this repo's harness (testing: publish/preview/cache action logic has no automated tests #100, Stage 1.5) rather than by tag-triggered gate runs.Closing, since the spike's questions are answered and the decisions recorded. The work continues in #136 (fixture), #135 (
gate.yml), #227 (preview opt-in) and the #138 tracker.Posted by Claude Code (on behalf of mmcky), from the 2026-11-04 decision session.
docs(plan): catch up with the v0.12.0 follow-ups and the 2026-11-04 d…
feat(preview-*): deploy outside pull_request on request, and report w…
feat(preview-*): deploy outside pull_request on request, and report w…
feat(preview-*): deploy outside pull_request on request, and report w…
feat(preview-*): deploy outside pull_request on request, and report w…
feat(preview-*): deploy outside pull_request on request, and report w…