Wave 4: ConversationArchive — custody of the vendor's session tree #52
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/claude-code-query!52
Loading…
Reference in a new issue
No description provided.
Delete branch "wave-4-conversation-archive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements ADR 0001 decision 8 (custody, not attribution) and proposal §2.4. Stacked on #51.
What's here
ConversationArchive[F[_]]port incore/logfollowingConversationLogReader's tagless idiom:forSession/entries/subagentEntries/mirror, with a typedArchiveErrorchannel.ArchivePaths(locates by encoding the configured cwd viaProjectPathEncoder— never decodes a directory name; the encoding is lossy) andMirrorPlanner(copy/extend/recopy/skip plan computed from file listings as data, unit-tested without IO). The planner iterates source files only, so vendor-pruned files are never touched in the archive — custody by construction.ZioConversationArchiveadapter: interprets the plan with file IO; append-extension reads bytes and appends only when the mirrored content is a true prefix of the source, falling back to full recopy on any divergence or shrink. Per-file failures are recorded inMirrorReport.failedinstead of aborting a half-done mirror. Entry streaming delegates toZioConversationLogReader, soRawLogEntrydrift-tolerance is reused, not re-implemented; subagent join reusesConversationLogIndex.listSubAgentsvia the meta.jsontoolUseId(additive field onSubAgentMetadata).subagents/*.jsonl+*.meta.json.ArchiveConfig(vendorProjectsDir, archiveDir, cwd)keepsCLAUDE_CONFIG_DIRconfigurable.Known, deliberate limits (from the ADR's "does NOT settle" list)
Verification
Full
./mill __.compile+ all unit tests +zio.itest/core.itestgreen, including the real-CLI E2E: a live one-shot query withCLAUDE_CONFIG_DIRpointed at a temp dir, then locate → entries → subagentEntries → mirror → idempotency → extend → shrink-recopy against the transcript the CLI actually wrote. Reviewed by four dimension reviewers plus adversarial verification; all 5 confirmed findings fixed (incl. reuse of the index's subagent join and mirror non-atomicity hardening).🤖 Generated with Claude Code
Superseded by the consolidated PR #53 (single review over the full ADR 0001 implementation); the branch and its per-wave review history remain.
Pull request closed