Commit e107bea
authored
docs(plan): codemap audit --base <ref> — worktree + reindex strategy (v1.x backlog) (#51)
* docs(plan): codemap audit --base <ref> — worktree + reindex strategy (v1.x backlog)
Plan for the next-best agent-value loop: PR-review structural-diff. Replaces today's 3-step --baseline dance with one verb. Reuses 90% of the existing audit infrastructure (PR #33); only new piece is the worktree+reindex snapshot path.
Cache-by-resolved-sha; LRU 5/500 MiB; mutual-exclusive with --baseline; per-delta override compatible. Hard error on non-git projects (no graceful fallback — there's no meaningful 'ref' without git).
Plan only — implementation follows after CodeRabbit review per the impact (#49→#50) / watch (#46→#47) workflow.
* docs(plan): address CodeRabbit findings — atomic cache populate (D11), worktree-as-cache lifecycle clarity, TS type widening callout
- D1/D2/D8 rewritten: worktree IS the cache entry (kept until LRU evicts);
cleanup runs only on reindex failure rollback OR LRU eviction. The
earlier ambiguity (D2 said 'cache by sha' while D8 said 'remove in
finally') is resolved.
- D11 added: atomic cache populate via per-pid temp dir + POSIX rename
→ free single-flight semantics; no lock files needed. Same pattern
for eviction. Closes the race CodeRabbit flagged on concurrent
CI matrix runs against the same sha.
- AuditBase TS type widening to discriminated union called out
explicitly above the Decisions table (Tracer 1 ships it).
- CODEMAP_AUDIT_CACHE_SIZE env var mention dropped — was promising an
unimplemented config knob; v1 hardcodes the limits, defer to v1.x+.1 parent 90092ae commit e107bea
2 files changed
Lines changed: 133 additions & 1 deletion
0 commit comments