Skip to content

fix(agent): harden evolution recovery - #106

Merged
Pepps233 merged 6 commits into
feat/evolution-runtime-integrationfrom
feat/evolution-recovery-e2e
Aug 23, 2026
Merged

Pepps233 merged 6 commits into
feat/evolution-runtime-integrationfrom
feat/evolution-recovery-e2e

Conversation

@Pepps233

@Pepps233 Pepps233 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Hardens the durable evolution pipeline end to end with validated persistence, isolated untrusted evidence, resumable failure handling, operational observability, and recovery-focused boundary coverage.

Reasoning

Durable artifacts, jobs, and ledger entries are rejected before use when their schema versions, metadata digests, or identities do not match their content.

Trace materialization isolates corrupt records, keeps cursors stable by creation order, and treats all collected evidence as untrusted model input.

Interrupted, abandoned, concurrent, and stale-lease work has explicit recovery behavior and observable outcomes, while this PR does not add post-activation evaluation or automatic regression rollback behavior.

Changes

  • Adds schema, digest, and ledger conflict validation across durable evolution state.
  • Isolates corrupt trace materialization, preserves stable evidence cursors, and marks evidence as untrusted at the model boundary.
  • Adds abandoned-job recovery, concurrent trigger attachment, stage and model-call idempotence, and explicit stale-lease behavior.
  • Exposes queue age, stage latency, budget, evidence coverage, conflict, rollback, and recovery metrics.
  • Verifies ranking, selection, disabled targets, frozen evidence, prompt injection resistance, and prompt-boundary harness refresh behavior.
  • Reports rejected manual triggers accurately in the TUI and documents recovery for every durable state.

Testing

  • npm run check
  • node ../../node_modules/vitest/dist/cli.js --run test/control-plane.test.ts test/control-service.test.ts test/curator.test.ts test/filesystem-store.test.ts test/proposal-ranking.test.ts test/reflector.test.ts test/targets.test.ts from packages/evolution
  • node ../../node_modules/vitest/dist/cli.js --run test/evolution-menu.test.ts test/evolution-runtime.test.ts test/interactive-mode-share-command.test.ts test/suite/agent-session-harness-version.test.ts from packages/coding-agent
  • ./test.sh with all workspaces passing except three reproducible timeouts in unchanged subagent-actions.test.ts and subagent-coordination.test.ts scheduling code; the run reported 2,148 coding-agent tests passed, 49 skipped, and 71 evolution tests passed
  • Controlled tmux check of startup, /evolve overview, process restart, empty-evidence recovery reporting, disabled active-job actions, and isolated session termination

- Prevents incompatible durable schemas from entering artifacts, jobs, or ledger history
- Preserves append-only event identity across retries and concurrent writers
- Keeps late or incompatible traces from shifting or blocking the frozen evidence range
- Makes adversarial transcript content explicitly non-authoritative at the model boundary
- Makes queue, stage, budget, coverage, disposition, conflict, and recovery state inspectable
- Derives operational metrics from durable checkpoints and ledger events without adding them to evidence
- Recovers abandoned work explicitly and isolates concurrent trigger and lease races
- Preserves idempotent model, tool, evidence, mutation, and prompt-boundary behavior
- Verifies deterministic selection and disabled target boundaries end to end
- Maps each durable failure state to its detection and safe recovery action
- Records observability, evidence isolation, and deferred extension boundaries
- Distinguish created, attached, and rejected manual trigger results in the TUI
- Prevent empty evidence from being reported as active background work
@Pepps233 Pepps233 self-assigned this Aug 20, 2026
@Pepps233
Pepps233 requested a review from Issacboy123 August 20, 2026 16:19
@Pepps233
Pepps233 marked this pull request as ready for review August 23, 2026 16:37
@Pepps233
Pepps233 merged commit fd9f1cb into main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant