rehearsal healer: rule 1 refuses a MOVED assertion (and a fixture literal → parameter) as a weakened check — two harness reds on phase 9 were refused, then landed verbatim by a session; narrow the rule's edge (drive refinement) #1501
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1501
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Symptom
On phase 9 (#1491, GREEN 2026-09-15) the healer diagnosed two harness reds correctly, proposed the right fix, and then refused its own fix under rule 1 ("never weaken what a check proves") because the diff touched an
expect(...)line — and a session-runner agent later landed the identical change verbatim, ruling the healer right under ADR 0174. Each round trip cost the drive a re-stage and a rental:place-filesContinuethat saves the placementhealer: fix would weaken a check (assertion/leg/skip))41fe5cea15:53Z, #1493 closed 15:54Z20260915T155605Z)sign-in'E2E Drive') in a shared fixture with a per-call parameter, the caller passing the name the journey actually types14e37aae17:50Z20260915T180007Z, part of it waiting on the capacity slot the fixing session itself held)For comparison the confident fast-lane landing on fire 3 (#1497,
a887852b) went red → refire in ~1 min. Rule 1 exists for the #1113 lesson (the cheap move on a real defect is to loosen the assertion) and must keep biting on that; the two cases above are not that.Where it bites
.sandcastle/rehearsal-heal-lib.sh:52— the rule is a diff grep: any removed line matchingexpect(/.toBe/.toContain/assert…/require.…trips it. That cannot tell a weakened check from:journey.device.spec.ts:1032-1035fixed the same drift the same way).Proposal (two-way door; the rule stays, its edge narrows)
rehearsal_heal_weakens_check(or wherever:52lives), pair each removed assertion line with the added lines: if every removedexpect/assert/requireline reappears as an added line with identical content after trimming leading whitespace, the diff moved checks and rule 1 does not fire. A removed assertion with no verbatim twin still trips the rule. Add the case to.sandcastle/tests/rehearsal-healer-test.shbesidehealed-assertion: a healer diff that movesexpect(count).toBe(1)down three lines must LAND; one that changes it totoBe(2)must still be refused.ready-for-agentwhen the healer's own diagnosis names an in-tree precedent for the same change (as #1498's did), so the swarm plugs it on its next 2-minute tick instead of the session-runner's 10-minute tick — or, if Ben prefers, keepready-for-sessionand accept the tax. State which in the close-report.Acceptance
rehearsal-healer-test.shgains a "moved assertion lands, changed assertion refused" pair, green.rehearsal-heal-prompt.mdrule 1 wording tells the healer a moved check is allowed so it stops pre-emptively choosingfilefor that case.41fe5cea) through the rule offline and shows it now passes; fire 4's (14e37aae) still trips it.Evidence
Phase 9 drive #1491:
artifacts/healer-refusal.jsonin runs20260915T151406Z(fire 1) and20260915T172007Z(fire 4) on matou-workstation; executor log lineshealer: fix would weaken a check (assertion/leg/skip) — reverting and filing; tickets #1493, #1498; the p4-archive retrospective's healer baseline (confident 0/11) for the wider picture.Closed — landed + proven under ADR 0174.
What landed
Refusal rule 1's edge narrowed so a MOVED assertion is no longer mistaken for a weakened one (Case 1 of the proposal). This landed in the factory core and was re-vendored, because
rehearsal-heal-lib.sh+ both test files areFACTORY_MANIFEST-managed — the pre-push drift gate byte-compares them againstMatou/dev-factory@FACTORY_REF, so hand-editing them in this repo fails the push.Matou/dev-factory@41495283—_heal_weakens_checknow exempts a diff in which every removedexpect/assert/requireline reappears byte-for-byte (indentation aside) as an added line — a move — via a new_heal_assertions_all_movedhelper (multiset cover, so a duplicated-then-half-deleted assertion cannot slip through). A changed value, a twin-less removal, and a mixed move+weaken all still trip (the #1113 backstop).90ef7a30—FACTORY_REFbumped9055eb55→41495283, the four files re-vendored, the heal prompt re-rendered,STATUS.mdupdated. Pre-push drift gate green.Tests (the acceptance pair)
rehearsal-healer-test.shcase 19 (a moved assertion LANDS) is the LAND twin of the existing case 13 (healed-assertion,toBe(1)→toBe(2), still refused). Unitrehearsal-heal-lib-test.shgains R1e (moved passes) and R1f (move-one-weaken-another still refused). Both suites green — in dev-factory and after re-vendor here:rehearsal-heal-lib-test.sh31→33,rehearsal-healer-test.sh21→22.Prompt
rehearsal-heal-prompt.mdrule 1 now tells the healer a MOVED check is allowed, so it stops pre-emptively choosingfilefor that case.Retrospective (offline, run against the pushed tree)
Correction to the Acceptance premise. The acceptance predicted "fire 4's (
14e37aae) still trips it." It does not — and never did. The landed fire-4 commit is a fixture parameterisation-with-default (nextcloudChromeBrand(name = 'E2E Drive'), callers passingcommunityNameForSlug(slug)); it removes no single-line assertion, so_heal_weakens_checkwas already blind to it under the OLD rule (verified: the old rule finds zero removed assertion lines in14e37aae). What actually tripped rule 1 on fire 4 was the healer's original proposal — changing the asserted VALUE (toContainText('E2E Drive')→ the slug name). That one-line value change still trips after this fix (shown above), so Case 2's invariant ("keep refusing value changes") is fully preserved.Case 2 routing — left as
ready-for-session(status quo), a Ben preferenceThe proposal's Case 2 offered to route a value-change refusal
ready-for-agentwhen the healer's diagnosis names an in-tree precedent — "if Ben prefers." That is an explicit human-preference / triage-policy choice, not a two-way door for an unattended session under ADR 0174, so I did not change the routing: value-change refusals keep goingready-for-sessionand accept the ~10-min tax, exactly as today. Rule 1 itself is unchanged for value changes. If Ben wants the faster lane, it is a small follow-up on the ticket-on-refusal filing (route byHEAL_RAIL_SWARMABLEplus an "in-tree precedent named" signal) — say the word and I will file it.Ruled by agent under ADR 0174 — veto anytime. Two-way door: revertible factory commit + re-vendor; proven by the red→green test suites and the offline retrospective above. Advances #1501.