Repository navigation
land: views-fewer-stat-walks - #590
Merged
Merged
Conversation
Keep mutable SQLite and marker files freshly measured while reusing immutable v2 generation artifact sizes with directory-identity invalidation and six-hour reconciliation. Preserve inode and symlink checks for live SQLite aliases; only eliminate provably redundant walker metadata probes. Add old/new byte and membership parity fixtures, eviction and lstat-count tests, and a non-ranking search-quality descriptor. Existing test contracts are retained. Native macOS and linux,4c counter tests pass; detailed measurements and red controls are in the delivery record. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…membership stat counts View size caches now live on the shared registry inner (FamilyRegistry::view_size_caches) instead of a process-global map keyed by registry path, so a closed family's caches drop with its last registry handle. New test size_caches_drop_with_their_registry. membership_checkout_stat_counts asserted exact paths and stat counts across walks of the live working checkout, which an editor or concurrent job could break between walks. The exact assertions moved to membership_walker_stat_counts on a private tempdir; the live-checkout measurement remains as an #[ignore] benchmark that only prints counts. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit ec9fca36d6b3666757fa18818237d3372fef9ddf)
On a real checkout the membership walker saves no lstat calls (the trimmed probes only apply to excluded paths and special files a typical tree lacks). Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
The membership admission tests run on Unix only, so their stat-probe and legacy-walker helpers were dead code under the Windows test build. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
ualtinok
force-pushed
the
land/views-fewer-stat-walks
branch
from
October 19, 2026 16:18
ad5d788 to
f234366
Compare
jacobocasado
pushed a commit
to starredjaco/aft
that referenced
this pull request
Oct 20, 2026
The drain tests read `lsp shutdown_all: servers=N` from the module's exit phase. When the connection ends, the teardown used to quiesce every root by detaching its clients to a per-root background reap thread. Each thread waits 25 ms for Shutdown, then terminates its server. The exit phase then found every manager empty (`phase=lsp_shutdown servers=0`) and counted only the pids those threads had not reaped yet. If the main thread stalled for about 100 ms after quiesce on a loaded runner, all servers were gone, and the summary read `servers=0 ... elapsed_ms=0` (macOS integration shard, main 396d0bf). The race dates from 83f7adb, the commit that added the quiesce of root servers. cortexkit#588 and cortexkit#590 do not touch LSP lifecycle. Connection teardown now closes start admission but leaves the clients in their managers (QuiescedLsp::LeaveForExitSweep). The exit phase in run_subc_mode_inner takes them all under its one shared budget, as before. A route goodbye during a session, and loop callers with no exit phase behind them, keep the background reap (QuiescedLsp::ReapInBackground). The drain test assertion goes from `servers >= 3` to exact equality: the exit phase must take every root's server, and the summary must count all of them. With ownership causal, the count no longer depends on timing. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
jacobocasado
pushed a commit
to starredjaco/aft
that referenced
this pull request
Oct 20, 2026
Write .alfonso/release-notes/v0.61.0.md from the first-parent merges since v0.60.0 plus the three queued PRs (cortexkit#588, cortexkit#590, cortexkit#578). Empty next-notes.md and delete the next/ fragments that are on main; the three queued branches' fragments are not on main and are left for their PRs. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
jacobocasado
pushed a commit
to starredjaco/aft
that referenced
this pull request
Oct 20, 2026
…v0.61.0 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
jacobocasado
pushed a commit
to starredjaco/aft
that referenced
this pull request
Oct 20, 2026
Rebase the release prep onto origin/main 3faaded and extend .alfonso/release-notes/v0.61.0.md to cover the merges after cortexkit#590: cortexkit#578, cortexkit#596, cortexkit#600, cortexkit#601, cortexkit#612, cortexkit#613, cortexkit#614, cortexkit#616, cortexkit#617, cortexkit#618, cortexkit#619, cortexkit#620, cortexkit#622 and cortexkit#623. Fold and delete the 27 next/ fragments those merges added. Credit cortexkit#465 (@null-axiom) and cortexkit#564 (@iceteaSA), and extend the cortexkit#577 line with the shell timeout task-id fix. Refresh ANNOUNCEMENT_FEATURES in both plugins. Pi leaves out the OpenCode 2 permission line, which does not apply to Pi users. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accepted agent delivery; branch-keyed search descriptor included.
Summary by cubic
Cuts redundant metadata probes during view disk-limit enforcement by caching sizes of immutable v2 generation artifacts between passes, while keeping mutable SQLite files and markers freshly measured.
manifest-*,trigram-*, andderived-*sizes are reused across passes; SQLite files, pins, and markers are still measured each pass.Written for commit f234366. Summary will update on new commits.


Confidence Score: 5/5
The PR appears safe to merge, with a non-blocking test isolation issue.Findings
Summary
This PR reduces repeated file metadata checks during disk-limit enforcement and project walks.
Both earlier, unnumbered threads were manually resolved without explanation. The current code addresses their original concerns: caches follow the registry's lifetime, and checkout-wide measurements no longer make exact assertions.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Measure family"] --> B["Take registry-owned caches"] B --> C{"Directory changed or refresh due?"} C -->|Yes| D["Clear cached sizes"] C -->|No| E["Walk view directory"] D --> E E --> F["Reuse published artifact sizes"] E --> G["Measure mutable and uncached files"] F --> H["Check directory again"] G --> H H --> I["Keep only complete, stable cache entries"] I --> J["Return caches to registry"] J --> K["Apply disk budget"]Reviews (2) · Last reviewed commit: "Gate Unix-only membership test helpers t..." · Reviewed by Greptile