Skip to content

refactor: remove the legacy transcript reconcile path - #1243

Merged
jalehman merged 2 commits into
mainfrom
refactor/remove-legacy-reconcile
Oct 11, 2026
Merged

jalehman merged 2 commits into
mainfrom
refactor/remove-legacy-reconcile

Conversation

@jalehman

@jalehman jalehman commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1239. Review #1238 and #1239 first.

What

This PR deletes the legacy full-transcript reconcile path. That path covers the projection reconcile, transcript-anchor audit, unstamped-row adoption, legacy-prefix epochs, import caps, and runtime-batch dedup/alignment. Since #1238, nothing on a supported host reaches it. Store methods, helpers, and tests that only this path used are removed too. Net change: about 6,800 lines removed (src: +18 / -2,982).

Why

#1238 moved transcript ingestion to OpenClaw's visible-delta cursor. Every supported OpenClaw release (>= 2026.9.2) ships the delta reader. A host without it now gets a logged capability error instead of a fallback. The old code stayed in the tree with skipped tests, and nothing could execute it. Keeping it meant maintaining roughly 3k lines of the riskiest code in the plugin for no runtime benefit.

Changes

  • Engine: removed the projection reconcile, anchor audit, and afterTurn/commitTurn runtime-array paths
  • commitTurn always drains the delta and throws if the admission has no read target
  • afterTurn without a session key logs and skips persistence, as before; heartbeat pruning and compaction still run
  • Deleted src/transcript-anchor-audit.ts and src/reconcile-plan.ts
  • BatchDeduplicator now only provides matchesPersistedAnchor, which ingest uses
  • Removed 12 ConversationStore methods that only the dead path called, plus their row types
  • Removed transitive dead exports (messageContentCoveredBySummary, filterByCreatedAt, transcriptTimestampMs, messageIdentity)
  • Tests: removed skipped legacy tests and unit tests of dead code
  • Tests: the redaction and externalization cases now target matchesPersistedAnchor directly
  • The doctor command tests seed and read anchor-trust/epoch rows with SQL
  • Marked specs/transcript-reconciliation-by-entry-id.md superseded

Still live and unchanged: the ingest/ingestBatch runtime path for sessions without a session key, and the full visible read used by the overflow-recovery coverage check and the replay-key backfill.

Data retention (follow-up)

No schema change. conversation_transcript_epochs no longer has a writer. message_transcript_anchor_trust is still written by ingest and by migrate-sessions. The doctor anchors and rollover-splits commands still read and merge both tables for existing databases. Whether to retire either table is a separate data-retention decision.

Testing

  • npm run typecheck and npm run build: pass
  • npx vitest run --dir test, run 1: 132 files, 2057 tests passed
  • Run 2: 2056 passed and 1 failed, the known plugin-tool-session-scope load flake
  • npm run plugin-inspector:ci -- --openclaw <openclaw v2026.9.4>: PASS, 0 breakages
  • autoreview (branch mode against feat/assemble-replay-keys-from-storage): no findings
File Change
src/engine.ts Remove legacy reconcile, audit, and runtime-array turn paths
src/batch-dedup.ts Keep only persisted-anchor matching
src/store/conversation-store.ts Drop adoption, epoch, and audit store methods
src/transcript-anchor-audit.ts, src/reconcile-plan.ts Deleted
src/live-coverage.ts, src/transcript.ts, src/message-signatures.ts Drop now-unused helpers
test/batch-dedup.test.ts Rewritten around matchesPersistedAnchor
test/transcript-anchor-replay.test.ts Externalized case targets matchesPersistedAnchor
test/transcript-anchor-trust-store.test.ts, test/lcm-command.test.ts Read/seed legacy tables with SQL
test/sqlite-bootstrap-projection.test.ts, test/engine-commit-turn.test.ts Remove skipped legacy tests
test/transcript-adoption, whitespace-divergence-double-write, transcript-anchor-audit, reconcile-plan, batch-dedup-frontier-loglevel tests Deleted
specs/transcript-reconciliation-by-entry-id.md Marked superseded
.changeset/remove-legacy-transcript-reconcile.md Patch changeset

@jalehman
jalehman force-pushed the feat/assemble-replay-keys-from-storage branch from 1c77bf8 to 60cd216 Compare October 9, 2026 04:21
@jalehman
jalehman force-pushed the refactor/remove-legacy-reconcile branch from 43ca4b6 to 45ab1cb Compare October 9, 2026 04:22
@jalehman
jalehman force-pushed the feat/assemble-replay-keys-from-storage branch from 60cd216 to 5b58224 Compare October 11, 2026 06:20
@jalehman
jalehman force-pushed the refactor/remove-legacy-reconcile branch from 45ab1cb to 2f8f9aa Compare October 11, 2026 06:26
@jalehman
jalehman changed the base branch from feat/assemble-replay-keys-from-storage to main October 11, 2026 06:26
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