Relationships
#3281 datastore setup strands repo-local audit history and run logs in the new datastore
Opened by stack72 · 10/12/2026· Shipped 10/12/2026
What happens
swamp datastore setup filesystem moves data into the new datastore that its writers and readers never look for there:
- Audit. Setup copies the repo's
.swamp/audit/into<datastore>/audit/and then removes the source (cleanupSourceDirs,src/libswamp/datastores/setup.ts:462). The command-audit and vault-audit repositories always read and writeswampPath(repoDir, "audit")(jsonl_audit_repository.ts:48,jsonl_vault_audit_repository.ts:43). After setup,swamp auditandswamp vault audit-traillose every entry recorded before setup, and new entries go back to.swamp/audit/. - Run logs. The
.logfiles beside run and output records in.swamp/outputs/and.swamp/workflow-runs/are copied with those trees and removed from the source. Run records storelogFilerelative to the repo (pointing into.swamp/...), and logs are written repo-local whatever the datastore (swamp-club#3266). Soswamp workflow history logsandswamp model method history logsshow older runs as empty after setup.
Expected
Repo-local files survive setup where their readers look: either setup leaves audit/ and run .log files in .swamp/, or the readers find the migrated copies.
Evidence
Found by code trace during swamp-club#3278 (v3 home for the stream directories). The delete-after-copy path is confirmed in code. It has not yet been reproduced against a compiled binary: that is the first step for whoever picks this up.
Out of scope
Setup into the current datastore itself (--path .swamp) migrates nothing (swamp-club#3162). An external filesystem datastore used as the source is copied, never cleaned (swamp-club#3238).
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.