Repository navigation
Description
Priority: P3. Benchmark and design follow-up; no measured real-scale performance regression is established.
Evidence is a static review of v0.4.3 at commit 543b661f64f65f65154e3322847be1756deb778e. listThreads limits concurrent inspections to four workers and deliberately keeps each thread's observations independent. Transcript discovery recursively walks both transcript roots for each search. The concurrency fixture explicitly expects both roots to be traversed before and after each thread's observation window.
For N lock-file thread candidates and T transcript-tree entries, this repeated discovery has approximately O(N × T) traversal work, alongside per-thread stability-window and diagnostic costs. The four-worker bound controls aggregate resource pressure; it does not remove repeated tree traversal. This source-level cost characterization is the finding. The review did not measure production-sized homes, establish typical retained lock-file counts, or demonstrate minute-long list latency. Existing fixture assertions are useful safety/resource evidence but are not a representative scalability benchmark.
Measure the current implementation before proposing an optimization. Use generated, isolated fixtures rather than user homes or real Codex sessions. Keep N and T independently variable so traversal cost can be distinguished from stability-window delay, filesystem caching, directory depth, transcript size, and process-probe overhead. Benchmarking must not modify actual native files or signal real processes.
Acceptance criteria:
- Produce a reproducible bounded benchmark covering several independent N/T combinations, including sparse and nested trees, with stated runtime/platform and observation-window settings.
- Report elapsed time, traversal counts, peak descriptor/resource use, and repeated-run variation. Include practical fixture size and runtime limits so routine verification remains usable.
- Separate warm/cold filesystem effects and default stability-window cost from discovery work wherever measurement permits.
- Confirm complete, ordered results and fail-closed behavior for injected discovery failures while retaining bounded worker concurrency.
- Use the measurements to decide whether optimization is warranted and identify the dominant cost before selecting a design.
- Any subsequent change must preserve independent evidence windows, coordinator guards, ambiguity detection, and failure behavior. Do not introduce a shared stale evidence cache or index solely from this asymptotic observation.
Related closed issue: #87, which addressed concurrent resource pressure. This follow-up evaluates elapsed-time scaling without undoing that protection.
Activity