Skip to content

ci: move the supply-chain check into security.yml, and make the verdict job's steps an action (migration M2) - #258

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

aRustyDev merged 2 commits into
mainfrom
ci/security-workflow

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

What

M2 of Phase 1 of the CI split (plan, phase,
ADR-0102): the second called workflow, and the
first action. A refactor: deny keeps its id, its steps, its pins and its comment. Two commits: the plan documents (M1 recorded as
done, M2 planned in detail), then the build.

An action was made, by your rule (exact duplicate, so I did not ask). After M1 the verdict job's judge step and its step that sets
the output stood in documentation.yml; security.yml needs the same two, with one value different (the jobs the workflow knows). They
are now .github/actions/verdict, and both workflows call it. Inputs: needs, plan, jobs; output: verdict. The two variables it
fixes (CHANGES_JOB and CELL_JOB, empty) are the ones a called workflow never has. test.yml's verdict job (M5) also downloads cell
markers, so it is not an exact copy and I will ask about it when M5 starts, with the two side by side.

A correction to what I told you: I said the action would hold "checkout, judge, mark the output". It cannot hold the checkout: a local
action (uses: ./.github/actions/verdict) is read from the checkout, so the checkout has to come first, in the job. The action is the
judge and the mark step; each verdict job is now checkout, then one call.

What changes in the repository

  • security.yml (name: security): workflow_call (input plan, output verdict) and workflow_dispatch (plan defaults to
    ["deny"]); no workflow-level concurrency:; permissions: {}. The job deny moved verbatim, if: contains(fromJSON(inputs.plan), 'deny') and no needs: changes; and the verdict job, which calls the action.
  • .github/actions/verdict/action.yml (a row in .github/actions/README.md), and documentation.yml's verdict job now calls it.
  • ci.yml: deny is gone; a calling job security (needs: changes, runs when top names it, plan from plans); gate needs it;
    VERDICT_JOBS is documentation security, still a static list.
  • The planner: WORKFLOWS also holds security: (deny); a rule makes a change to the action run everything (the gate trusts what it
    outputs, as it trusts assert-gate.sh). The gate's default list, the indexes, cicd.md, running.md and ci-baseline.py's groups follow.

Proof that it is the same

  1. Parity, mechanically (scripts/ci-commands.py, the one from M1). Real output:

    moved    ci.yml:deny -> security.yml:deny  (4 steps, every one identical)
    changed  ci.yml:gate  (expected)
    changed  documentation.yml:verdict  (expected)
    appeared verdict/action.yml:action:verdict  (expected, 2 steps)
    appeared ci.yml:security  (expected, 0 steps)
    appeared security.yml:verdict  (expected, 2 steps)
    36 jobs before, 39 after: 33 unchanged, 1 moved, 2 changed, 3 appeared, 0 gone; PARITY
    

    gate changed only in VERDICT_JOBS (documentation to documentation security); documentation.yml's verdict job changed from its two
    inline steps to the one call.

  2. Locally, every ci-scripts command and every guard of deps, in the CI's order: all pass (the gate's cases 182, the wiring test 63
    checks, the planner's 6,983). actionlint is clean, and its control for this action (a call with an input renamed) is refused twice, so
    the clean result means something.

  3. The mutant driver: 115 hand mutants, each killed; the 6 that change nothing survive. I read the first failing check of every one: each
    fails the check meant for it, not a file that broke. The mutants of a called workflow are now generated, so documentation.yml and
    security.yml get the same ones, and the action has its own (the judge's inputs, the two fixed variables, the output set before or after
    the judge, a step that sets it whatever the judge said, a wrong word). One note: "a moved job is left in ci.yml" is killed first by the
    gate-needs check, not by the "no longer a job of ci.yml" one; the second also fires on its own (planted with the job in the gate's
    needs too: a job that has moved is no longer a job of ci.yml: got ['deny']).

  4. Two probes (probe: deny planned and skipped in security.yml (do not merge) #259 and probe: the call of the verdict action skipped in security.yml (do not merge) #260, draft PRs closed unmerged, branches deleted), planted in security.yml so that no text check sees them (the
    wiring test, the lint and actionlint pass on each, run before the push), 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: deny planned and skipped in security.yml (do not merge) #259: deny planned and skipped (... && false) security / verdict, gate (deny skipped; the other 36 jobs, documentation's two among them, succeeded) verdict: deny was expected to run and its result is 'skipped'; gate: security was expected to run and its result is 'failure'
    probe: the call of the verdict action skipped in security.yml (do not merge) #260: the step that calls the action skipped gate alone (the other 38 jobs succeeded, security / deny and security / verdict among them) gate: security succeeded but its verdict output is 'missing', not 'pass'
  5. This PR's own run (full, because it edits ci.yml; run 44011921627, head d9d8007): 41 checks, all pass, none skipped; gate
    certified by assert-required-contexts.sh (STRICT_CONTEXTS=gate). security / deny ran cargo deny (advisories ok, bans ok, licenses ok, sources ok). Both verdict jobs ran the action's two steps (the judge, then the mark) and printed ok: 1 expected jobs passed, the rest were skipped. gate expected ci-scripts deps lint hermetic pg-adapter contract mutants web documentation security and printed
    ok: 10 expected jobs passed, the rest were skipped; 26 of 26 planned cells reported success. On the runner mutate_gate.py killed 115 of
    115 and the 6 that change nothing survived, under dash. gate is still the only required context, so the check deny is now named
    security / deny and nothing requires it by name.

Found while building it

  • A run of the mutant driver is void if a file under .github/ changes while it runs. It copies the tree for each mutant. I ran
    actionlint's control (an input renamed in security.yml) while the driver was running, and it "killed" a mutant that changes nothing,
    naming the check my edit had broken. I threw that run away and ran the driver again on the restored tree.
  • M1's body said M2 would be "the first real affected-only run". It is not: every stage edits ci.yml, which the planner runs in full,
    so this PR's run is a full one. The affected-only run is the migration's acceptance after M6, and the cases (a change to deny.toml plans
    security and nothing else; a crate's Cargo.toml plans it too) are test_plan_ci.py's until then.

What this does not show

  • A real skip of the verdict job itself, which the wiring test forbids (if: always()); probe probe: the call of the verdict action skipped in security.yml (do not merge) #260 shows the same rule by its observable.
  • An affected-only run, a nightly run and an rc/* run: the migration's acceptance, taken once after M6 (see above).
  • Comments: ci-commands.py does not compare them, so "moved verbatim" for the comment above deny is my reading.
  • A cargo-deny action from the public marketplace may fit better than install-action and scripts/rs cargo deny; that is a question for
    the Security phase's survey, not for a refactor, which keeps the command.

Next: M3, web.yml (the web job), the third callee, which calls the action as the first two do.

🤖 Generated with Claude Code

aRustyDev and others added 2 commits November 16, 2026 22:26
…dict 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]>
…ct 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]>
@aRustyDev
aRustyDev enabled auto-merge (squash) November 17, 2026 03:43
@aRustyDev
aRustyDev merged commit 1bc9e9a into main Nov 17, 2026
41 checks passed
@aRustyDev
aRustyDev deleted the ci/security-workflow branch November 17, 2026 04:00
aRustyDev added a commit that referenced this pull request Nov 17, 2026
…(migration M3) (#264)

* docs(plans): record M2 as done, plan M3 (web.yml), and the deferral of a shared build-web action

M2 merged as #258: the parity, the wiring checks, the mutants, a full run and two probes are recorded in the phase document, with what the stage found. M3 is planned in detail: the workflow and its job share the name web, which the wiring test must allow for the calling job.

The owner deferred the shared build-web action (the web job's Node, pnpm, install, build and SPA steps are a near-duplicate of contract-pass-tools's e2e steps, not an exact copy): M3 moves web as it is, and the action is proposed again in the Web and E2E phases.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* ci: move the web build check into web.yml, the third called workflow (migration M3)

The web job leaves ci.yml for web.yml, moved with its steps, pins, job-level variables and comment unchanged (ci-commands.py: 7 steps, every one identical). ci.yml calls it in a job that keeps the id web, so gate's needs do not change, and VERDICT_JOBS lists the three called workflows. The verdict job calls the verdict action, as the other two do. No new action: the shared build-web action is deferred to the Web and E2E phases (owner).

The workflow and its job share a name, which two tools had to learn. The wiring test allows a moved job's name in ci.yml only as the call that bears it, and refuses an id used twice. The parity script paired nothing in that case (the id is in both files): a job that became a call must now find its steps, identical, under the same id in another file, or they are reported lost; its self-test grew from 24 to 33 checks.

The planner's map, the gate's default list, the indexes, cicd.md, running.md and the mutant driver (a row in CALLS: 136 mutants, all killed, 7 that change nothing survive) follow.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
aRustyDev added a commit that referenced this pull request Nov 23, 2026
…t pull-request time, under the bundle's cache key (Build phase, stage 2) (#356)

* ci(build): the wasm job: the deploy bundle's two Workers in release at pull-request time, under the bundle's cache key (Build phase, stage 2)

build.yml gets its second job. wasm builds the Worker as it ships (worker-build --release . --no-default-features, in crates/worker) and the edge Worker (worker-build --release ., in crates/edge) for wasm32-unknown-unknown, with the commands and directories build-bundle builds them with (the wiring test holds each pair equal), checks that each wrote worker/shim.mjs, index.js and a non-empty index_bg.wasm, and uploads both for three days. Nothing but build-bundle built the edge Worker in release before a release candidate; the Worker as it ships is built by the ten worker-cf cells too (wrangler.toml's command is the bundle's), and the job builds it again on purpose, for the cache and the artifact.

The cache key is build-bundle's, deploy-release, and main saves it. The bundle runs on an rc/* branch or a tag, whose caches nothing else reads, and it never saved one, so every bundle compiled worker-build from source (106 s of its 297). In a warm Worker cell the same install line takes 0.4 s ("already installed"), and worker-build has no prebuilt binary to fetch instead: workers-rs's releases have no assets and its manifest no binstall metadata. The job is planned when thrust-worker or thrust-edge is affected (the edge crate alone is tested in a graph where the Worker does not depend on it).

Tests and controls: test_plan_ci.py 7058 checks; test_workflow_wiring.py 208 (the bundle's commands equal line by line, the cache key's two users, the files checked, the upload, no secret); mutate_gate.py 341 of 341 killed (it was 313), the 12 that change nothing survive; the check's own text, taken from build.yml, fails for each of the six files missing or empty and passes for all six (16 cases); ci-commands.py against main: one job appears, the verdict's jobs line changes, none is gone. The action build-web that the phase document said would be made is not: the owner deferred it on 2026-11-17 (the record of #258), and the document is corrected.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docs(ci): say what the wasm job is (cicd.md, running.md), and correct the Build plan on build-web

cicd.md gets the wasm job in the build.yml row, the planner rule, the examples re-run through the planner (a Worker change now plans wasm) and the counts that moved (208 wiring checks, 341 mutants). running.md gets the row of wasm and a runbook for it (a compiler error, worker-build writing no file, a slow run that is a cache not restored). The workflows index names the job.

phases/0004-build.md said that Build would create an action build-web for the web app's build without asking, as an exact duplicate in web.yml, build-bundle and contract-pass-tools. It is not: the owner decided on 2026-11-17 (the record of #258, phase 0002) that the copies are the same commands but not an exact copy, and deferred the action to the Web and E2E phases. The document now says so and that Build does not touch it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docs(plans): stage 2 of the Build phase (wasm): what it costs cold, the survey, the control, and what is not yet measured

Stage 2's section in phases/0004-build.md. The cold job is 238 s (run 45105438353): checkout 5.8, setup 13.8, cargo install worker-build 110.7 (47% of the job), wrangler 7.4, the Worker 74.1, the edge Worker 16.9, the check and the upload 2.6; the Worker's wasm is 5.2 MB, the edge's 0.68 MB. The numbers are the deploy bundle's own (106, 73, 17 and 7.5 s in run 45084816796), which is what holding the commands equal should give.

worker-build has no prebuilt binary (workers-rs's releases have no assets, its manifest no binstall metadata), so compiling it is avoided only by the cache, which in a warm Worker cell makes the same install line take 0.4 s. The survey names the candidates and why none replaces it; the one hand-written piece, the check that worker-build wrote its three files for each Worker, has a control (16 of 16 cases, taken from the file's own text). What is not yet measured is said so: the warm time and whether the bundle restores the cache follow the merge, because the cache is saved on main only.

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