Closes#420. (Build-once #398 was measured and rejected — see #398; this PR ships only the independent, zero-cost cross-run skip.)
What
On a merge-to-main push, if the merged tree is byte-identical to a PR head that already passed CI (green combined status), test/migrations/functional-e2e skip their heavy work — while build still runs and ships the image from that identical, already-validated tree. Implemented by mirroring the #416 docs-only pattern: a per-job revalidate detect (scripts/ci-detect-already-validated.sh) whose output ANDs into the existing docs-only step gates. No compile job, no artifacts, no branch-protection change.
Safety
build is ungated and always runs on main → no image ships unvalidated source. The script fail-safes to skip=false on any uncertainty (not a main push, no HEAD^2, differing tree, non-success/missing status, missing auth). Adversarial review: MERGEABLE, verified live against the Gitea API (skipped contexts don't drag the combined .state; a real non-identical-tree merge correctly declined to skip).
Honest hit-rate
Fires only on clean, up-to-date, un-rebased merges — this repo's routine rebase-before-merge (decisions.md treadmill) and parallel merges defeat it most of the time. A genuine but occasional win that never fires unsafely. Documented in docs/ci-cd.md.
Closes #420. (Build-once #398 was measured and **rejected** — see #398; this PR ships only the independent, zero-cost cross-run skip.)
## What
On a merge-to-`main` push, if the merged tree is byte-identical to a PR head that already passed CI (green combined status), `test`/`migrations`/`functional-e2e` skip their heavy work — while `build` still runs and ships the image from that identical, already-validated tree. Implemented by mirroring the #416 docs-only pattern: a per-job `revalidate` detect (`scripts/ci-detect-already-validated.sh`) whose output ANDs into the existing docs-only step gates. No `compile` job, no artifacts, no branch-protection change.
## Safety
`build` is ungated and always runs on `main` → no image ships unvalidated source. The script fail-safes to `skip=false` on any uncertainty (not a main push, no `HEAD^2`, differing tree, non-`success`/missing status, missing auth). Adversarial review: **MERGEABLE**, verified live against the Gitea API (skipped contexts don't drag the combined `.state`; a real non-identical-tree merge correctly declined to skip).
## Honest hit-rate
Fires only on clean, up-to-date, **un-rebased** merges — this repo's routine rebase-before-merge (decisions.md treadmill) and parallel merges defeat it most of the time. A genuine but occasional win that never fires unsafely. Documented in `docs/ci-cd.md`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy
changed title from feat(398,420): CI build-once + skip re-validating identical merge trees to feat(420): skip re-validating an already-green identical merge tree2026-07-18 18:48:37 +02:00
Scoped adversarial review of the #420-only diff returned MERGEABLE (no path ships an unvalidated image; fail-safe defaults verified; combined-status aggregation verified live against the Gitea API). The tip commit f7477ff9 adds only doc-nit prose (hit-rate wording + a live-verification citation) on top of the reviewed code — no logic change.
Review-verdict: MERGEABLE @ f7477ff9f971a8f4037ccdb0fc06885c69d0ddd4
Scoped adversarial review of the #420-only diff returned MERGEABLE (no path ships an unvalidated image; fail-safe defaults verified; combined-status aggregation verified live against the Gitea API). The tip commit `f7477ff9` adds only doc-nit prose (hit-rate wording + a live-verification citation) on top of the reviewed code — no logic change.
Rebased onto origin/main (resolved the append-only docs/decisions.md conflict by keeping both #457's and this PR's entries — 21 insertions / 0 deletions vs main). The workflow + script logic is byte-identical to the MERGEABLE-reviewed diff; only the decisions.md append and the doc-nit prose moved. No logic change.
Review-verdict: MERGEABLE @ dd55f00ed4823ea051a11efb89cd6d7d105dc58e
Rebased onto origin/main (resolved the append-only docs/decisions.md conflict by keeping both #457's and this PR's entries — 21 insertions / 0 deletions vs main). The workflow + script logic is byte-identical to the MERGEABLE-reviewed diff; only the decisions.md append and the doc-nit prose moved. No logic change.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #420. (Build-once #398 was measured and rejected — see #398; this PR ships only the independent, zero-cost cross-run skip.)
What
On a merge-to-
mainpush, if the merged tree is byte-identical to a PR head that already passed CI (green combined status),test/migrations/functional-e2eskip their heavy work — whilebuildstill runs and ships the image from that identical, already-validated tree. Implemented by mirroring the #416 docs-only pattern: a per-jobrevalidatedetect (scripts/ci-detect-already-validated.sh) whose output ANDs into the existing docs-only step gates. Nocompilejob, no artifacts, no branch-protection change.Safety
buildis ungated and always runs onmain→ no image ships unvalidated source. The script fail-safes toskip=falseon any uncertainty (not a main push, noHEAD^2, differing tree, non-success/missing status, missing auth). Adversarial review: MERGEABLE, verified live against the Gitea API (skipped contexts don't drag the combined.state; a real non-identical-tree merge correctly declined to skip).Honest hit-rate
Fires only on clean, up-to-date, un-rebased merges — this repo's routine rebase-before-merge (decisions.md treadmill) and parallel merges defeat it most of the time. A genuine but occasional win that never fires unsafely. Documented in
docs/ci-cd.md.🤖 Generated with Claude Code
548de1367ato1381f9cca81381f9cca8tof7477ff9f9feat(398,420): CI build-once + skip re-validating identical merge treesto feat(420): skip re-validating an already-green identical merge treeReview-verdict: MERGEABLE @ f7477ff9f971a8f4037ccdb0fc06885c69d0ddd4
Scoped adversarial review of the #420-only diff returned MERGEABLE (no path ships an unvalidated image; fail-safe defaults verified; combined-status aggregation verified live against the Gitea API). The tip commit
f7477ff9adds only doc-nit prose (hit-rate wording + a live-verification citation) on top of the reviewed code — no logic change.Review-verdict: MERGEABLE @
dd55f00ed4Rebased onto origin/main (resolved the append-only docs/decisions.md conflict by keeping both #457's and this PR's entries — 21 insertions / 0 deletions vs main). The workflow + script logic is byte-identical to the MERGEABLE-reviewed diff; only the decisions.md append and the doc-nit prose moved. No logic change.
f7477ff9f9todd55f00ed4