Skip to content

ci(001): a change is tested in full once, in the merge queue; extra workflows take post_merge - #512

Merged
bartekus merged 1 commit into
mainfrom
ops/ci-full-once-in-queue
Nov 5, 2026
Merged

bartekus merged 1 commit into
mainfrom
ops/ci-full-once-in-queue

Conversation

@bartekus

@bartekus bartekus commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The owner decided on 2026-11-05 that a change is tested in full once, in the merge queue.

  • A pull request's own run (without the label statecraft:stacked-ci) now leaves out the bindings and release-checks jobs, whatever it changes. It already left out the acceptance groups. The managed jobs (governance, preflight, code, AI review) and boundaries still run, so a pull request can be armed in about 15 minutes instead of 45.
  • The merge queue still runs everything against the latest main.
  • The four declared extra workflows now declare the boolean workflow_call input post_merge, which profile revision 24 (statecraft-cli spec 067) requires and passes on a push to main. With it set, verify, bindings and release-checks run on a push only when Cargo.lock or rust-toolchain.toml changed, to refresh the caches keyed on them. boundaries skips its check when its cache hits. Until the profile is upgraded, the input defaults to false and push runs are unchanged.
  • Spec records: 001, 027 and 031 each gain a dated "CI only" entry. No claim changes.

The profile upgrade to revision 26 is a separate change. It needs the spec-spine 0.32.0 pin and a workspace deny.toml for revision 22's supply-chain job.

…orkflows take post_merge

A pull request's own run leaves the bindings and release-checks jobs to the merge queue, as it already did for the acceptance groups. The four declared extra workflows declare the boolean workflow_call input post_merge (profile revision 24, statecraft-cli spec 067); with it a push to main runs them only when Cargo.lock or the toolchain changed. The input defaults to false until the profile passes it.
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

AI review (findings)

Reviewing the four workflow files and three spec files for concrete defects.

Workflow logic analysis:

All four workflows add a post_merge: boolean input (default false) and branch on it. Three of them (bindings.yml, verify.yml, release-checks.yml) use git diff --quiet HEAD~1 HEAD -- Cargo.lock rust-toolchain.toml to decide whether to run. That command requires at least 2 commits of history (HEAD~1 must exist).

  • bindings.yml — the diff context shows the scope job already has fetch-depth: 0 (full history), so HEAD~1 is always available. No issue.

  • verify.yml — the diff explicitly adds fetch-depth: 2 to the checkout step. Correct.

  • release-checks.yml — the diff removes BASE_SHA / RUSTUP_TOOLCHAIN and replaces the affected.py call with git diff HEAD~1 HEAD, but no fetch-depth adjustment appears in the diff. The old code drove a Python script that did not require HEAD~1; the new code does. Without fetch-depth: 2, the default shallow clone (depth: 1) means HEAD~1 does not exist. git diff exits with a fatal error; the shell if-statement treats the non-zero exit as the else branch, setting run=true unconditionally on every post-merge push—defeating the cache-refresh optimisation entirely.

  • boundaries.yml — uses a cache-hit expression, not git diff HEAD~1, so no depth dependency. No issue.

Spec entries: The three spec changelog notes are dated, explicitly disclaim any normative claim (CI only, no claim of this spec changes), and accurately describe the behaviour introduced by the workflow changes.

No other concrete defects found in logic, security model, or governance consistency.

{"head": "79447b6ff3265a662246796cad30a82e891d1f71", "verdict": "findings", "findings": [{"path": ".github/workflows/release-checks.yml", "line": 53, "summary": "The scope job calls `git diff --quiet HEAD~1 HEAD` in the post_merge branch but does not add `fetch-depth: 2` to its checkout step; with the default shallow clone (depth 1), HEAD~1 is absent, git diff exits fatally, the if-statement falls to the else branch, and run is always set to true on post-merge pushes, defeating the cache-refresh optimisation (compare: verify.yml correctly adds fetch-depth: 2)."}]}

Subject: fce3f5d...79447b6, diff digest 49642d5de34b859ea361f23bf61bc5fa30469f99e0c7a06f20be2a9a3dd8015e, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 5, 2026 19:25 — with GitHub Actions Inactive
@bartekus

bartekus commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Review note on the release-checks.yml finding: not a defect. The scope job's checkout already sets fetch-depth: 0 (release-checks.yml line 42, unchanged by this change), so HEAD~1 exists. bindings.yml's scope job also fetches full history, and verify.yml's plan job gains fetch-depth: 2 in this change. If git diff ever errored anyway, the if falls to run=true, the safe direction. This change edits workflows, so it needs the owner's review exception, which the owner granted on 2026-11-05.

@bartekus
bartekus added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit a19c9e4 Nov 5, 2026
20 checks passed
@bartekus
bartekus deleted the ops/ci-full-once-in-queue branch November 5, 2026 20:18
bartekus added a commit that referenced this pull request Nov 5, 2026
…pace deny.toml (#513)

Stacked on #512, which adds the `post_merge` input that revision 24
requires. The owner decided on 2026-11-05 to adopt the profile at
revision 26, with a workspace `deny.toml`.

- **Profile:** `github-actions-rust` moves from revision 20 to 26,
rendered with statecraft-cli at 8fd5be05 (`init apply`). The managed
files change only through that render: `statecraft-ci.yml`,
`statecraft-ai-review.yml`, `scripts/statecraft/*`, CODEOWNERS,
`.statecraft/setup/*` and the new `.statecraft/REVIEW.md`.
  - 22: a required `supply-chain` job (`cargo deny --locked check all`).
  - 23: a managed review guide.
- 24: a push to `main` runs only the cache saves and `ci-gate`, judged
by the merge-queue run at the same commit.
  - 25: `ci.code.free_disk` frees runner disk before the build.
  - 26: answered low-severity review findings need no exception.
- **spec-spine:** the pin moves 0.31.0 to 0.32.0, as revision 26
requires. The registry and index are regenerated, so every registry
shard changes.
- **`deny.toml` (new, root):** the workspace policy.
- Five advisories are ignored with reasons, to be revisited by
2027-02-05. All of them are in integration or backend crates, none in
the release set.
  - Zlib, BSL-1.0 and MPL-2.0 licenses are allowed.
  - The Aicortex git source is allowed.
  - Duplicate versions warn instead of failing.
  - Path wildcards are allowed.

`cargo deny --locked check all` passes locally. The release policy
`tools/rustev-release/deny.toml` is unchanged.
- **Record:** spec 001 gains "Profile and engine upgrade record
(2026-11-05)". AGENTS.md now names revision 26.

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 79447b6f Deployed Nov 5, 2026 by bartekus via review-exception #3445
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