fix(loop): expert rescue fires at ladder exhaustion even with an empty block fingerprint#153
Merged
Merged
Conversation
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.