Repository navigation
Conversation
merge-gate had `if: github.event_name == 'pull_request'` and no status
function, so GitHub added success(): it ran only when the report and
every job upstream of it had passed, and its one test ("the report did
not pass") could never be true. On 3 of 3 pull_request runs where the
report failed, the gate was skipped. It now runs on !cancelled().
The report read an empty `present` output as "no root build.zig" and
exited 0. A failed detect-build never writes that output, so a broken
detector gave a green report check claiming the repo has no root
build.zig (detect-build's own check stays red). The report now requires
detect-build to have succeeded before it trusts `present`.
Closes #883. Part of #851.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
X Brain Health CheckScore: 100.0/100 X Brain is above merge threshold |
🧪 Brain Stress Test ResultsScore: not measured (no stress test prints a Score: line) X Stress test passed |
The verdict step tested `[ "$detect_ok" != true ]`, a negated comparison; every added bash if here tests a named bool with `= true`. Renamed to detect_failed so the if reads what it checks. Same exit for every detect-build result under bash -e: success 0; failure, cancelled, skipped and empty 1 (5/5, old and new side by side). Found by running speed wflint on a trial merge of the 18 open loop PRs: the only lint finding the merged tree adds over main 57de4a1. Refs #883, #851. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
7fbeb9b renames the verdict bool and changes nothing else. How it was found. I trial-merged the 18 open PRs that merge cleanly ( Check. I ran the old and new snippets under
After the fix the merged tree has 175 findings again, and Not measured. I have not re-run the merge gate end to end on 7fbeb9b. This PR's checks are running now. 🤖 Generated with Claude Code |
7fbeb9b to
98da33e
Compare
Summary by t27-beesThe PR fixes two related CI logic bugs: the Merge Gate was implicitly guarded by Worth a look
Read: 1 files, +12 -1, the whole diff. Head |
Closes #883. Part of #851 (W15).
What changes
brain-ci.yml, two edits:🔒 Merge Gate:if: github.event_name == 'pull_request'becomesif: ${{ !cancelled() && github.event_name == 'pull_request' }}. Without a status function GitHub addssuccess(), so the gate ran only when everything upstream had passed, and its test "the report did not pass" could never be true. On 3 of 3pull_requestruns where the report failed, the gate wasskipped.📋 Brain Health Report: before trustingneeds.detect-build.outputs.present, requireneeds.detect-build.result == 'success'. A faileddetect-buildnever writespresent, and[ "" != "true" ]printed "Brain CI skipped — no root build.zig … Non-blocking" and exited 0.mainhas a rootbuild.zig.Measured (dispatch A/B, both arms with a forced
exit 1indetect-build)main(exp/gate-defect-ab)if [ "" != "true" ]→ "no root build.zig … Non-blocking"exp/gate-fix-ab)[ "failure" == "success" ]→ "detect-build was failure"[ "failure" != "success" ]→ "Merge gate blocked"On both throwaway branches, merge-gate's
pull_requestfilter is dropped so a dispatch reaches it. The control keeps the implicitsuccess(), and the fix arm keeps!cancelled(). Apart from that, each arm differs from its base by the forced step alone.The control also corrected me. I had expected the whole brain CI to go green. It does not, because
detect-build's own check stays red. The false part is the report alone: a green check that gives a wrong reason. The issue body records the correction.Order and overlap
git merge-tree, rc 0 each).Not measured
detect-buildhas ever failed on a real run.pull_requestrun, nothing forced: the report and the Merge Gate should both succeed. Pending.🤖 Generated with Claude Code