Repository navigation
Description
Status
Revised proposal only — not approved, no ready label, no builder. Replaces the original PR-inventory proposal before approval. Standalone follow-up to #626 and #819; no change to either approved graph, #883 or #626’s signed-in acceptance.
Why the proposal changed
The first proposal targeted a real duplicate but the wrong bottleneck. Fleet profiling at the live source pin measured the full PR inventory at only1.7s (121PRs, two GraphQL calls); reusing it saves about3s. The stage repeat does not run in the observed live setup. That scope would not materially improve a7–13minute gather, so its approval recommendation is withdrawn.
The measured cost is current_activity: for each current-day ci.yml run, two full jobs enumerations and one run re-read execute serially. The report counted259 runs, about780 requests; ten job reads averaged0.77s each (0.35–1.15s). Roughly ten minutes is an estimate from those observations, not a new end-to-end benchmark. The pinned and current moved implementation are identical.
What to build
Read at most four independent CI runs at a time, keeping the existing full checks for each run. Make this a small standard-library worker pool inside the existing activity read, not a generic concurrency framework, cache or new service.
Keep both jobs reads for every run, their equality check, the run re-read, and the two outer run-list enumerations. The first outer enumeration completes before any worker starts; the final outer enumeration happens only after all workers finish. Within each run, the existing request/check sequence stays ordered. Merge results in the original deterministic run order and retain cross-run duplicate-job detection. Inter-run request order changes; the supported stability/completeness guarantees must not.
Do not take the separate option of deleting a completed run’s second jobs read. That would remove an existing check and is not proposed here. If the current guarantees cannot be preserved with bounded parallel reads, stop and ask; do not silently weaken them.
Owned paths
tools/war-room/bench_reads.py(shared:current_activityper-run scheduling, deterministic result merge and related comments only; other readers unchanged)tools/war-room/health.py(shared: only synchronization ofcapture’s raw-page bookkeeping if required by the parallel reader; no provider/metric change)tools/war-room/test_activity.py,tools/war-room/test_health.py,tools/war-room/test_collect_ci.py,tools/war-room/test_gather.py(shared: this activity-read behavior and existing callers’ regression cases only)tools/war-room/fixtures/activity/(shared: synthetic concurrency/stability cases and benchmark inputs/results)docs/evidence/war-room-gather-ci-reads.md(sanitized before/after timings, source revisions and remaining limits)
Relies on: tools/war-room/contract.v2.md, tools/war-room/collector.v1.md, tools/war-room/collector.v1.schema.json
Links
none
The moved CI reader is already on main. MT8 (#827) owns separate snapshot/page and retired-tool wiring; coordinate shared tests without changing that work or adding a file-only blocker. Its under60s lightweight chart-read rule remains unchanged. The proposed repository migration (#979) is separate.
Acceptance criteria
- A fixed cap of four per-run workers bounds live reads; no worker creates another pool, no unbounded fan-out, new CLI setting, external dependency or persistent/cross-run cache. Default production callers use the bounded path.
- Both jobs enumerations are still fresh and equal per run; pagination/count checks, run/attempt/status re-validation, outer-cohort re-validation, duplicate/invalid identities, pool selection, timestamps and cost arithmetic retain their existing behavior. Active and completed runs keep the same checks. No dropped run, job, fact or history window.
- Fixed synthetic inputs yield the same deterministically ordered activity, queue/raw-page evidence, cost, unavailable states and source hashes as before. Every caller, including
health.captureand the collector’s activity fact, is safe under parallel reads. No caller gains a hidden thread-safety assumption. - A changed jobs page, changed attempt/status, changed outer run set, malformed/partial page or cross-run duplicate still refuses the observation and follows the existing unavailable/last-good behavior. A failed worker stops admission of further work, cancels pending work, and does not cause hidden retries or a partial successful observation.
- Before/after timing report: compare the parent and PR head on one fixed, realistic multi-run replay and one bounded read-only live gather pair, on the same runner/sandbox, repository, credentials and options. Record total gather seconds, activity-phase seconds, run/job/page/request counts, maximum in-flight reads, exit/result state, code SHAs and UTC bounds. Include each outcome, no retry-until-fast or cherry-picked timings.
- Performance target: at least2× lower activity-phase wall time on the controlled I/O-latency replay with four workers, plus the actual measured end-to-end live result. The target is not a claim of4× total-gather speed. If live improvement is not material or the guarantee checks fail, report it and stop at this scope rather than adding caching or dropping checks.
- The live pair has one baseline and one head read, each capped at15m; a timeout is reported as
>900s. Check the existing API budget before starting, record remaining/reset information privately, and never exceed the owner’s budget or add retries to finish the measurement. If the pair cannot fit, report the limitation and wait. No publish, workflow dispatch, new credential or machine installation is part of measurement. - Request volume is expected to stay roughly unchanged. State that this speeds wall time but does not solve the flagged hourly API-budget risk; preserve rate-limit/read-failure handling and do not assert an unverified token limit. Broader request-count reduction/window bounding stays a separate proposal.
- Relevant existing gather/activity/health/collector tests pass; affected full war-room checks run once at hand-back. PR lists
catches:per test orno new test:. Use timing/request counts as performance evidence; tests protect complete results, failure behavior and the bound, not source text or a mirrored implementation.
Proof
- P1 — bounded overlapping work, same result: realistic fixed multi-run fixture and controlled transport latency, baseline/head benchmark with identical results and recorded timings. Demonstrate overlapping progress with no more than four in-flight reads; never a flaky tight wall-clock unit assertion.
- P2 — stability still enforced: strengthen existing cases to change the first/second jobs read, a run attempt/status and the outer cohort while other runs are in flight; include late pagination, duplicate jobs across runs, worker failure and deterministic output/evidence ordering.
- P3 — useful real timing: one budget-checked, read-only live gather baseline/head pair. Raw live values/logs stay private; public evidence has synthetic fixtures and aggregate timings. The historical7m41s/13m07s/>13m48s report is context, not a substituted controlled baseline.
Out of scope
No PR-inventory caching, skipped second jobs read, read-stability relaxation, narrowed cohort/time window, persistent cache, new API or dependency, generic parallel framework, workflow/test removal, timeout or height-cap change, private pin, schedule or PC/Access/DNS change, full-snapshot publish hookup, or repository migration. This targets the measured activity bottleneck; it does not promise that every full snapshot will fit15m.
Approval gate
One proposed standalone ticket, one main production file plus at most the capture wrapper, no native blockers. Existing contracts remain unchanged, so no contract-first ticket is needed. Longest chain0; it can start only after its own explicit approval. The original inventory-reuse recommendation is superseded. No approval, ready label, implementation or agent is created by this revision.
Activity
[-]Infra WRG1: Reuse the PR inventory within each war-room read[/-][+]Infra WRG1: Bound parallel CI activity reads while preserving stability checks[/+]jparker2006 commentedon Nov 16, 2026
Proposal corrected before approval: the original PR-inventory reuse target is withdrawn. Measured inventory cost is1.7s; saving about3s does not address the slow gather. The revised body targets the measured serial CI activity loop instead: at most four independent runs in flight, keeping both jobs reads, the per-run re-read, the outer before/after enumerations and all refusal checks. No cache or dropped validation is proposed. Inter-run ordering changes, with deterministic output and explicit concurrency/stability proofs required. One main production file plus the capture wrapper only if needed. Before/after timing and API-budget limits are in the body. No implementation or ready label; this changed scope needs its own explicit approval. The earlier recommendation to approve the inventory version no longer applies.
jparker2006 commentedon Nov 16, 2026
Orchestrator ruling: the revised scope is approved as one small standalone ticket:
bench_reads.current_activityreads its per-run facts with a fixed pool of 4, keeping both jobs reads and their equality check, the per-run re-read, the outer before and after cohort reads, pagination, duplicate and fail-closed behaviour, and deterministic results. The builder proves each guarantee still holds and stops if one cannot be kept. Evidence: before and after wall time of one gather on a GitHub runner. Also say in the pull request, without building it, whether runs already recorded as completed at the same attempt could be skipped on later publishes of the same day without a saved-record schema change; that would cut the request count, which the pool does not.Private record: https://github.com/jparker2006/ClosedWiz/issues/325#issuecomment-6917722028
jparker2006 commentedon Nov 16, 2026
launch-fleet: started
jparker2006 commentedon Nov 16, 2026
Orchestrator ruling: merge on the synthetic replay plus review; no live pair before merge. The replay (588 s to 151 s, same 783 requests, byte-identical output) is the evidence for this pull request. The live timing is taken from the first scheduled gather after the pinned copy picks this change up, and is posted here as a follow-up line. Skipping completed runs needs a record-format change, so it is its own proposal, not this ticket.
#1027: green: classify the new evidence and replay paths for the carr…
#1027: red: R1, a stale wait() snapshot admits run 205 after run 202 …
#1027: green: R1, a failing worker blocks every later admission under…
#1027: green: merge main (both paths.json rows kept, docstring joined)
jparker2006 commentedon Nov 16, 2026
launch-fleet: asked the orchestrator: PR #1032's one re-check (939626c) confirms R1's admission race is fixed, but finds that runs already queued in the pool still execute after a failure, instead of being cancelled. That spends extra requests after a failure; it isn't a security or data-loss risk. Fix once more (shutdown with cancel_futures, or cancelling each queued future, with a test), or log it as polish and merge?
jparker2006 commentedon Nov 16, 2026
Orchestrator decision on PR #1032: fix once more, bounded, then one final check. After a failed read the pool must stop: cancel the queued reads on the first failure so no further requests are spent, with a failing-first test that counts requests after a failure. That matters most when the failure is a rate limit, where carrying on makes it worse. Nothing else changes. The same reviewer checks those lines only at the new green head. After that there is no further round: anything new that is not a security, privacy or data-loss risk is logged as a follow-up issue and the pull request merges.
#1027: red: R1 re-check, runs queued at the first failure still send …
#1027: green: R1, the first failure cancels queued runs and they send…
jparker2006 commentedon Nov 16, 2026
launch-fleet: archived
jparker2006 commentedon Nov 17, 2026
Scheduled-run follow-up (read-only evidence preserved while the responsible fleet is temporarily unavailable): the first scheduled publish after #1032's pin completed successfully at 2026-11-17 01:27:07 UTC. Gather is bounded by log timestamps to at most about 16.452 seconds (01:24:30.152918–01:24:46.604005 UTC); the sample's source-read window is 01:24:30–01:24:46 UTC. This is a log bound, not an exact instrumented timer.
Coverage limitation: the saved sample marks the CI queue unavailable. This early-day, incomplete read is not evidence of a complete successful CI gather, not comparable to the previous late-day 7m41s–over13m48s reads, and not the requested 20:00–23:59 UTC full-window timing. It does not establish MT13's under-60-second incremental-read gate. No speedup ratio or acceptance is claimed.
Private timing record and source/run/output bindings.
jparker2006 commentedon Nov 17, 2026
Timing follow-up from the fleet that owns the private pin. The scheduled publishes after the pin moved to #1032's merge, at 02:23, 03:23, 04:23 and 05:23 UTC, gathered in 21 to 23 seconds each. All four published, and each completed its CI activity read, with the queue known. The first run, at 01:24 UTC (about 16 s), had already been reported, and its CI read was refused. These are low-load numbers: 6 to 8
ci.ymlruns since 00:00 UTC, against hundreds late in the day. A comparable low-load run on the old pin took 18 s, so they don't yet show the pool's effect. The late-UTC-day measurement (today's 20:00–23:59 UTC scheduled publishes) follows here, with its run counts and coverage. Private record: https://github.com/jparker2006/ClosedWiz/issues/325#issuecomment-6940012218jparker2006 commentedon Nov 17, 2026
Late-UTC-day gather times after #1032, from the fleet that owns the private pin: today's scheduled publishes between 20:00 and 23:59 UTC all succeeded. Gather took 62, 59, 55, 70 and 47 seconds, with 49 to 56
ci.ymlruns created since 00:00 UTC. That's up from 16 to 32 seconds at 6 to 17 runs this morning, so gather still grows with the day's runs, at roughly 1 second per run.This was a quiet day and doesn't represent the worst hour: the day before had 259 runs by 13:40 UTC, when gather took 7m41s to over 13m48s on the old code. A straight-line extrapolation (an estimate, not a measurement) puts a day that busy near 4 to 5 minutes now. The CI activity read was still refused in 2 of the 5 late samples. A busy day's logs can give the real worst-hour number later, with no dispatch. Private record: https://github.com/jparker2006/ClosedWiz/issues/325#issuecomment-6964307376