Skip to content

CI reuse: a neutral run no longer blocks a passing one, and workflow_call checks clear only at the exact commit (GST-3554) - #4713

Merged
capy-ai[bot] merged 6 commits into
mainfrom
fix/ci-reuse-neutral-run-caller-head
Nov 22, 2026
Merged

capy-ai[bot] merged 6 commits into
mainfrom
fix/ci-reuse-neutral-run-caller-head

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

A newer CI run that concluded neutral no longer blocks reusing a passing run on the same commit, and a check that only runs inside another workflow (workflow_call) now clears only from a run that tested your exact commit.
Why: gbrain kept hitting newer_run_vetoes on passing runs (#9827, #10058, #10021), and a calling workflow's green run from any commit could clear such a check.
Nothing to do: gbrain's skipped-run case was already fixed on main by #4695; this adds neutral, the exact-commit rule and regression tests built from gbrain's real runs.

What changed
Details
  • A newer neutral run is passed over like a skipped one, both when a passing run is reused and when the CI wait picks the commit's result. A newer failed, cancelled, timed-out, startup-failed or unfinished run still blocks reuse.
  • A check that only runs through workflow_call takes its caller's run only when that run was at the recorded commit, was not a pull request run (those test GitHub's merge commit, not your commit), and that commit's files match what was recorded. A run of the check's own workflow is checked as before.
  • Tests replay gbrain's real runs at 435e38c5: dispatch run 45041640171, the skipped pull request run 45041640526 created in the same second, and Test dispatch run 45041701289 with its native-locks jobs. The macOS case fails on the commit before A skipped CI run no longer blocks reusing a passing run on the same commit (GST-3514) #4695 with gbrain's exact error and passes now.
Why
Details

gbrain's merges were waiving the release check by hand because a pull request run that skipped all its jobs looked like a newer failure. That case is fixed on main already, so gbrain only needs to update gstack. This change closes the two remaining gaps the same report named.

Blast radius
Details

Run reuse, and clearing a workflow_call-only check from its caller's run. A repo that cleared such a check from a pull request run of its caller now dispatches the caller at the commit instead. gstack's own checks don't use that path.

### Scope Base 5962f0d..HEAD b14d9e1 (4 commits), plus the staged rename of the changelog fragment and its unstaged wording change.

Result

Docs are current, and no edits were made. docs/pregate.md (run-evidence veto and caller-run clear) and docs/troubleshooting.md (clear refusals) already match lib/run-evidence.ts, lib/ci-carry.ts and lib/pregate/index.ts. A search of the repo found no other docs describing the skipped-run veto or caller-run clearing that are stale. The banned-terms check returned no hits.

Debt

No documentation debt. The changelog fragment's staged rename and unstaged wording change are left for the parent to commit.

Agent notes
  • Code: lib/run-evidence.ts (QUIET set in verifyRun's newer-run veto), lib/ci-carry.ts (waitForRun), lib/pregate/index.ts (clearDecision caller branch: head_mismatch, merge_tested, tree_mismatch).
  • gbrain's own requires-remote lanes are profiled (run_profiles on test.yml and macos-validation.yml), so they go through verifyRun, which already binds trees; both real runs verify on main.
  • Review notes (not fixed, below the floor): own-workflow --run-url clears still check no head or tree (pre-existing, documented); a pre-head pregate.json record can't clear through a caller run until pregate reruns; a base-only merge needs a pregate rerun before a caller clear; neutral is trusted as a no-job conclusion; ten newer neutral runs could fill findCarry's candidate cap; merge_tested fix line for a pull_request-only caller suggests a push that refuses again; merge_tested is stricter than verifyRun's merge-tree rule.
    Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-22 via approval a-9fd130a181b9: A test-data registry line added after review changes no runtime behaviour; one scoped read clears it. (fix-check at b14d9e1, 0 findings)

Plan: exempt: bug fix with failing-first tests (R4, R65)

{
  "schema_version": 1,
  "pr": 4713,
  "head": "784168d4ed7f9a27a03cf314ae38a2b04d094391",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 67,
      "fail": 0,
      "skip": 0
    }
  },
  "calls": 32,
  "session_kind": "unattended",
  "run": "ship-gst3554",
  "head_tree": "e39b7cfc9b73dfc9910b748dbfc6c4932daf9373",
  "product_patch_id": "c731e3fa408bc6f3459cb301752184785704c7b2",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 24,
    "rules": "33831f8248a814fd",
    "base": "00a6b7a353ec7bc7cf35f5c383fc4f18595e8baf",
    "registry": "00a6b7a353ec7bc7cf35f5c383fc4f18595e8baf",
    "gate_scan": {
      "tagged": 0,
      "head": "784168d4ed7f9a27a03cf314ae38a2b04d094391"
    },
    "reasons": [
      "gate-class",
      "runtime=24"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @e39b7cfc9b73 (8 checks, current for 784168d4ed7f)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45050875915/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45050238329/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=e39b7cfc9b73 tests=39171 skipped=72 runs=45050875915/1 profiles=ci-reuse/free-tests heads=784168d4ed7f verified=2026-11-22T17:54:23.395Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md, focused on docs/pregate.md and docs/troubleshooting.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 7,
    "fixed": 2,
    "scope": "frozen",
    "fix_checks": 2,
    "rounds": 2,
    "dispatches": {
      "specialist": 6
    }
  },
  "review_loop_exception": {
    "accepted_by": "Captain GStack Minder (GSTA-36)",
    "date": "2026-11-22",
    "via": "approval a-9fd130a181b9",
    "reason": "A test-data registry line added after review changes no runtime behaviour; one scoped read clears it.",
    "fix_check": {
      "head": "b14d9e1f07a223464570b0779868933ba84de1f6",
      "findings": 0,
      "files": [
        "test/helpers/free-fixtures-data.ts",
        "changelog.d/fix-ci-reuse-neutral-run-caller-head.md",
        "changelog.d/ci-reuse-neutral-run-and-caller-head.md"
      ]
    }
  },
  "review_round_grants": [
    {
      "kind": "fix-check",
      "head": "b14d9e1f07a223464570b0779868933ba84de1f6",
      "pr": 4713,
      "by": "GSTA-36",
      "reason": "one-line FREE_FIXTURES registry edit after review (CI shard failure at 0e60853)",
      "at": "2026-11-22T17:51:33.793Z",
      "approval": "a-0e79a35fe54a",
      "stop_run": "ship-gst3554",
      "findings": [
        "ci-free-fixtures-784168d"
      ]
    }
  ],
  "gate_dispositions": []
}
{"head":"b14d9e1f07a223464570b0779868933ba84de1f6","run":"ship-gst3554","mark":"stop","tree":"afb9dacca7ee1fd0e398ec5efaf720f3111e1749","at":"2026-11-22T17:51:18.575Z"}

garrytan and others added 5 commits November 22, 2026 17:01
…ler run at another commit (GST-3554)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… clears only from a caller run at the exact commit (GST-3554)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…exact commit pregate recorded (GST-3554)

Review-Finding: p1/outside-voice#1 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit d3aed00 into main Nov 22, 2026
86 checks passed
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