You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #146 (JSON-family sidecar backend). Two threads:
1. Harden the JSON store
Cross-process write locking: serialise concurrent writers to a json sidecar (the SQLite path serialises via the DB write lock; the json path was single-writer-by-assumption). Dependency-free advisory lock file (<path>.lock) with backoff + stale-lock steal; RAII release.
Atomic writes: formalise the temp-file + same-dir rename durability already in save(), held under the write lock across the load→mutate→save cycle.
2. Wire the stub CLI subcommands
provenance <entity>: list the entity's provenance chain and report verification (verify_chain) + any fork points. Both sqlite and json backends.
history <entity> [--at T]: list temporal versions (or the point-in-time snapshot at T) for the entity. Both backends.
Cross-process write locking — dependency-free advisory <path>.lock (O_EXCL, retry/backoff, stale-steal, RAII release) via json::with_locked, held across load→mutate→save; gc apply runs through it. Atomic temp-file + rename durability documented.
provenance / history CLI wired for sqlite + json (postgres refuses); end-to-end test (tests/sidecar_cli_test.rs) seeds via the locked write path and drives the binary.
One item not completed: the .claude/settings.json permission allowlist was blocked by the agent self-modification guardrail (an agent can't widen its own permissions). It needs to be added by a maintainer directly if desired — everything else in the acceptance is done.
Decision record added: ADR-0013 (docs/decisions/0013-json-sidecar-cross-process-locking.adoc) now documents this hardening — the cross-process advisory lock, atomic-rename durability, and the wired provenance/history CLI — framed as refiningADR-0012 (the F3 JSON-family backend). ADR-0012's single-writer note was updated to point at it, and a CHANGELOG.md entry added (#153). No reopen needed — #150 stays closed/completed (implemented in #151).
Activity
hyperpolymath commentedon May 30, 2026
Closed by #151 (
00fd80f). Delivered:<path>.lock(O_EXCL, retry/backoff, stale-steal, RAII release) viajson::with_locked, held across load→mutate→save;gcapply runs through it. Atomic temp-file +renamedurability documented.provenance/historyCLI wired for sqlite + json (postgres refuses); end-to-end test (tests/sidecar_cli_test.rs) seeds via the locked write path and drives the binary.examples/json-sidecar/, version0.1.0→0.2.0+ CHANGELOG.One item not completed: the
.claude/settings.jsonpermission allowlist was blocked by the agent self-modification guardrail (an agent can't widen its own permissions). It needs to be added by a maintainer directly if desired — everything else in the acceptance is done.Generated by Claude Code
docs(adr): ADR-0013 — json sidecar cross-process locking (V-L2-F4) (#153
hyperpolymath commentedon May 30, 2026
Decision record added: ADR-0013 (
docs/decisions/0013-json-sidecar-cross-process-locking.adoc) now documents this hardening — the cross-process advisory lock, atomic-rename durability, and the wiredprovenance/historyCLI — framed as refining ADR-0012 (the F3 JSON-family backend). ADR-0012's single-writer note was updated to point at it, and aCHANGELOG.mdentry added (#153). No reopen needed — #150 stays closed/completed (implemented in #151).Generated by Claude Code