Skip to content

Infra MT13: the PRs-per-hour chart on the published page, once its read fits #1049

Closed

Description

@jparker2006

Parent

Ticket MT13 of spec #819 (Infra).

What to build

Land the published war-room page's PRs-per-hour chart from the collector's snapshot: the hookup MT8 (#827) left as a named gap under the orchestrator's ruling on #827. It goes in only if the chart's read fits: the PRs-per-hour read, timed on a GitHub runner with a token that has actions: read, adds under 60 seconds to a publish at its worst hour (late in the UTC day, when the day's CI runs are most numerous). If it still doesn't fit after #1027, hand back with the measurement and the gap kept, changing nothing. No workflow or token permission changes: the runner timing comes from a source the orchestrator names when the ticket starts (for example the private publish's gather time after the pin moves, as for #1027).

Owned paths

  • tools/war-room/gather.py (shared: only the line that hands the collector snapshot to the page)
  • tools/war-room/page.py (shared: only its snapshot input)
  • tools/war-room/publish.py (shared: only the scan and allowed-file lines for the saved snapshot, about six)
  • tools/war-room/test_charts.py (shared: the published-snapshot page case)
  • tools/war-room/test_publish.py (shared: the saved-snapshot cases)
  • changes/<this ticket>.md

Relies on: tools/war-room/collector.v1.md

Links

Acceptance criteria

  • The PRs-per-hour read is timed on a GitHub runner with an actions: read token, late in the UTC day, and the pull request records the seconds, the time of day and the run
  • Under 60 seconds: the published page renders the PRs-per-hour chart from the collector's snapshot, proved by a page test, red first; otherwise nothing changes and the measurement is recorded on this ticket
  • publish.py changes only its scan and allowed-file lines for the saved snapshot, and the publish still refuses any other file
  • CI is green
  • Test rule (The test rule: what earns a test, and what never does #687): every new test protects a supported behaviour, a contract others rely on or a safety invariant, and the pull request says per test catches: <the bug>, or no new test: <why>. No mock-returns-stub, source mirroring, compiler re-checks, quota tests or unreachable cases; a bug gets a failing test first.
  • Every test the pull request deletes names its keeper (a test that still catches its bug) or says the behaviour it protected is gone.

Proof

M2: the page test, a screenshot of the published chart, and the runner timing.

Activity

  1. added this to the Infra milestone on Nov 16, 2026
  2. added
    ready-for-agent
    on Nov 16, 2026
  3. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/1049-prs-per-hour-hookup

  4. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Orchestrator: timing source for MT13 is the private war-room publish's own gather, on a GitHub runner with actions: read, at the first publish after the private pin moves past #1027 (#1032), taken late in the UTC day. Fleet #626 posts that gather time here. The ticket changes no workflow or token permission.

  5. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    Builder question (MT13, before any push): the hookup needs 7 tools/war-room/publish.py lines outside "the scan and allowed-file lines". Nothing is pushed yet.

    Why the owned lines aren't enough: the PRs-per-hour chart is built in publish.chart_builder (charts.build(..., snapshot=...)). page.py only gets the finished chart bundle, so its "snapshot input" can't get the snapshot to the chart build. The saved file also has to be written into the published tree before the scan can read it.

    The extra lines:

    1. chart_builder: 1 line that takes snapshot.json from beside the selection (gather's output folder) when it exists, 1 changed line that passes snapshot=snapshot to charts.build, and 1 line that records it on the builder (build.snapshot = snapshot).
    2. render: 4 lines that copy that snapshot into the published tree, or remove an earlier snapshot.json when this render has none, so a page never sits beside a snapshot it wasn't drawn from.

    These are in addition to the owned scan lines (the snapshot is text-scanned and must match the collector schema) and the allowed-file name.

    Options:

    Recommendation: (a). The ruling on #827 asked for the snapshot to be saved and scanned, and (b) would publish the chart without the snapshot it was drawn from as evidence.

    Still waiting for the runner timing from #626. Nothing lands unless it is under 60 seconds.

  6. added
    needs-info
    on Nov 17, 2026
  7. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator: the builder's path question (#1049 (comment)). The hookup cannot fit the owned publish.py lines: the chart is built in publish.chart_builder, so page.py's snapshot input cannot reach it. It asks for 7 more publish.py lines (3 in chart_builder to pass snapshot.json to the chart build and record it, 4 in render to copy or remove the saved snapshot). Fleet recommendation: grant exactly those 7 lines, same intent as the ticket. Nothing is pushed, and nothing lands unless the runner timing from #626 is under 60 seconds.

  8. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: granted, exactly the 7 extra publish.py lines (3 in chart_builder, 4 in render) for the hookup, on top of the owned scan and allowed-file lines. Nothing else in publish.py. It still lands only if the timed read adds under 60 s.

  9. removed
    needs-info
    on Nov 17, 2026
  10. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    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.

  11. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    Timing follow-up for the MT13 gate, 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.yml runs 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, as the timing source named in 6932270348. Nothing here is under-60-second evidence yet. Private record: https://github.com/jparker2006/ClosedWiz/issues/325#issuecomment-6940012218

  12. added 2 commits that reference this issue on Nov 17, 2026
  13. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    First successful push: 44f787f at 2026-11-17T06:17:29Z

  14. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling on the timing gate: the PRs-per-hour read cannot be timed from today's publishes, because the hookup is not in them yet. (Those publishes' whole collect-and-publish step now takes 3 to 4 minutes, at 20:22Z, 21:23Z and 22:22Z, down from 8 to 14 before #1032.) So change the gate, not the wait: MT13 lands the hookup with a hard 60-second timeout on the read. On timeout or failure the chart shows its existing unknown form, never zero, and the publish carries on. It also logs one line with the read's seconds. The first late-day publish after the pin moves then measures it. Prove the timeout with a failing-first test using a slow fake read. This removes the risk the gate guarded against, which was a read that stalls the publish.

  15. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    Late-UTC-day gather times for the MT13 gate (the timing source named in 6932270348), 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.yml runs 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. These are whole-gather times; MT13's own PRs-per-hour read is a separate increment on top. They neither pass nor fail the under-60-second gate. 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

  16. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: old builder archived, start 6932197219

  17. added 2 commits that reference this issue on Nov 18, 2026
  18. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    Builder question: narrow path grant for the CI failure on PR #1099 at 8e9c2a0a79de48950bb0be950a5b90874fb92b16.

    Exact path and section: tools/war-room/test_gather.py, only the expected published filenames in Gather.test_the_full_gathered_selection_publishes_with_real_chromium (line 521).

    Reproduced: python3 -I tools/war-room/test_gather.py Gather.test_the_full_gathered_selection_publishes_with_real_chromium fails at the exact file-list assertion because the actual published tree includes the newly required snapshot.json. The local bare-origin publication succeeds. The same assertion failed in run 44208174261, proof job 134479423488. No live service is used by the reproduction.

    Why asking: this path is absent from MT13's owned paths. Grant 6934512796 covers only the seven named publish.py lines. The changed-gate ruling 6963822660 authorizes the bounded read and its proof but does not explicitly widen this integration test's assertion. J110 permits synthetic answers to test fakes with no assertion change; this is an assertion expectation.

    Purpose and acceptance: keep the existing exact-file-list check aligned with MT13's required saved snapshot, while retaining its rejection of all other unexpected files and every existing image/page assertion. This supports the owned gather.py handoff and publish.py saved-snapshot behavior and restores the CI gate. No new or deleted test (#687).

    Proposed complete code diff:

    --- a/tools/war-room/test_gather.py
    +++ b/tools/war-room/test_gather.py
    @@
    -        self.assertEqual(sorted(files), sorted(['README.md', 'samples/2030-01-02T12-30-00Z.json', 'war-room-phone.png',
    +        self.assertEqual(sorted(files), sorted(['README.md', 'samples/2030-01-02T12-30-00Z.json', 'snapshot.json', 'war-room-phone.png',
                                                     'war-room.png', *publish_module().SITE.values()]))

    Recommendation: grant exactly this one-line expected-filename update; nothing else in test_gather.py. After approval I will run the failed check, update the existing evidence/PR facts, and push a new green head under the branch-tip guard. The file is unchanged and CI has not been rerun on the unchanged head.

  19. added
    needs-info
    on Nov 18, 2026
  20. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator: #1049 (comment) requests exactly one assertion-expectation line in tools/war-room/test_gather.py, Gather.test_the_full_gathered_selection_publishes_with_real_chromium: add snapshot.json to the expected published filenames. CI proof job134479423488 and the builder reproduce the mismatch. Recommendation: grant exactly this line; preserve the exact-list rejection of all other files and all image/page assertions. No new/deleted test, production change, workflow change or CI rerun. Builder remains paused on this scope question.

  21. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: granted. One line in tools/war-room/test_gather.py, Gather.test_the_full_gathered_selection_publishes_with_real_chromium: add snapshot.json to the expected published files, because this ticket now publishes the saved snapshot. Nothing else in that test changes.

  22. removed
    needs-info
    on Nov 18, 2026
  23. added 2 commits that reference this issue on Nov 18, 2026
  24. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions