Repository navigation
ci: move the book's check into documentation.yml, the first called workflow (migration M1) - #254
Merged
Merged
Conversation
All four were answered as recommended: the simplest callee first (M1 is documentation.yml, test.yml is fifth), the job ids kept through the migration, flake-hunt.yml left as it is and made a stage of the Test phase, and lowercase workflow names. PLAN.md's decisions table, its Phase 1 section (the rules, the stage table in the new order, the done-when list) and its status, and the phase document's questions section (now decisions), say so; no question is left open. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rkflow (migration M1) Phase 1 of the CI split, stage M1 (ADR-0102): the `docs` job leaves ci.yml for a workflow of its own that ci.yml calls and `gate` judges twice. A refactor: the job keeps its id, its steps, its pins and its comment, byte for byte. documentation.yml has the `docs` job, which runs when its `plan` input names it, and a `verdict` job that judges `docs` against that plan with the one script (assert-gate.sh) and sets the output `verdict=pass` only after it did. It is called by ci.yml and runs alone by dispatch (plan defaults to ["docs"]); it sets no workflow-level concurrency and reads no event name (R8, R9). ci.yml: `changes` outputs `top` and `plans`, which the planner already printed; a calling job `documentation` replaces `docs`; `gate` needs it, judges `top` and not every planned job, and sets VERDICT_JOBS=documentation, a static list and not the planner's output, so a planner that dropped a workflow could not switch its check off. The planner's WORKFLOWS names the workflow, and the gate's default list follows. Proof that it is the same, as the phase plan requires: - .agents/plans/ci-workflows/scripts/ci-commands.py compares every step of every job on main and on this branch, a job being the same job wherever it lives: `docs` moved with its 4 steps identical, 30 jobs unchanged, and the only differences are the three expected ones (changes gains two outputs, gate gains `top` and VERDICT_JOBS, ci-scripts gains test lines) and the two new jobs. Its self-test has 24 checks and 13 planted bugs, each caught. - test_workflow_wiring.py, new, holds ci.yml, the planner and the workflow's file to each other (35 checks); the gate's tests now model the real gate, with a `verdict` output on the called workflow and the cases for it missing, empty and `fail` (178 cases). - mutate_gate.py now also mutates ci.yml and documentation.yml: 76 mutants, each killed by the check meant for it (checked one by one), and four that change nothing survive. The planner's test_plan_ci.py pins the map (EXPECTED_WORKFLOWS), so each stage's change to it shows in that file. ci-baseline.py's default job groups follow the migration; research 0017 now says which names a window before the migration needs. The book was not built locally (mdbook-mermaid is not installed here): the `docs` job of this pull request's own run is that check, through the new workflow. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 17, 2026
aRustyDev
added a commit
that referenced
this pull request
Nov 17, 2026
…ct job's steps an action (migration M2) (#258) * docs(plans): record M1 as done, and plan M2 (security.yml and the verdict action) M1 merged as #254: the parity, the wiring checks, the mutants, a full run and two probes are recorded in the phase document, with what the stage found and one correction to its pull request (a stage's own run is always a full one, so the affected-only run is the migration's acceptance, after M6). M2 is planned in detail: the verdict job's steps stand in two files, so they become a composite action (judge and mark; the checkout stays in the job, since a local action is read from it), and the deny job moves to security.yml. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * ci: move the supply-chain check into security.yml, and make the verdict job's steps an action (migration M2) The deny job leaves ci.yml for security.yml, the second called workflow, moved with its steps, pins and comment unchanged (ci-commands.py: 4 steps, every one identical). ci.yml calls it in a job security, gate needs that job, and VERDICT_JOBS lists both called workflows. The verdict job's steps now stand in two files, so they become the composite action .github/actions/verdict (an exact duplicate, made without asking, by the plan's rule): the judge (assert-gate.sh over the workflow's own jobs) and the step that sets the output after it. The checkout stays in each job, because a local action is read from the checkout. documentation.yml's verdict job calls it too. A change to the action runs everything (the gate trusts what it outputs). The planner's map, the gate's default list, the indexes, cicd.md, running.md and ci-baseline.py follow. The wiring test checks each called workflow's call and the action once; the mutant driver makes the mutants of a called workflow once per workflow (115 mutants, all killed, 6 that change nothing survive). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
What
M1 of Phase 1 of the CI split (plan, phase,
ADR-0102): the first called workflow. The
docsjob leavesci.ymlfordocumentation.yml. A refactor: the job keeps its id, its steps, its pins and its comment.Two commits: your answers to the four questions of #251 (all as recommended), then the move.
What changes in the repository
documentation.yml(name: documentation): thedocsjob, moved verbatim, running when itsplaninput names it; and theverdictjob of ADR-0102, written out (not yet an action: that is M2, where the steps stand in two files). Called byci.yml,and runnable alone by dispatch (
plandefaults to["docs"]).ci.yml:changesoutputstopandplans(the planner already printed them, Phase 0); a calling jobdocumentationreplaces
docs;gateneeds it, judgestopand not every planned job, and setsVERDICT_JOBS: documentation, a static listand not the planner's
workflowsoutput, so a planner that dropped a workflow could not switch its check off.WORKFLOWS = {"documentation": ("docs",)}) and the gate's default list follow.Proof that it is the same
Parity, mechanically.
scripts/ci-commands.py(new; plan tooling, not run in CI) compares every step of every job onmainand on this branch, a job being the same job wherever it lives. Real output:The three changes are the ones intended:
changesgains two outputs,gategainstopandVERDICT_JOBS,ci-scriptsgains thenew test lines. Its own control: 24 self-test checks, and 13 bugs planted in it one at a time, each caught (a dropped step, a
changed command, a pin, the runner, a job gone, an ambiguous pair...). It does not see comments or what a step does when it runs.
The wiring is tested against the real files.
test_workflow_wiring.py(new, 35 checks) holdsci.yml, the planner and theworkflow's file to each other. The gate's tests now model the real gate: the called workflow reports
verdict=pass, with casesfor the output missing, empty and
fail(178 cases).mutate_gate.pynow mutates the workflow files too: 76 mutants, each killed (I checked, one by one, that each is killed bythe check meant for it and not because the file broke), and the 4 that change nothing survive.
Two probes (probe: a planned job of documentation.yml is skipped (DO NOT MERGE) #255 and probe: documentation.yml succeeds and never says verdict=pass (DO NOT MERGE) #256, draft PRs closed unmerged, branches deleted), planted so that no text check sees them (the wiring
test, the lint and
actionlintall pass on them), so that the realgateis what answers. Each failed for its own reason and noother, read from the logs:
docsskipped by... && falsedocumentation / verdict,gatedocs was expected to run and its result is 'skipped'; gate:documentation was expected to run and its result is 'failure'verdict=passskippedgateonly;docs,verdictanddocumentationall succeededdocumentation succeeded but its verdict output is 'missing', not 'pass'This PR's own run (full, because it edits
ci.yml): 40 checks, none skipped, none failed;gatecertified byassert-required-contexts.sh;documentation / docssucceeded, so the book built through the new workflow (the doc pages Iedited are checked, which I could not do locally); the
verdictjob printedok: 1 expected jobs passed, the rest were skipped;and on the runner
mutate_gate.pykilled 76 of 76. A pull request that only editsdocs/plansdocumentationand nothing else,and one that edits
deny.tomlplans nodocumentation: both are cases oftest_plan_ci.py, and the first is the next PR's (M2)first real affected-only run.
Found while building it
actionlintrefuses a constantif: false(constant expression "false" in condition). My first probe used it and wasrefused before it could run, so the probe uses an expression it cannot fold. The check added in ci(lint): hold called workflows to their rules, add actionlint, and index the CI directories (stage 0.4) #249 is looking.
ci-scriptswould hide its own message:gatewalksneedsin the order the workflow lists them,and
ci-scriptsis second. So each probe's fault had to be invisible to the wiring test, which also tests it.verdictjob cannot be planted in isolation: the wiring test checksif: always(). Probe B skips the stepthat sets
verdict=passinstead, which is the same thing togate: the workflow issuccessand its output is empty.ci-baseline.py's default job groups follow the migration (docsbecomesdocumentation); research 0017 now says which namesa window before the migration needs.
What this does not show
mdbook-mermaidis not installed here); thedocsjob of this PR's own run is that check, andit passed.
verdictjob itself (see above): research 0018 measured it on a spike, designaplusright andawrong;probe probe: documentation.yml succeeds and never says verdict=pass (DO NOT MERGE) #256 shows the same rule on the real files by its observable.
ci-commands.pydoes not compare them, so "moved verbatim" for the comment abovedocsis my reading.rc/*run are the migration's acceptance, taken once after M6, not at each stage.Next: M2,
security.yml(thedenyjob), where theverdictjob's steps stand in two files, so the composite action is made.M1's own phase-document status is updated in M2's first commit, as #236 did for the spike, so as not to cost this PR a second
full run.
🤖 Generated with Claude Code