test: tier-3 scale ceilings — 20k+ file repos, 1M-edge cap, peak RSS, query p99, FTS growth #41
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
h-dv/code-index#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P1 — the second axis the 2026-07-28 spike could not reach.
From
_prdoc/records/brainstorm-2026-07-28-oss-corpus-test-system.md§0.Why
Everything measured in the spike was 170–580 files. At that size the indexer is clean on every axis tested. The remaining risk is entirely at scale, and it is currently wholly unmeasured:
graph_semanticsbench_find_references.rs/bench_search_symbols.rsbenchmark 4–14-file fixtures, i.e. noiseSpike reference points (tier-1, for the ratchet baseline): ripgrep 231 files → 4127 symbols / 36607 refs / 1.5s; ts-zod 558 files → 8489 symbols / 85027 refs / 3.4s. Note zod already produces 172 refs/file — a 20k-file repo of that density is ~3.4M refs.
What to build
corpus.toml(#40) — candidates: rust-analyzer, django, vscode, roslyn (verify size/licence before pinning)Acceptance
graph_semanticsdisclosure verifiedLanded —
crates/indexer/tests/corpus_scale.rs+ weeklycorpus-scaleCI jobTwo tier-3 repos added to the manifest, both permissive and sha-pinned: rust-analyzer (MIT OR Apache-2.0) and django (BSD-3-Clause).
What was measured, and what it says
find_callers-shaped p99 ≤ 321µs on a 341k-ref graph; FTS trigram p99 ≤ 4.3ms. The index shape stays queryable.time ~ refs^1.7. Filed separately as #53; it is a scaling characteristic, not a correctness defect, and it deserves its own investigation rather than being buried in this issue.Gates vs records
Hard gates: no panic, no hang, non-empty index, wall clock < 900s, peak RSS < 2 GiB. These catch a hang or a pathological blow-up — the actual risk.
Recorded, not gated: wall clock, RSS, DB bytes, counts, query p50/p99 →
target/corpus/scale-<repo>.json, seeding the #45 ratchet. Asserting thresholds on these here would just encode this machine's speed.The 1M-edge cap is still NOT exercised
80 397 and 52 615 edges — far below it. The test reports where each repo sits relative to the cap rather than pretending to test it, and the cap itself lives in the daemon's graph layer, not the indexer, so exercising it needs a daemon-side test with a repo an order of magnitude larger. That acceptance box stays open.
CI
corpus-scaleruns Sundays 04:00 and on manual dispatch.fetch.shnow takesCOSI_CORPUS_TIERS, so the nightly tier-1 job no longer clones these multi-thousand-file repos into an ephemeral container every night.Acceptance: boxes 1, 2, 4, 5 met; box 3 (1M-edge cap) explicitly unmet and explained.