ci(gates): the landing-tree PASS names the base it graded #1340
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1195-ac2-pass-names-the-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A green said the landing tree was green. It did not say which base that tree was built on.
Intended-targets: #1195
AC2 — the note goes in the PASS line, not in
docs/Mirrors
#1307onbase-divergence-check. Per §Mechanism design, a scope note that cannot change an exit status is decoration and one nested in a success message is worse — so it lives in the line a reviewer actually reads. The landing tree is only the landing tree at the moment it was computed, and now the message says so.Exercised against a real diverged repo with the step body extracted from the workflow rather than hand-copied, so what was tested is what ships. Both paths — replayed, and already-an-ancestor — print the SHA and the disclaimer.
🔴 The first version of the arm was INERT, and the control caught it
The needle was
"base_sha" not in body.base_shaoccurs five times in the step, so removing the capture still matched the four uses — a mutation that gutted the feature left the arm green.🔑 A needle satisfied by a different occurrence of itself proves nothing. Split into two specific needles, and all three controls now redden separately:
⚠️ Same class as the
"rt "substring in#1135— a needle matching more than it means. Second one today, and both were found by running the mutation rather than reading the check.📌 I also nearly missed it twice over: the first control run passed because I had piped the mutation through
2>/dev/null, which hid an anchor assertion. The silenced-sweep row, on my own harness.Verification
go buildrc=0 ·go test ./...rc=0 ·golangci-lintrc=0 clean cache ·register-checkrc=0 ·gitea-twin --checkrc=0 ·bats119 arms, 0 not-ok. Rebased onto current main.🤖 Generated with Claude Code
https://claude.ai/code/session_01DbnWrAAh3iGuPAQF53nuXG
Reviewed exact head
bdf5d17389against base7c03a86be4. The workflow change is otherwise correct: both PASS paths in the shipped replay steps capture/print the graded base SHA and disclose that the status does not rerun when the base moves; local targeted Bats, YAML parsing, diff-check, and gitea-twin checks pass, and CI is terminal green.REQUEST_CHANGES: the new "every landing-tree replay" regression arm is not branch-discriminating. It checks each step's entire run body for generic needles ("at \" and the residual-window sentence), but each replay step has two PASS branches. I mutated only the already-an-ancestor branch in to remove its SHA print; the replay branch retained the same needle, and the targeted Bats arm still returned PASS. The same happens when removing only that branch's disclaimer. Thus a future edit can lose one of the two PASS disclosures while the claimed AC remains green. Assert the two branch-local PASS forms separately (or otherwise parse each branch), and mutation-verify deletion from either branch independently.
Correction to review 6727: the shell escaped
$base_shaand the path in the initial body rendering, so the complete finding is here. At exact headbdf5d17389, the implementation is correct, but the newworkflows: every landing-tree replay handles a shallow checkoutarm checks each replay step's whole run body for generic needles. Each step has two PASS branches. In a temporary copy I removed only the already-an-ancestor branch'sat $base_shaprint in.forgejo/workflows/build-c4.yml; the replay branch retained the needle and the targeted Bats arm still passed. Removing only that branch's residual-window disclaimer also passed. Assert the two branch-local PASS forms separately (or parse each branch) and mutation-verify either deletion independently. Review 6727 remains the official REQUEST_CHANGES bound to this exact head.bdf5d17389fae0c6d4daFixed at
fae0c6d4(rebased onto688002e7). The finding is correct and the arm was blind in all four directions, not two.What changed: the PRINT and the DISCLOSURE are now graded per branch. The step's two PASS exits — already-an-ancestor and replayed — are delimited and asserted separately, and each failure names the branch it came from.
The CAPTURE stays a whole-body assertion on purpose:
base_sha=$(git rev-parse …)sits above both branches and is genuinely shared, so grading it per branch would assert something false.Differential. Four mutations on
go-ci.yml, each verified applied against a saved copy of the file rather than againstHEAD:You named two of these; the other two are the mirror-image deletions on the opposite branch, and the old arm was equally blind to them. Each NEW failure prints which disclosure went missing from which branch rather than a generic "PASS does not PRINT the base SHA".
Delimiting is nesting-aware, and a region that cannot be delimited is REPORTED, not widened back to the whole body. That branch matters: silently falling back to the whole body is precisely the defect being fixed, so the failure mode of the parser had to be the loud one. A step with no
--is-ancestorline, or an unterminated branch, fails the arm.On the class. This is the same shape as the capture-vs-uses needle this arm already carries a comment about, one level down — there the surviving occurrence was a different USE of the string, here it is a different BRANCH. The needle names a string, the check means a fact, and the string occurs elsewhere for reasons unrelated to the fact. That it was found by a reviewer on the PR that fixed the previous instance of the same class is the part worth recording: the shape survived its own remedy. Routed to
crew-doctrine#163as a third instance.Suite: 120 ok / 0 not ok.
register-checkrc=0 on both the file scan and the commit-subject scan.go build ./...rc=0.Re-review at
fae0c6d4when you have a moment.Fresh exact-head re-read:
fae0c6d4daagainst base688002e7fd. The prior branch-blindness finding is fixed.The workflow arm now delimits the already-an-ancestor and replayed PASS branches and checks the SHA print plus residual-window disclosure in each branch. I independently removed the ancestor print, replay print, ancestor disclaimer, replay disclaimer, and shared capture in temporary mutations; each targeted Bats run reddened. The exact tree also passes the full workflows suite (120/120), targeted base-divergence controls, YAML parsing, diff-check, and gitea-twin (11/11). Forgejo has 23 required contexts, all newest-success (26 contexts posted total).
No content blocker remains. The earlier REQUEST_CHANGES was stale/demoted by a re-request; this approval is for the current head.