fix: bound mixed-language incremental index work #494

Merged
buildagent merged 2 commits from fix/scoped-resolve-cost into master 2026-11-05 21:38:13 +01:00
Member

Editing a large Rust file in a project with C# and Ruby packages could spend minutes invalidating namespace imports before resolution started, then multiply scoped constant lookup by every admitted contribution. Compute the namespace-invalidation language set once and probe constant-lookup admission after references only on scoped passes. Full passes retain their existing indexed admission plan. Capability, generation, scope and namespace predicates are preserved; no schema or dependency changes.

Validation: 704 selected indexer tests passed (four ignored), including the unchanged seven-corpus cold-work gate with the required-corpus setting, Ruby lookup, scoped/full equivalence, capability and generation isolation, and the admission registry; Clippy with warnings denied and formatting passed. Both new SQLite work-bound regressions fail when their fixes are reverted (about 15-fold work growth for fourfold input growth). On the real daemon with all 11 official packages, the large-file edit returned to ready in 87.9 seconds versus the published baseline still pending after 600 seconds. Every one of 486,008 active reference targets and deciding rules matched before and after; the new declaration was independently found, with no parse errors or stage-budget degradation.

The cold-work gate caught applying the probe ordering too broadly. Restricting it to scoped passes restores Rust full scans to about 514,005 and Ruby to 247,034, within the existing baselines. No thresholds or baselines were changed.

Refs #53. This fixes the two reproduced fan-outs; the broader resolver cost-model acceptance remains open.

Editing a large Rust file in a project with C# and Ruby packages could spend minutes invalidating namespace imports before resolution started, then multiply scoped constant lookup by every admitted contribution. Compute the namespace-invalidation language set once and probe constant-lookup admission after references only on scoped passes. Full passes retain their existing indexed admission plan. Capability, generation, scope and namespace predicates are preserved; no schema or dependency changes. Validation: 704 selected indexer tests passed (four ignored), including the unchanged seven-corpus cold-work gate with the required-corpus setting, Ruby lookup, scoped/full equivalence, capability and generation isolation, and the admission registry; Clippy with warnings denied and formatting passed. Both new SQLite work-bound regressions fail when their fixes are reverted (about 15-fold work growth for fourfold input growth). On the real daemon with all 11 official packages, the large-file edit returned to ready in 87.9 seconds versus the published baseline still pending after 600 seconds. Every one of 486,008 active reference targets and deciding rules matched before and after; the new declaration was independently found, with no parse errors or stage-budget degradation. The cold-work gate caught applying the probe ordering too broadly. Restricting it to scoped passes restores Rust full scans to about 514,005 and Ruby to 247,034, within the existing baselines. No thresholds or baselines were changed. Refs #53. This fixes the two reproduced fan-outs; the broader resolver cost-model acceptance remains open.
Bound mixed-language invalidation and scoped constant lookup
Some checks failed
Package CI / package-corpus (php) (pull_request) Successful in 5s
Package CI / package-corpus (rust) (pull_request) Successful in 3s
Package CI / package-corpus (python) (pull_request) Successful in 6s
Package CI / package-corpus (ruby) (pull_request) Successful in 4s
Package CI / package-corpus (svelte) (pull_request) Successful in 3s
CI / cargo fmt (pull_request) Successful in 59s
Package CI / package-corpus (xaml) (pull_request) Successful in 3s
Package CI / package-corpus (typescript) (pull_request) Successful in 5s
Package CI / package-corpus (vue) (pull_request) Successful in 5s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / OSS corpus tier-3 scale (nightly) (pull_request) Has been skipped
CI / Grammar rebuild from source (nightly) (pull_request) Has been skipped
Package CI / package-corpus (timeline) (pull_request) Successful in 5s
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 38s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 34s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 39s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 2s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m1s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m41s
CI / cargo doc (intra-doc links) (pull_request) Successful in 8m45s
CI / cargo clippy (pull_request) Successful in 9m39s
CI / cargo deny (pull_request) Successful in 9m41s
CI / cargo check (MSRV 1.99.1) (pull_request) Successful in 12m27s
CI / cargo check (windows-gnu) (pull_request) Successful in 13m14s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 13m27s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 54m0s
CI / OSS corpus (tier 1) (pull_request) Failing after 57m30s
CI / cargo test (daemon transport) (pull_request) Has been cancelled
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
11bf002175
Refs #53. Materialize namespace-invalidation languages once and keep constant-lookup admission probes behind scoped references. Guard both query shapes with mutation-tested SQLite work bounds.
Keep cold constant lookup on its indexed admission plan
All checks were successful
Package CI / package (xaml) (pull_request) Successful in 3s
Package CI / package-corpus (csharp) (pull_request) Successful in 4s
Package CI / package-corpus (javascript) (pull_request) Successful in 5s
Package CI / package-corpus (ruby) (pull_request) Successful in 5s
Package CI / package-corpus (python) (pull_request) Successful in 5s
Package CI / package-corpus (php) (pull_request) Successful in 5s
Package CI / package-corpus (svelte) (pull_request) Successful in 4s
Package CI / package-corpus (typescript) (pull_request) Successful in 4s
Package CI / package-corpus (rust) (pull_request) Successful in 4s
Package CI / package-corpus (timeline) (pull_request) Successful in 5s
Package CI / package-corpus (xaml) (pull_request) Successful in 6s
Package CI / package-corpus (vue) (pull_request) Successful in 7s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 35s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 47s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 30s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 33s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 1s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m3s
CI / cargo doc (intra-doc links) (pull_request) Successful in 7m34s
CI / cargo deny (pull_request) Successful in 8m39s
CI / cargo clippy (pull_request) Successful in 8m53s
CI / cargo check (MSRV 1.99.1) (pull_request) Successful in 11m45s
CI / cargo check (windows-gnu) (pull_request) Successful in 12m36s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 12m40s
CI / OSS corpus (tier 1) (pull_request) Successful in 48m41s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 54m49s
CI / cargo test (pull_request) Successful in 46m52s
CI / cargo test (daemon transport) (pull_request) Successful in 8m49s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
f54a875877
Use reference-first admission probes only when resolving a scoped set. Preserve the full-pass plan and existing seven-corpus work baselines.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index!494
No description provided.