Summary
Re-derive the indexer's concurrency, disk, and memory limits after the arc's structural changes land. Three load-bearing constants stop being true:
- Disk:
REQUIRED_FREE_BYTES = 2.5 GB/worker assumes tarball + extracted tree coexist. After streaming ingest, peak is the tarball alone (~0.5 GB) — the runbook §3 table ("8 workers costs 20 GB") and the assert_disk_headroom guard are 5x too conservative.
- Memory / the semantic clamp:
effective_workers clamps to 2 when semantic is on because embedding materializes a whole repo's chunks per worker. After delta indexing, only changed files' chunks materialize on recurring runs; after embedding concurrency, in-flight batches add a bounded, configurable increment. The clamp's premise needs re-measuring, and likely relaxing to the general index_concurrency.
- CPU: the "returns at the ceiling are sublinear (0.95x at 4 threads)" argument against
index_concurrency: 8 dies with process-pool extraction; the remaining per-worker costs (network, DB) parallelize fine.
Approach
- Measure a full production run with the instrumented phases at current limits, then at proposed new limits, on the real corpus.
- Update:
effective_workers (clamp logic), REQUIRED_FREE_BYTES / MAX_TARBALL_BYTES+MAX_EXTRACTED_BYTES framing in indexer/fetch.py, config.yaml comments (the 2.5 GB/worker arithmetic and the clamp note), and docs/runbooks/indexing-parallelism.md §3's tables and trade-off narrative.
- The engine pool derivation (
pool_size == workers, max_overflow=0) follows automatically — verify the leak-detection property survives.
- Keep
max_concurrent_runs: 1 and all single-writer invariants untouched — this issue tunes within-run limits only (the reconciliation coverage boundary in runbook §1.1 stays as written).
Acceptance criteria
Depends on
- File-level delta indexing, streaming tarball ingestion, and embedding concurrency (the three changes that invalidate the current bounds).
Summary
Re-derive the indexer's concurrency, disk, and memory limits after the arc's structural changes land. Three load-bearing constants stop being true:
REQUIRED_FREE_BYTES = 2.5 GB/workerassumes tarball + extracted tree coexist. After streaming ingest, peak is the tarball alone (~0.5 GB) — the runbook §3 table ("8 workers costs 20 GB") and theassert_disk_headroomguard are 5x too conservative.effective_workersclamps to 2 when semantic is on because embedding materializes a whole repo's chunks per worker. After delta indexing, only changed files' chunks materialize on recurring runs; after embedding concurrency, in-flight batches add a bounded, configurable increment. The clamp's premise needs re-measuring, and likely relaxing to the generalindex_concurrency.index_concurrency: 8dies with process-pool extraction; the remaining per-worker costs (network, DB) parallelize fine.Approach
effective_workers(clamp logic),REQUIRED_FREE_BYTES/MAX_TARBALL_BYTES+MAX_EXTRACTED_BYTESframing inindexer/fetch.py,config.yamlcomments (the 2.5 GB/worker arithmetic and the clamp note), anddocs/runbooks/indexing-parallelism.md§3's tables and trade-off narrative.pool_size == workers, max_overflow=0) follows automatically — verify the leak-detection property survives.max_concurrent_runs: 1and all single-writer invariants untouched — this issue tunes within-run limits only (the reconciliation coverage boundary in runbook §1.1 stays as written).Acceptance criteria
max_concurrent_runs, per-repo branch sequencing, reconciliation gate).Depends on