Benchmark scope selection cost - #2145
Conversation
|
Thanks @Aman-goel-04. Two things here are exactly what I hoped for: the benchmark script is committed rather than quoted in a comment, so the number is reproducible on someone else's repo, and the measurement landed as a comment next to the call it justifies in
One blocker, and it is in the swap rather than in the cascade.
else: # "none"
generate = set(seed_ids)
stale = containers | repo_wide
# A page is never both regenerated and marked stale; regeneration wins.
stale -= generateSo
One reuse note, not a blocker but do take it: Non-blocking, on the benchmark itself: it measures Push the seed fix and I will merge. |
Summary
repowise updatemarked file pages stale on every commit but never marked module, SCC, or repo-overview pages, so model-written summaries silently drifted from HEAD with no signal anywhere (doctor,get_stale_pages, andgenerate --staleall reported clean).build_dependencies+expand_cascade) to derive those dependents fromdecay_pathsduringupdate, seeding withmode="none"so dependents are marked stale without being regenerated, keepingAUTO_SYNC.md's no-LLM-spend-on-sync promise intact.scripts/benchmark_scope_selection.py) used to validate this is cheap enough to run on every hook-driven update (~15ms/1.2k files, ~138ms/11k files for the full selection); the numbers are also recorded as a comment at the call site so a future reader doesn't mistake it for an accidental full re-selection.Related Issues
Fixes #2099
Test Plan
pytest)ruff check .)npm run build) (if frontend changes)Added
test_update_decay_paths_use_cascade_dependents, which pins the cascade contract directly: seeds are thefile_page:ids fromdecay_paths,modeis"none"(not"dependents", so containers are never regenerated), and the resulting stale set includes the module/SCC/repo-overview pages.Checklist