Skip to content

Views: tree-proven bases let a clean checkout rebind without re-reading files - #1020

Open
aft-alfonso[bot] wants to merge 9 commits into
land/views-f-lexical-routingfrom
land/views-tree-proven-bases
Open

aft-alfonso[bot] wants to merge 9 commits into
land/views-f-lexical-routingfrom
land/views-tree-proven-bases

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 27, 2026

Copy link
Copy Markdown

Stacked on #1017 (views step F). Behind the views switch, which stays off by default; views-off behaviour is unchanged.

Follow-up to step D, which kept every base membership-keyed and always took the full check on rebind.

  • A new tree-keyed base kind sits beside membership-keyed bases. Its identity is the full git index tree (built from the index with mode, path and conflict checks, compared against git write-tree in tests for SHA-1 and SHA-256 repositories) plus each member's Git blob OID. Index exceptions (intent-to-add, skip-worktree, assume-unchanged) refuse a tree claim.
  • A tree proof records, per member, a blob receipt bound to the bytes read: a clean checkout whose file stats match its receipts rebinds with zero file reads, through step D's existing per-file stat evidence. Any changed file is read again; a base without a holding proof, or any doubt, falls back to the full check. Membership-keyed bases never take this path.
  • An older AFT refuses a tree-keyed base under both of its rules (scope prefix and membership digest), and workers cannot register under a tree-keyed scope. The identity is specified in docs/design/views-v3-format.md.
  • Tests: a proven tree base rebinds with no reads and the indexed bytes match disk; a membership base always reads; a missing or broken proof falls back; an edited file is read while the unchanged one uses its receipt; the proof names the first check a checkout fails; the older-reader refusal.
  • Compile-checked with -D warnings on Linux; 46 views/git-index tests passed.

ualtinok and others added 9 commits October 27, 2026 01:59
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit f3c935edb548a56d523b24ce4263582e584cd53a)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 775d4d79aa7b2c4bd5a82d7a2e111abe475d2990)
…p, untested)

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 3362271a7a4527309ca2a8b8aa316364a46ca631)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit ed0172f1483cc180e4fe0a0fe789b4d25e556ff8)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 1fd271284572f785def2ecd7ba687ded8706018d)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 21536e8dceaf1fd798d813853f2216b81cbc33b1)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 9ee68f4a022572214d60cbc3df9dffb7632244d3)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit eb65b7e2034f962d24ccc2e173ef7ab670d1994b)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
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