Skip to content

ci: move the book's check into documentation.yml, the first called workflow (migration M1) - #254

Merged
aRustyDev merged 2 commits into
mainfrom
ci/documentation-workflow
Nov 17, 2026
Merged

aRustyDev merged 2 commits into
mainfrom
ci/documentation-workflow

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

What

M1 of Phase 1 of the CI split (plan, phase,
ADR-0102): the first called workflow. The
docs job leaves ci.yml for documentation.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): the docs job, moved verbatim, running when its plan input names it; and the
    verdict job of ADR-0102, written out (not yet an action: that is M2, where the steps stand in two files). Called by ci.yml,
    and runnable alone by dispatch (plan defaults to ["docs"]).
  • ci.yml: changes outputs top and plans (the planner already printed them, Phase 0); 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 workflows output, so a planner that dropped a workflow could not switch its check off.
  • The planner (WORKFLOWS = {"documentation": ("docs",)}) and the gate's default list follow.

Proof that it is the same

  1. Parity, mechanically. scripts/ci-commands.py (new; plan tooling, not run in CI) compares every step of every job on
    main and on this branch, a job being the same job wherever it lives. Real output:

    moved    ci.yml:docs -> documentation.yml:docs  (4 steps, every one identical)
    appeared ci.yml:documentation  (expected, 0 steps)
    appeared documentation.yml:verdict  (expected, 3 steps)
    changed  ci.yml:changes / ci.yml:gate / ci.yml:ci-scripts  (expected; diffs below in the run)
    34 jobs before, 36 after: 30 unchanged, 1 moved, 3 changed, 2 appeared, 0 gone; PARITY
    

    The three changes are the ones intended: changes gains two outputs, gate gains top and VERDICT_JOBS, ci-scripts gains the
    new 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.

  2. The wiring is tested against the real files. test_workflow_wiring.py (new, 35 checks) holds ci.yml, the planner and the
    workflow's file to each other. The gate's tests now model the real gate: the called workflow reports verdict=pass, with cases
    for the output missing, empty and fail (178 cases).

  3. mutate_gate.py now mutates the workflow files too: 76 mutants, each killed (I checked, one by one, that each is killed by
    the check meant for it and not because the file broke), and the 4 that change nothing survive.

  4. 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 actionlint all pass on them), so that the real gate is what answers. Each failed for its own reason and no
    other, read from the logs:

    Probe Failed jobs What it said
    probe: a planned job of documentation.yml is skipped (DO NOT MERGE) #255: docs skipped by ... && false documentation / verdict, gate verdict: docs was expected to run and its result is 'skipped'; gate: documentation was expected to run and its result is 'failure'
    probe: documentation.yml succeeds and never says verdict=pass (DO NOT MERGE) #256: the step that sets verdict=pass skipped gate only; docs, verdict and documentation all succeeded gate: documentation succeeded but its verdict output is 'missing', not 'pass'
  5. This PR's own run (full, because it edits ci.yml): 40 checks, none skipped, none failed; gate certified by
    assert-required-contexts.sh; documentation / docs succeeded, so the book built through the new workflow (the doc pages I
    edited are checked, which I could not do locally); the verdict job printed ok: 1 expected jobs passed, the rest were skipped;
    and on the runner mutate_gate.py killed 76 of 76. A pull request that only edits docs/ plans documentation and nothing else,
    and one that edits deny.toml plans no documentation: both are cases of test_plan_ci.py, and the first is the next PR's (M2)
    first real affected-only run.

Found while building it

  • actionlint refuses a constant if: false (constant expression "false" in condition). My first probe used it and was
    refused 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.
  • A probe that also reddens ci-scripts would hide its own message: gate walks needs in the order the workflow lists them,
    and ci-scripts is second. So each probe's fault had to be invisible to the wiring test, which also tests it.
  • A real skip of the verdict job cannot be planted in isolation: the wiring test checks if: always(). Probe B skips the step
    that sets verdict=pass instead, which is the same thing to gate: the workflow is success and its output is empty.
  • ci-baseline.py's default job groups follow the migration (docs becomes documentation); research 0017 now says which names
    a window before the migration needs.

What this does not show

  • The book was not built locally (mdbook-mermaid is not installed here); the docs job of this PR's own run is that check, and
    it passed.
  • A real skip of the verdict job itself (see above): research 0018 measured it on a spike, design aplus right and a wrong;
    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.
  • Comments: ci-commands.py does not compare them, so "moved verbatim" for the comment above docs is my reading.
  • The affected-only run, the nightly run and an rc/* run are the migration's acceptance, taken once after M6, not at each stage.

Next: M2, security.yml (the deny job), where the verdict job'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

aRustyDev and others added 2 commits November 16, 2026 21:42
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]>
@aRustyDev
aRustyDev merged commit 8905e4c into main Nov 17, 2026
40 checks passed
@aRustyDev
aRustyDev deleted the ci/documentation-workflow branch November 17, 2026 03:20
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant