Repository navigation
Read CI's replay-engine matrix from the variant index; drop the results bot's workflows permission - #196
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 19, 2026
The results pull request no longer edits ci.yml. A replay-variants job lists the certified variants of data/uk/replay_variants.json in index order (.github/scripts/uk_replay_engine_matrix.py, the standard library under the runner's python3 -I, from a sparse checkout of that script and the index), and replay-engine's matrix is that list. The lister refuses the whole matrix on a record it cannot use. The builder drops add_matrix_variant, its only yaml import and ci.yml from EDITED; apply needs no package in either job; scope refuses any path under .github/. The App token drops permission-workflows, the build job's CONTROL drops pyyaml, and propose explains a refused rebuild over a main that changed a workflow. Finding 4/6 of both reviews of #193. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refused-rebuild hint now also names a workflow change that main made and then reverted: it checks every commit from the old tip, not just the tips. Variant ids are capped at 120 characters in the lister and the builder alike, so two ids joined by "__" (a release diff's directory) fit one 255-byte path component and the matrix output stays far under GitHub's 1 MB per job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Default path-limited history prunes a merge to a parent its paths match, so a workflow change and its revert made on a side branch and merged after main moved on were invisible to the hint. --full-history shows them; the test's stand-in for GitHub reads full history too. Answers the review of 34fba89. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
w6/engine-matrix-from-index
branch
from
October 19, 2026 15:36
b7b2357 to
9b9ca68
Compare
This was referenced Oct 19, 2026
MaxGhenis
marked this pull request as ready for review
October 21, 2026 18:50
Contributor
Author
|
Merged on the gates: CI green at the reviewed head; MERGEABLE; no changes requested. Independent review: an Opus 5.5 reviewer, standing in for the GPT-6.1 Sol run, which is queued behind the closed Codex lanes. It found all four stack PRs (#199, #196, #201, #202) MERGE-SAFE, and the full suite passed with #206 on top (2313 passed). Review: ~/reviews/budget-coordinator/scorecard-results-stack/review-out-opus.md. The Sol run stays queued as a second opinion. |
This was referenced Oct 22, 2026
This branch was successfully deployed
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.
CI's
replay-enginematrix now comes fromdata/uk/replay_variants.json, not a list hand-kept inci.yml. The results-PR bot therefore never edits a workflow, and its App token losespermission-workflows: write. This was finding 4/6 in both independent reviews of #193 (review_193.mdandreview_193_delta.md), left as a separate change because it alters step 3 of the original brief. It builds on #194 (merged as9321a7b5) and was rebased onto main after #194 and #197 merged; the three commits' stable patch-ids are unchanged from the ones reviewed (a902c91c…,2a3a711a…,728cef58…).Changes
.github/workflows/ci.yml, new.github/scripts/uk_replay_engine_matrix.py).certified replay variants(replay-variants), hascontents: readand no persisted credential. Its checkout is sparse, holding only the script and the index; actions/checkout v4 fetches those with--filter=blob:none.python3 -Iand the standard library, and emits the certified ids in index order as one JSON line.replay-enginenowneedsit, withmatrix.variant: ${{ fromJSON(needs.replay-variants.outputs.variants) }}.replay-engine: the job namereplay engine · <variant>,fail-fast: false,contents: read, and every step and condition. The dataset token is still only in the push-only fetch step, andtests/test_uk_replay_queue.py's token pins pass unchanged..,_and-, starting with a letter or digit, no.., at most 120 characters. CI puts ids in job names, environment variables, shell commands and paths. The character rule is the one the builder already applied to a new variant. The length cap, now in both, keeps two ids joined by__(a release diff's directory) within one 255-byte path component, and keeps the job output near 63 KB at most, under GitHub's 1 MB per job.certified,candidateandretired;ci.yml(pipeline/uk_replay_results_pr.py).add_matrix_variant, theMATRIXregex,CIand its entry inEDITED, and the onlyyamlimport.applynow needs only the standard library in both jobs, so--stdlibremains only oncheck.scopenow refuses any path under.github/explicitly, before its other checks. This is defence in depth:checkalready pins every result tree underresults/anddocs/.plain_variant_id, which the lister must agree with (a differential test checks this)..github/workflows/uk-replay-results.yml).permission-workflows: writeis removed and the header comment rewritten..github/scripts/uk_replay_results_pr.sh).yaml, soCONTROLisuv run --with rfc8785==0.1.4 --with jsonschema python.propose)..github/workflowsdirectory, request the "Workflows" repository permission", docs). It does not say which commits a push is judged by..github/workflowssince the old tip (at the tips, or in any commit between, even one later reverted or merged in from a side branch: the check readsgit log --full-history, since default path-limited history can prune such a merge), the run now fails with an error that says so and gives the fix: close the pull request, delete the branch and run again. A new branch holds only the bot's commit. The branch and its pull request are left as they were.GITHUB_TOKENprobe on a private scratch repository. Actions could not start there: private-repo minutes on the account are blocked by billing.docs/uk_replay/RELEASE_REPLAY.md): updated "Replay in CI", theproposerow of the job table, the App-token paragraph, step 3 and step 5 of "The results pull request", the rerun paragraph, and a new Engine matrix invariant.What dropping
workflowsbuys, and what it does notWithout
workflows, a leaked token can no longer push a workflow that reads a secret. It can still push to any branch, main included. Main has no classic protection (gh api repos/PolicyEngine/policyengine-scorecard/branches/main/protectionreturns 404 "Branch not protected") and no ruleset (rules/branches/mainandrulesets?includes_parents=trueboth return[]). The scripts and pipeline code that secret-holding jobs run live outside.github/workflows. The doc says this. Closing that route means protecting main, or limiting the App's pushes touk-replay-results/*, which is a repository-settings decision; I've queued it separately.Invariants (all in
tests/)plain_variant_idagree on any string.ci.ymlbytes Certify the policyengine.py 6.4.1 replay results from qualification attempt 3 #188 and Certify the policyengine.py 6.5.0 replay results, the first with the processed-value check #190 actually edited (the Fix the non-blocking review findings on the UK replay results PR builder #194 fixtures, pinned by blob id), each hand-kept matrix plus that PR's variant equals the lister's output on the index as the PR left it.run:text, run with bash on a copy of the checkout, writes exactlyvariants=<certified ids>; a bad index fails the step with nothing written. The engine job's matrix is that output. No workflow names a variant id..github/is refused, even for a plan whose trees lie there.main:.githubbyte-identical, and the lister on the pushed index ends with the new variant.workflows, under the strictest reading: it refuses a bot-branch update whose new commits, or whose old-to-new change, touch.github/workflows. Under it:ci.ymlis refused with the fix in the error, and the branch is unchanged;--full-historyshows.Reviews
6866605d: APPROVE, three non-blocking findings (~/PolicyEngine/_drafts/continuous-budget-ci/w6-lanes/reviews/review_matrix_from_index.md), answered in34fba891.34fba891: APPROVE, one non-blocking finding (review_matrix_from_index_delta.md), answered inb7b23575.Verification
-n 4, with a scratch basetemp removed afterwards. After the rebase, disk pause App design: public scoreboard + mission control, four views #9 holds local pytest, so this PR's CI is the run on the rebased commits:tests/test_uk_replay_engine_matrix.py: 15 passedtests/test_uk_replay_results_pr.py: 82 passedtests/test_uk_replay_variants.py: 87 passed, 1 skippedtests/test_uk_replay_discover.py: 126 passedtests/test_uk_replay_determinism.py: 12 passedtests/test_uk_replay_queue.py: 22 passedtests/test_ci_gates.py: 8 passedruff format --check,bash -nand shellcheck are clean. actionlint reports only SC2129 on the existing "Install the variant's exact environment" step, which is also on main.--full-historyfails the merged-revert case. The hard-tier review also mutated the lister (dropping a variant, accepting a$(...)id, skipping the status check),scope's.github/refusal and the hint; each was caught.After merge
I'll dispatch
uk-replay-results.ymlfor requestd83eaf590d3ebe846506d9ce9be399fe5b9b95dc58362d573d4e19fd501a649a(the committed 6.5.0 qualification). It must end with the skip notice:pe6.5.0_uk2.130.1_policyengine-uk-data-1.58.1 is already in data/uk/replay_variants.json.axiom: n/a: CI wiring and the results-PR builder; no policy encoding.
🤖 Generated with Claude Code