Skip to content

fix(compaction): pause automatic retries until explicit recovery - #160

Open
akemmanuel wants to merge 1 commit into
fix/compaction-handofffrom
fix/compaction-failure-recovery
Open

akemmanuel wants to merge 1 commit into
fix/compaction-handofffrom
fix/compaction-failure-recovery

Conversation

@akemmanuel

Copy link
Copy Markdown
Owner

Summary

Refs #151. Stacked on #158 (fix/compaction-handoff); this PR adds failure recovery, not a second handoff store.

Implements the approved policy: after compaction fails, stop automatic attempts until an explicit /compact retry succeeds. Keep the Session, its full history, accepted intent, and queued follow-ups; never silently discard context or force a new chat.

  • Persist typed summary/storage/provider/authorization failure outcomes in existing Session entries, and deliver the failure entry to live Host subscribers.
  • Preserve genuine provider error codes and failed-response usage metadata separately from task responses. Storage failures use a fixed sanitized message.
  • Derive suppression from durable history across restarts, including the started/run-failed fallback when publishing the terminal outcome itself fails.
  • Recheck authority for explicit retry; a successful retry releases the block. Intentional cancellation retains its existing non-blocking semantics.
  • Settle matching started/terminal compaction rows and show localized recovery guidance in the existing UI (en/de/es). Fix the touched error component's conditional-hook failure.

Verification

Tests cover one automatic attempt across repeated prompts and restart; authorized retry and revoked grants; preserved history/files/queued intent with single dispatch; cancellation; storage-failure fallback; live failed-entry delivery; failed-provider telemetry; projection and error-render transitions.

Parent review requested and checked corrections for missing live events, lost provider metadata, stale in-progress rows, and invalid hook ordering. Fresh independent parent verification after corrections:

  • Harness + backend Host + protocol + message-list + i18n: 447 passed across 64 files.
  • pnpm run check, pnpm run slop-check, git diff --check: passed.

No schema/store changes, filesystem exceptions, new Host routes, production commands, real provider calls, deployment, or merges. Live deployed acceptance remains separate from these local regression tests.

This branch has not been deployed

No deployments
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