Carry the records kept by 0.6 into the layout 0.7 reads #96
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!96
Loading…
Reference in a new issue
No description provided.
Delete branch "tools/copy-kept-transcripts"
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?
Why
0.7 keeps a record by its session id, under the installation its CLI ran in, and does not read the cwd-keyed layout 0.6 wrote. A dashboard that upgrades therefore loses every page older than the vendor's own retention until its old archive is carried across. The live Gladys dashboard had 3660 such records, 1.8 GB.
What this adds
tools.CopyKeptTranscripts— unpublished, built againstcore, so the layout it writes cannot drift from the layout the library reads:<id>.custody.jsonrecords when the old custody last held the record — the source file's modification time — not when the copy ran.--writeit reports what it would do and writes nothing.Eleven tests cover the above, including that the source is left untouched and that a disagreeing copy is reported rather than merged.
Also here: custody restricts the files it writes itself
ArchiveMirrorrestricted the kept directories to their owner but left the installation marker and each record'scustody.jsonwith the umask's permissions, leaning on the directory alone. Both are nowrw-------, set with the directories on every keep, so an installation that has them from an earlier version is repaired by its next keep. One test, proved fallible by mutation.Run against the live data (2026-10-19)
A second run reports all 3660 present and writes nothing. The old tree is untouched, for Michal to delete by hand when he is satisfied.
~/.claude-archive(11 records of the cc-chat demo) is not copied: which installation those belong to is undecided.Verification
./mill __.compile,__.test,__.checkFormatand__.fix --checkare green.🤖 Generated with Claude Code