Skip to content

2026.08.23 - DCP Reliability Troubleshooting - Phase 5: Persistence Lifecycle - #60

Merged
lanhhoang merged 3 commits into
masterfrom
20260823-dcp-reliability-troubleshooting-phase-05-persistence-lifecycle
Aug 24, 2026
Merged

2026.08.23 - DCP Reliability Troubleshooting - Phase 5: Persistence Lifecycle#60
lanhhoang merged 3 commits into
masterfrom
20260823-dcp-reliability-troubleshooting-phase-05-persistence-lifecycle

Conversation

@lanhhoang

Copy link
Copy Markdown
Contributor
  • Replace the durable fingerprint with a projection that omits the entire messageIds object, so message-reference growth alone no longer forces a pi-dcp-state write (src/state/persistence.ts).
  • Keep snapshot v1 serialization unchanged: serializeDcpSnapshot() still emits messageIds.byRawId and messageIds.nextRefIndex, so persisted snapshots remain byte-compatible with earlier versions.
  • Add fingerprint regressions proving that messageIds bookkeeping is excluded while every semantic mutation (manualMode, compressPermission, stats, lastCompaction, prune.tools, nextBlockId, nextRunId, nudges) still changes the fingerprint (tests/persistence.test.ts).
  • Add reconstruction regressions covering same-owner resume, sibling-branch tree navigation in both directions, compaction followed by a restarted extension instance, and compression-block boundaries rebuilt after omitted ID-only checkpoints (tests/stable-ids.test.ts, tests/index.test.ts, tests/pipeline.test.ts).
  • Replace the obsolete "persists one context mutation and skips an unchanged repeated pass" expectation with two contracts: growing contexts that change only message IDs append zero entries, and a context pass that adds a context-limit nudge anchor appends exactly one entry with the full snapshot payload (tests/index.test.ts).

Verified end-to-end with pnpm vitest run (481/481 tests) and pnpm typecheck on commit 390c2ab.

Historical corpus projection over the ten session JSONLs named in docs/superpowers/specs/2026-08-22-dcp-troubleshooting-design.md Appendix A remains 692 states total, with semanticCheckpoints at 56 — no historical file was rewritten.

@lanhhoang
lanhhoang merged commit ad43805 into master Aug 24, 2026
1 check passed
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