Skip to content

feat(agent): add durable evolution control - #99

Merged
Pepps233 merged 2 commits into
feat/evolution-pipeline-contractsfrom
feat/durable-evolution-control-plane
Aug 23, 2026
Merged

Pepps233 merged 2 commits into
feat/evolution-pipeline-contractsfrom
feat/durable-evolution-control-plane

Conversation

@Pepps233

@Pepps233 Pepps233 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Evolution jobs now freeze their evidence and configuration inputs, persist immutable stage artifacts, and resume from durable checkpoints without duplicating writes or harness activation.

Reasoning

A manifest-first state machine with fenced leases keeps recovery deterministic across process exits and concurrent Diffex processes.

Content-addressed artifacts and stable idempotency keys separate immutable stage output from mutable job progress.

The reserved counter-slot remains disabled so this PR does not implement later Counter behavior.

Changes

  • Adds explicit job stages, terminal outcomes, machine-readable failure reasons, frozen snapshot metadata, and committed processed-evidence cursors.
  • Adds content-addressed filesystem persistence, compare-and-swap manifests, append-only ledger events, scope leases with heartbeats, stale-worker fencing, and one global writer lock.
  • Adds deterministic automatic and manual trigger policy, including the strict token threshold, settled-invocation minimum, cooldown, no-evidence response, and overlap blocking.
  • Makes the evolution pipeline stage-oriented with idempotent model, write, and activation calls.
  • Adds a bounded process-neutral background worker with cancellation, retry backoff, and an interactive-priority gate.
  • Adds explicit retention and recovery policy without adding later roadmap behavior.

Testing

  • npm run check
  • node ../../node_modules/vitest/dist/cli.js --run test/contracts.test.ts test/control-plane.test.ts test/filesystem-store.test.ts test/worker.test.ts from packages/evolution
  • ./test.sh

- Preserves frozen evidence ranges across crashes and retries
- Fences concurrent workers before cursor or harness mutation
- Proves restart safety at every executable job stage
- Covers fencing, cursor commits, triggers, retention, and worker priority
@Pepps233 Pepps233 self-assigned this Aug 19, 2026
@Pepps233
Pepps233 requested a review from Issacboy123 August 20, 2026 00:01
@Pepps233
Pepps233 marked this pull request as ready for review August 23, 2026 16:37
@Pepps233
Pepps233 merged commit 04fd1c1 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