feat: MistakeTracker + file-provenance ledger (v2.7.4)
Two native-inference hardening features from boocode_code_review_v2 §1 #12. MistakeTracker: new pure mistake-tracker.ts tracks consecutive heterogeneous tool failures (kinds surfaced per tool from tool-phase.ts). On 3 in a row the turn loop soft-nudges (model-facing recovery guidance + mistake_recovery sentinel + reset), then escalates to stopping the turn (cap-hit-style, Continue affordance) on a re-trip. Complements doom-loop (identical repeats) + cap-hit. File-provenance ledger: compaction.ts derives a deterministic ## Files Read list from the head messages' read-tool calls and injects it into the rolling-summary prompt so provenance survives compaction (no new table; read-only). mistake_recovery sentinel: MessageMetadata arm (server + web) + MessageBubble render branch. Built by 2 parallel agents. Server 545 tests passing (23 new); build + web tsc clean. Native-inference only. Builds on v2.7.3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,14 @@ export type {
|
||||
} from './turn.js';
|
||||
export type { ToolPhaseResult } from './tool-phase.js';
|
||||
export { detectDoomLoop, DOOM_LOOP_THRESHOLD } from './sentinels.js';
|
||||
export {
|
||||
detectMistakePattern,
|
||||
freshMistakeState,
|
||||
recordStep,
|
||||
MISTAKE_THRESHOLD,
|
||||
MISTAKE_RECOVERY_NOTE,
|
||||
} from './mistake-tracker.js';
|
||||
export type { FailureKind, MistakeState } from './mistake-tracker.js';
|
||||
export { buildMessagesPayload } from './payload.js';
|
||||
export { generateToolUseSummary } from './tool-summaries.js';
|
||||
export type { ToolInfo } from './tool-summaries.js';
|
||||
|
||||
Reference in New Issue
Block a user