Skip to content

fix(loop): expert rescue fires at ladder exhaustion even with an empty block fingerprint#153

Merged
agjs merged 1 commit into
mainfrom
fix/expert-rescue-empty-fingerprint
Jul 20, 2026
Merged

fix(loop): expert rescue fires at ladder exhaustion even with an empty block fingerprint#153
agjs merged 1 commit into
mainfrom
fix/expert-rescue-empty-fingerprint

Conversation

@agjs

@agjs agjs commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Stacked on #152. build12/13 parked via the read-only-spin path with 'expert handoff skipped — no block fingerprint computed' — that caller reaches tryExpertRescue without checkStuck's escalation-N guard, and a near-green rollback reset errorAge, so BOTH identity sources were empty and the last-resort expert was skipped (all 4 diagnosis reviewers flagged it). Fix: derive a per-error-set identity from error keys (used for lookup + record, not persisted) so the expert fires once and a different set still gets its shot. Panel PASS; TDD; full suite green.

…y block fingerprint

build12/build13 parked via the read-only-spin path (session.ts readonlySpinStop) with
'expert handoff skipped — no block fingerprint computed; parking'. That caller reaches
tryExpertRescue WITHOUT checkStuck's escalation-N guard, and a near-green rollback had
reset errorAge (so fingerprintFor derives nothing) with blockFingerprint never set — so
BOTH identity sources were empty and the last-resort expert was skipped, parking with
rollback budget still available (all 4 diagnosis reviewers flagged the premature park).

Fix: when both sources are empty, derive a per-error-set identity from the failing error
KEYS (the dialect fingerprintFor/samePersist use — NOT e.file). It is used for BOTH the R4
lookup and the record-on-success, so the SAME error set fires once then skips, while a
DIFFERENT set gets its own shot. It is deliberately NOT persisted to state.blockFingerprint:
the fallback only fires on the settleGate-less callers (settleGate always has escalation-N),
so persisting would only leave a stale id that skips a later, different stall (panel-caught).

TDD: regression test asserts empty-fp exhaustion fires the expert, records R4 under the
derived id (state.blockFingerprint stays empty), skips a second same-set call (one-shot),
and STILL fires on a different error set. Full core suite green (2813 pass).
Base automatically changed from fix/api-client-usage-guide to main July 20, 2026 21:02
@agjs
agjs merged commit 5cd8cf2 into main Jul 20, 2026
1 check passed
@agjs
agjs deleted the fix/expert-rescue-empty-fingerprint branch July 20, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant