land: views-incremental-manifest

Merged
AF
1d ago
+2682-96

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Makes view publications incremental: a one-file edit reuses cached manifests and HEAD listings, validates only new blob keys, and skips re-reading unchanged files while the blob stores' removal stamps and database identities match.

Previously every publication rebuilt the full manifest from scratch. Now a cached manifest is trusted only when removal counters, HEAD tree, index stamp, and identity-admission snapshots all agree; when a change is missed or ambiguous, it falls back to a full rebuild and verification. A full cross-check still runs on the first publication after restart, every 64 publications, or after 10 minutes of quiet, and watcher rescans keep their sticky whole-checkout intent through later path events.

  • Adds a deletion-trigger counter and incarnation identity to blob stores to detect external removal, GC, or store recreation.
  • Fences trust against directory rename/remove events, ambiguous path spellings (case and Unicode), modified .gitattributes, and new live SQLite database aliases.
  • Quiet roots wake themselves at the verification deadline even with no watcher receiver; active preparations suppress the idle pump.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues remain.

Summary

View publications reuse cached manifests, HEAD listings, and unchanged-file metadata. Blob removal stamps and periodic full reads limit when that cached data can be trusted.

Changes since the last review:

  • One-file edits reuse saved view data when its evidence still matches.
  • Quiet views get full checks, and rescans keep the next read complete.

Both earlier, unnumbered findings are addressed. Both threads were manually resolved without an explanatory reply by ualtinok. No new actionable issues were found. Tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Begin preparation] --> B[Keep verification state and epoch]
  B --> C[Build or reuse manifest]
  C --> D[Commit publication]
  D --> E{Epoch still matches?}
  E -->|Yes| F[Remember manifest]
  F --> G[Evict oldest cache if over 16 roots]
  E -->|No| H[Do not restore released cache]
  I[Runtime closes or cache is released] --> J[Advance epoch and remove cache]
  J --> E

Reviews (2) · Last reviewed commit: "mason: isolate view fixtures for paralle..." · Reviewed by Greptile