Views: reclaim unused call-graph bases, count bases toward callgraph_copies, reclaim before refusing at the disk floor
Merged
AF
1h ago+1401+1401+0123456789012345678901234567890123456789-151-151-012345678901234567890123456789
Accepted agent delivery; branch-keyed search descriptor included.
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Reorders AFT's v3 retention so unreferenced bases are reclaimed before the accounting walk, and makes the root-history census bounded and resumable, so storage cleanup no longer stalls on long project histories. Also counts call-graph bases against views.callgraph_copies and reclaims unused databases before refusing a write for low free space.
- Base references get first turn under the reservation lock; an owed measurement no longer delays reclamation.
- Root-history scans resume across passes within a budget, restart if the directory changes, and preserve binding clocks across a completed census refresh; a partial census never authorizes deletion.
- Disk-floor admission attempts a bounded, per-family reclaim with a cooldown before refusing; refused first writes still create no store, and a reclaim that frees nothing is retried only after a 60-second cooldown.
- Shared bases count once against the copy limit with the main checkout's base exempt; identical tracked edits can reuse an existing membership base, and test fixtures isolate host Git attributes so copy-limit behavior stays deterministic.
- Adds regression tests covering retention, admission, and copy-limit cases.