Repository navigation
Views: idle reaper releases views; semantic and parent-folder view failures counted in health - #1216
Merged
Merged
Conversation
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Keep Python import bindings scoped to each call, resolve dotted and package-relative modules from the project root, and persist bindings for manifest views. Unresolved imports stay unresolved instead of binding unrelated same-named functions. Bump store output and extraction producers to rebuild older graphs and cached blobs once. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…#1126) Use span-sorted bindings for logarithmic per-call lookup. Correct the new regression's expectation to include the existing hidden-test caller note; no existing test contract changed. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Reject bare-name method fallback for imported module-level functions. Correct the new protocol fixture to use includeTests and distinguish total callers from visible callers, retaining the existing hidden-test contract. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
#1130) Build on the bounded zero-caller count from PR #1128. Keep its zero-caller wording and broad count unchanged, but count only matching short names for nonempty callers and impact answers, with the same SQL cap of 1000 and test filtering. Include the reporter's passing TypeScript control. Positive Python fixture assertions now allow the newly required incomplete-note prefix. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
) Nonempty caller answers now require one matching-name count SELECT. Update the exact total budget from seven to eight while retaining the one caller query and three boundary queries for 1000 callers; the constant-work batching contract is unchanged. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Preserve main's #1124 Rust resolver and #1128 empty-callers fixes. Use build-output v22 and active-view producer v13 after main's v21/v12. Keep the approved nonzero warning byte-for-byte, pinned by the protocol test, and use the requested release-note filename and text. 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>
Rust stores the qualified short name for this call, so the new assertion must select its callee_last_segment instead. This keeps the same unresolved-call contract and does not change resolver behavior. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Use the snapshot-scoped prefix index in eager and lazy ProjectIndex as well as the cold resolver. Inspect-triggered dead-code refreshes use the lazy index; manifest/view joins use the eager one. Preserve caller/path order and language filtering, and test candidate counts plus fresh caller overlays. PR1150 already memoizes the separate module-parent and caller-module-path lookups. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…4325bf3265c-1174-regression-subc-daemon-never-connects-in-su Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Vendor replies and README at fec01fef, with split provenance retaining the request contract at 0025bdf6. Queue replies remain fixture-only pending merge-queue routing approval. Treat not_sent as safety evidence, not an instruction to loop: only transport_unknown and lease_expired pre-reads get one same-nonce retry within the shared deadline. Keep write outcome_unknown and sent-step reporting unchanged. Update existing module deadline tests because a not_sent request_deadline_exceeded now stops immediately rather than retrying to success or budget exhaustion. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit cba52c49ea54d6745631cf2bd5e28a0f5fafcbd1)
Preserve exact tokenizer counts: the requested 128 KiB fixtures take 10-156 ms in a debug build on current main, with heap BPE already avoiding the legacy quadratic scan. Guard latency at 500 ms and pin the 40,280-token normal-log baseline. Killed and timed-out tasks now use the existing skipped-metrics state, keeping sequential reclaim kills free of raw and rendered output tokenization. Normal successful and failed command completions retain counts and their existing output presentation. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 394c0c4b34d2dd04e4df343e9c979fb974a5bfa0)
Root cleanup can kill descendants of an already-Completed task, and a memory-limit kill uses Failed. Carry an explicit internal skip policy through both kill publication passes and deferred descendant publication, instead of relying on Killed/TimedOut alone. Preserve count-bearing ordinary completion frames and assert skipped metrics on reclaim and a Completed-status kill takeover. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 1594ea7c6df4239b938044d7aca207a2bace01ba)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 9362a5fd8b6052eb504ce655aaf467c872cdd444)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Give governed writes 160 seconds from enqueue: Plexus's 120-second claim lease plus one final 30-second vendor call and 10 seconds margin. Raise only the governed client ceiling to accommodate preparation and cleanup; retain short reads and cancellation/scope/drain terminals. Retry one provably pre-send reachability failure after four seconds within the existing preparation deadline. Preserve refusal text, final admission checks, and the invocation nonce; never retry an uncertain write. The production timeout assertion deliberately changes from 30 to 180 seconds for governed exchanges; a separate assertion preserves the 30-second read ceiling. No cross-invocation nonce reuse is introduced. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 1d6a3467979b0dfc0f1780ccf42571076d1621fa)
The published SDK ignores send options.timeout for a reserved request. Reserve through the latest possible reply, bound reservation and enqueue by preflight, then bound PendingReply at exactly send plus 160 seconds. The scaled slow-reply regression exposed the shared SDK deadline. Preserve route-open reachability provenance without retrying real route-open refusals or changing their public refusal reason. Non-retryable local availability failures retain their existing relay reply too. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 208515d3e799c730f91fe90ad80701deb36777d9)
A timed-out request clears the failed consumer, so a closed socket need not deliver the route GOODBYE to a delayed fake provider. Assert the actual local cleanup guarantee instead: the already-sent write remains unknown, is never resent, and its lease is promptly released. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 193ae58cbf5a25097c9c1d7bfb47f880a6da89d8)
The shim's management bindings_read preflight can also encounter a Plexus restart before dispatch. Retry only a typed reachability failure once after four seconds, under the existing 20-second binding-read ceiling. Preserve terminal refusal code and text, and never retry a real no_binding_row refusal. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit d5ebd1d4159801ffc8d3dff6fe06c63fdcd0d3a6)
Use a 210-second shared governed exchange ceiling. Do not dispatch with less than 175 seconds remaining: daemon preflight (9.75 seconds), post-send reply (160 seconds), and bounded route cleanup (5 seconds). Explicit debug/test timing overrides retain their shortened budgets. When a late known refusal leaves too little time for a retry, return GovernanceUnavailableTimedOut at Request, reusing the approved governance_probe_timeout_text line: the command was not run; retry. A controllable-clock regression asserts exactly one dispatch and the not-sent outcome, rather than outcome_unknown. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit fd5af413cd850aeeda75d462d406e804f4685883)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
… loaded runners Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Treat late and unversioned publications as uncertified rather than checked-clean. The late-close regression now requires the stored clearing report to be stale, replacing its former control assertion that the unversioned report was current. Proposed partial-reason wording requires operator approval before merge. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 4b7085371a9ce89caf9ffcc22aa4bd52fa40ec7e)
Recheck post-edit snapshots and request-local reports against current content. Use a scalar reopen-version floor rather than retaining closed paths. Synthetic authority fixtures now explicitly certify real fixture content; protocol fixtures sync the versions they claim. Closing a document no longer proves it clean, so the clean-empty fixture sends a versioned current publication instead. Related unversioned pull reports remain retained but uncertified, and reopen tests require increasing versions. Hashing sent text avoids the former disk reread, so the shared-sync read-count fixture now expects zero rereads. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 09d73cb5a00c8f57f84b99dc7623edadd62bbde5)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit a4647bb5f66f532424ef5201262a8fddf5d4ebd4)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit b1027f8dd98c830cc5359743b06afdccb6b94aa5)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 31d1f13824533fb29e107c3ed9368bbedde8ac4f)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…pproved Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
… land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> # Conflicts: # crates/aft/src/commands/semantic_search/mod.rs # crates/aft/src/context.rs # crates/aft/src/views/callgraph.rs
…' into land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…nto land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…d/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…to land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…d/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…into land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…rain-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> # Conflicts: # crates/aft/src/exec_remote/wire_tests.rs
… land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…rain-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
… land/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…rain-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…nd/train-views-batch-1 Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…t path only) Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…iew errors #1154 added completion_busy to CallgraphViewError after the import branch was cut. The import's unbound and import-building errors stay plain busy errors, as each branch tested them. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
try_evict_idle_artifacts, the non-blocking path the daemon's idle reaper uses, released every resident handle except the views. An idle root kept its installed view snapshots and call-graph reader, which keeps its v3 members protected, so storage retention could never evict them for disk budget. Release them as evict_idle_artifacts does, dropping the views on the release thread. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Ufuk's ruling: with views on, every view failure is counted in AFT's health report, not only shown in a reply. Checkout lexical and call-graph loads were counted; three paths were not: - A built semantic view whose index can't be served, or whose search fails, now records a semantic view load failure (counted, last error kept, project degraded, error log throttled) alongside the reply's gap. - The semantic worker no longer discards index build failures at load and after each fill; it logs them, and the next query counts them. - A parent folder's worker records child view open and read failures (lexical, call graph, semantic, inspect) under the parent root, and the parent root's health reports them. Unpublished views and busy stores are normal coverage or contention and are not counted. The parent-wide embedding model failure is now logged too. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
… only) Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
A locked or busy SQLite store, or a child that changed mid-read, clears by itself and the worker or the next query retries it. Use the semantic runtime's transient classification for the parent and semantic sites so contention never counts as a failed view. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
bash_deadline_distinguishes_own_admission_from_same_id_blocker read the executor's job snapshot once per refusal. That read is a try-lock; when the scheduler held its lock at that instant (Windows merge-queue run), the refusal fell back to the generic sentence by design, and the 'other job' assertion failed. Each refusal now retries, for up to 10 s, until a read gets through. Assertions are unchanged. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…it/aft into land/views-default-prep Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Every caller of wait_for_fill_queue expects the fill to queue, so the bound only matters on failure. Saving chunks before cold readmission took over 3 s on a loaded Windows runner, failing semantic_batch_lease_durable_chunks_reused_during_cold_readmission. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
With views on, every grep, glob, aft_search and call-graph query ran a full verified bind: it captured a new bind guard (ignore-input walk, a git HEAD subprocess, a read and hash of the Git index), rebuilt the live delta over every member and installed it. Lexical queries then rebuilt the whole search index from scratch, decoding every file's payload and stat'ing every file. Under parallel load each search held the view's query lock for 1 to 3 s and every tool on the project queued behind it (load check: 19 s waits). The checkout driver already moves its revision on every recorded change, directory write, overflow and subscription gap. A query whose driver reports the cut as steady (healthy watcher under the subscription the cut was verified with, no pending or in-progress AFT write, steady coverage proven) at the same revision as the last bind now reuses that bind: the lexical view its projection, the call-graph view its reader. Anything else binds as before, so unwatched checkouts still bind strictly on every query. 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.
Stacked on #1212 (views import + batch); after #1212 merges this shows only its own three commits.
Idle reaper releases views. When the daemon's idle reaper evicts a project's artifacts, it now also drops the project's lexical and call-graph views. Before, a reaped project kept its views open, so it kept protecting their stored members and retention could never reclaim that space.
View failures counted in health (Ufuk's ruling: with views on, every view failure shows in AFT's health report, not only in a reply). Checkout text and call-graph loads were already counted; three paths were not:
semanticview load failure (counted, last error kept, project degraded, error log throttled) alongside the reply's existing gap. Reply text is unchanged.parent_<plane>:<cause>.Contention (a busy or locked store, a checkout changed mid-read) clears by itself and is never counted. Unpublished views are normal coverage and aren't counted either.
Tests. A semantic view that can't serve reaches health with its full error and marks the project degraded; parent child failures reach the parent root's health while a locked store doesn't count. On the build server: 232 view, health, parent, semantic-runtime and eviction lib tests, formatting, and the Windows check passed.
Views are off by default, so no user-visible change today.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
The
land/views-default-preplanding unit bundles approved views-on changes (views import, Python cross-file callers, cold call-graph index with bounded workspace walks, runon reattach, pinned task image, inspect freshness, Plexus wait and pre-read, token skip, lease heartbeat cadence, bash admission and subc startup diagnostics, and test-only flake fixes), plus two views-on adjustments.Idle reaper releases views — When the daemon's idle reaper evicts a project's artifacts, it now also drops the project's lexical and call-graph views. Previously a reaped project kept its views open, so their stored members stayed protected and retention could not reclaim that space.
View failures counted in health — With views on, every view failure now shows in AFT's health report, not only in a reply:
semanticload failure (counted, last error kept, project degraded, log throttled); reply text is unchanged.parent_<plane>:<cause>.Views are off by default, so no user-visible behavior change today.
Written for commit 9c9b76a. Summary will update on new commits.