fix: the grounding grace should run from the settle it grounds #10
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/simplify-settle-wait"
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?
waitForSettlearmed the grounding grace once, at the first settled observation, and held that deadline through every later regression back to stage 2. A review that settled early, regressed, and settled again reachedpollGroundingwith its grace already spent, so the wrapper reportedgrounding-pendingwithout reading the claims at all.Against the test clock — settle at 0s, a regressed triage for the next 450s, then a fresh settle:
Stage 2's own 15-minute deadline still bounds the settle poll, so the worst-case wait is unchanged. What changes is which bound a flapping triage hits: it used to bail at the spent grace and report
grounding-pending, and now runs to the stage-2 deadline and reportsstage2-timeout. Both exit 1.The first version of this branch also moved the
latest_passcomparison after the stalled return inreadSettle, which droppedsupersededon a read carrying both a stalled triage and a moved pass. That ordering is restored, and a test now holds it.Review
01M13XMNXQ517M5MYB6XARD7A8— headaf9b8bd20fe23aadd62fce3eadc826ac21c46857Review — j4k-oss/review-wrapper @
6a7440a7b1Scope: diff against base tree
017065182efcStatus: dispatched — coverage complete (3/3 slots terminal)
Computed under:
Findings (0)
No findings survived.
Reviewed:
Other claims
01M13Y2YKFHVB0FPHK2AGRW24Mlow — Grounding grace now restarts on every settled observation, so a flapping triage reports stage2-timeout instead of grounding-pendingCoverage
@ -50,5 +49,7 @@pin.superseded = true;}// A stalled triage ends the wait, so there is no later pass to compare against.if (review.triage_settle === "stalled") {return "stalled";}if (review.latest_pass !== null && review.latest_pass.id !== pinnedPassId) {pin.superseded = true;}low — A stalled response suppresses an already-visible pass supersession
lens
general-bug· armdefault· tally 1 valid / 0 invalid / 0 uncertainclaim
01M13WX7E5SD343B9VZ0H3QR2Hof review01M13WR6SANBWWAXGWGMBSP6H8Verified and fixed in
af9b8bd20f. Reproduced the exact combination against the current wait module: a review read of {triage_settle: "stalled", latest_pass: {id: }} returned {kind: "stalled", superseded: false}. WaitResult.superseded is documented (src/contract/types.ts, README row 11) as the fact that latest_pass.id moved off the pinned pass, independent of how the wait ended, so the early return was dropping a fact the same response carried and silencing the orchestrator's superseded warning. The comparison now runs before the stalled return, and src/wrapper/wait.test.ts locks the combination with a new case asserting {kind: "stalled", superseded: true}.The stalled early return landed ahead of the latest_pass comparison, so a review read carrying both a stalled triage and a moved latest_pass produced {kind: "stalled", superseded: false} — dropping a fact the same response already carried and silencing the orchestrator's superseded diagnostic. superseded is documented as a fact about the review, not about how the wait ended, so the comparison runs before any early return.refactor: simplify the settle wait's grace and pin handlingto fix: the grounding grace should run from the settle it grounds