Skip to content

Views: reclaim unused call-graph bases, count bases toward callgraph_copies, reclaim before refusing at the disk floor - #1305

Merged
ualtinok merged 10 commits into
mainfrom
land/views-reclaim-unreferenced-bases
Nov 2, 2026
Merged

ualtinok merged 10 commits into
mainfrom
land/views-reclaim-unreferenced-bases

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


View with [code]smith Autofix with [code]smith
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.

Written for commit d0c79a9. Summary will update on new commits.

View guided diff Turn on auto-fix

ualtinok and others added 9 commits November 2, 2026 02:58
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…enced-bases

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@aft-alfonso aft-alfonso Bot changed the title land: views-reclaim-unreferenced-bases Views: reclaim unused call-graph bases, count bases toward callgraph_copies, reclaim before refusing at the disk floor Nov 2, 2026
Git for Windows ships a system gitattributes file. Its presence correctly disables reusable tree proofs, so these fixtures built membership bases and admission reserved a second database instead of reusing the main base. Shared bases still counted once, and deterministic LRU timestamps were ordered correctly; the extra reservation caused early borrowing and eviction of the newest idle base.

Use the existing thread-local absent-attribute-sources guard for the shared fixture and the original copy-limit test. Keep the guard alive through all reads and admissions. This makes their shared-tree-base premise deterministic without changing product behavior, assertions, waits, or eviction protections. Native Windows baseline: 4 passed, 3 failed, including the original #1254 test.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 1054daa Nov 2, 2026
92 checks passed
@ualtinok
ualtinok deleted the land/views-reclaim-unreferenced-bases branch November 2, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant