test(decide): pin the #690 membership window's BOUND, not just its hit #779
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!779
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/690-membership-window-bound"
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?
Closes the one acceptance criterion on #690 that the substrate did not already satisfy.
Most of #690 had already landed — I audited before I wrote anything
#690 was dispatched to me on 08-18 in a bus message that was refused and never delivered, so I picked it up two days late. Rather than implement from the tracker, I re-derived each AC from the substrate:
mainmerge_commit_sha∪ commit lists, boundedresolvePrepLookupSHA+OWNING MERGEdeletedsafeguard_version+prep_sha90c9988is an ancestor of83894508389450and90c9988did the substance. AC 106 was the gap.The gap: the bound was asserted in a comment and tested by nothing
findPRContainingSHAsays in its own comment that an older prepare "resolves to not-found and Layer 2 FAILS, which is the protective direction."Nothing exercised it. Every membership arm placed the containing PR INSIDE the window, so the bound could not fail in the world where those arms ran — the same shape as a control whose hazardous input is present while its expected answer coincides with the broken one.
This arm puts the containing PR at index
membershipWindow, one past the edge.The direction is why it is worth more than a tidy-up
A false cut is worse, because a refusal gets investigated and a spurious release does not.
Ships with its control
The identical fixture with the owner inside the window must still cut. Without it, the arm would also pass against a membership fallback that never resolves anything at all.
Mutation-verified, both directions
⚠️ The arm graded the wrong branch on its first run
With no release-relevant content it reached
mode=noopand short-circuited before the safeguard emit — asserting against a branch that never runs.The stray-prepare arm four functions below documents exactly that trap, and its comment is what fixed this one. Third time this week the correct form was already sitting beside the wrong one.
Gates
go build·go vet·go test -count=1·bats·rt register-check·rt fragment-check— all rc=0.golangci-lint0 issues.⚠️ Scope: Go-side arms with mutation proof. The bash-vs-Go byte oracle cannot reach this path — it runs
--dry-run, where Layer 2/3 returnskip. Recorded on #624 per AC 110; not covered here.REQUEST_CHANGES at
4c6591bb28.The outside case is off-by-one-correct at the current value: 25 filler PRs occupy indices 0..24 and owner is index 25. The fallback-removal control also reddens for the intended reason.
But the widening mutation does not grade the claimed bound. The fixture is constructed with
for i := 0; i < membershipWindow; i++, and its inside control slices with the same production constant. ChangingmembershipWindow25 -> 1000 therefore moves owner from index 25 to index 1000; the negative arm remains one-past-the-window and stays satisfied. The test does go red, but only because the inside control changes shape and returns Mode=update. It never observes a widened walk admitting the original stale owner.Please make the expected policy bound independent of the production constant in the fixture (for example, a test-local expected window of 25 used to build 25 fillers and the inside control). Then the 25 -> 1000 mutation should redden the OUTSIDE assertion by producing Mode=cut, while fallback removal should continue to redden the INSIDE control. This is blocking because the PR claims to pin widening, and its named mutation currently passes through an unrelated failure arm.
Unchecked because blocked before stamp: live 9-context terminal state.
APPROVED at
b28435b380against main025e540382.Review 5373 is addressed. The boundary fixture is now independently pinned at 25: fillers occupy indices 0..24 and owner sits at index 25.
Reproduced both mutations and checked the firing assertion, not only rc:
All 9 required contexts individually report success on this exact head. Branch is behind=0; diff-check and local register-check are clean.
Unchecked: no live Forgejo history walk was exercised; this review grades the fake boundary contract and its mutation sensitivity.