Skip to content

Infra MT8: retire ci-bench and factory-metrics #827

Closed

Description

@jparker2006

Parent

Ticket MT8 of spec #819 (Infra).

What to build

Delete both tools and their workflow once every consumer in MT1's inventory reads the war room: CI steps, the docs-only classifier, launch-fleet's tests, the escapes and main-batch references, and docs.

Owned paths

  • tools/ci-bench/
  • tools/factory-metrics/
  • .github/workflows/ci-bench.yml
  • .github/actions/docs-only/ (shared: their rows)
  • ci/escapes/ (shared: their references)
  • ci/main-batch/shadow.py (shared: its reference)
  • skills/launch-fleet/ (shared: test references only)
  • loops/README.md (shared)
  • docs/agents/skills-ab.md (shared: its reference)
  • .github/workflows/board.yml, .github/workflows/ci-escapes.yml, .github/workflows/war-room.yml (shared, revision 4, an approved workflow change: only the python.sh call lines and ci-escapes.yml's header line)
  • tools/war-room/python.sh (revision 4: moved from tools/ci-bench/python.sh)
  • STATUS.md, tools/github-app/test.py, tools/war-room/README.md (shared, revision 4: only their lines naming either tool)
  • tools/war-room/required.py (revision 4: CI2's required.py, deleted with ci-bench if nothing live calls it, else moved here with its caller repointed)
  • tools/war-room/gather.py (shared, revision 4 addendum: only the line that hands the collector snapshot to the page)
  • tools/war-room/page.py (shared, revision 4 addendum: only its snapshot input)
  • tools/war-room/test_charts.py (shared, revision 4 addendum: the published-snapshot page case)

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

Links

Acceptance criteria

  • Nothing in the repository refers to either tool, by a path-based search for tools/ci-bench/, tools/factory-metrics/, ci-bench.yml and ci-benchmarks. The immutable slot names ci_bench and factory_metrics are allowed, and two named gaps are excluded by exact path: docs/evidence/ci2-pr-cuts.md and ci/main-batch/fixtures/shadow/red-r1-benchmark.log
  • The three workflows run tools/war-room/python.sh, and only those lines changed
  • The published war-room page renders the PRs-per-hour chart from the collector's snapshot, proved by a page test, red first
  • CI is green, and each deleted test names its war-room keeper
  • 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

M4: the diff, the search and CI.

Activity

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

    @jparker2006
    MemberAuthor

    Held before a plan change: #819 revision 4 (J121, approved by Jake) widens this ticket's owned paths. Released once the revision is recorded.

  4. added
    ready-for-agent
    and removed
    held
    on Nov 16, 2026
  5. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Released: #819 revision 4 is recorded (J121). This ticket's widened owned paths are in its body.

  6. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/827-retire-bench-metrics

  7. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Builder question (MT8): the deletion reaches files outside the owned paths. Starting from main at 72c802b, deleting the two folders and ci-bench.yml breaks or orphans the items below. None of them is owned, covered by J110 or covered by the two rulings. Each item gives the smallest change I propose and a recommendation. "Yes to all recommendations" is enough. Until then I'm building the owned part: python.sh, budgets.py, required.py, the snapshot to page hookup, and the classifier, launch-fleet, loops, escapes and docs rows.

    A. Live code still running ci-bench (blocks the deletion)

    1. tools/war-room/collect_factory.py:53 (MT2's): prs_per_hour runs tools/ci-bench/bench.py collect and measure as a subprocess, so the collector's PRs-per-hour fact, which feeds the chart, breaks. bench_measure.py already holds byte-identical collect and measure but has no CLI. Recommend: collect_factory.prs_per_hour calls bench_measure.collect(...) and bench_measure.measure(...) in process (about 6 lines), with the same outputs and the same error text. Its tests test_collect_factory.py:273-275 and test_collect_ci.py:26, which check parity against the bench CLI, repoint to bench_measure the same way.
    2. tools/war-room/publish.py chart_builder (1 line): the page's chart build never receives a snapshot. The addendum gives me gather.py and page.py, but the build is called only in publish.py. Recommend: gather writes the collector snapshot into its root, with a selection entry, and chart_builder passes it as snapshot= to charts.build. That is one line in publish.py, plus its case in test_charts.py, which I already own.

    B. Tests that run only in ci-bench.yml (deleting it drops them from CI)
    3. ci-bench.yml is the only workflow that runs tools/war-room/test_contract.py, test_activity.py, test_rework.py, test_review_loops.py and test_ci3.py (the last through the stand-ins). It also runs ci3_check's step coverage, which replaced bench.py check-steps. Recommend: add those lines to war-room.yml's existing test step, beside the two budget lines from ruling (a). This is a workflow edit beyond the python.sh lines, so it needs approval.
    4. war-room.yml runs only on tools/war-room/**. ci-bench.yml also ran on ci.yml, privacy.yml and tools/skills-eval/**. After the move, a PR that breaks a budget in ci.yml would never run budgets.py check, which defeats ruling (a)'s proof. Recommend: add .github/workflows/ci.yml and .github/workflows/privacy.yml to war-room.yml's pull_request.paths (2 lines).
    5. The tests of the moved factory-metrics modules (journey.py, limits.py, metrics.py, experiment_contract.py, which are byte-identical in tools/war-room/) are tools/factory-metrics/test.py, test_journey.py, test_limits.py and test_experiment_contract.py. Nothing in the war room tests those copies, so deleting these tests leaves no keeper. Recommend: move them unchanged to tools/war-room/ with fake-gh and the fixtures they read, changing only the paths, and run them in war-room.yml (same step as item 3).

    C. Text and fixtures outside the owned paths
    6. tools/factory-metrics/experiments/ (EB8-O's offline A/B controls, documented in docs/agents/skills-ab.md) has no war-room home and isn't a factory fact. Recommend: move it unchanged to tools/war-room/experiments/, which is the only edit to skills-ab.md I own, and run its 3 tests where they run today (nowhere in CI today; I'd keep it that way).
    7. skills-eval: required-text.json:26 requires tools/factory-metrics/README.md for build-ticket loads, and precheck/contract-fixtures/README.md:24 names the fixture path as text. Recommend: repoint both to tools/war-room/README.md and the moved fixture path, together with pending ruling (b).
    8. tools/fleet-load/test_carried.py:29 checks a carried copy against tools/factory-metrics/fixtures/stage-waits/bench.json. Recommend: repoint it to the moved fixture under ruling (b), which is the same move.
    9. Text and comments in the war room naming old paths: the docstrings of bench_measure.py, bench_reads.py, trends_reads.py and ci3.py:27; collect_factory.py:15; gather.py:60's daily.sh reason; collector.v1.md's Inventory B (about 25 rows); contract.v2.md:138; and the READMEs and logs in fixtures/collector*, fixtures/rework/*.log, fixtures/stage-waits/README.md, fixtures/page-design/packet.py, test_health.py:13, test_review_loops.py:13, test_stage_waits.py:5, test_charts.py:601 and test_gather.py:662. Recommend: wording only, to the war-room paths. For historical logs and Inventory B (a record of what was found), exclude them by exact path as named gaps instead.
    10. Saved values: health.py:292's stage-health owner and record.v2.schema.json:688's const are both tools/factory-metrics/limits.conf, and saved records on the war-room branch carry that value. Changing the const would make old samples fail the v2 schema. Recommend: treat it as an immutable saved value, like the slot names, and exclude it by exact string from the search. The alternative is a schema change (a contract).
    11. Evidence and policy text: docs/evidence/823/ci-bench-parity.log (MT4's red/green log) and docs/agents/fleet.md:182 (J110's own text, naming tools/ci-bench/steps.tsv as an example). Recommend: the log becomes a third named gap by exact path. For fleet.md, the orchestrator changes the example to tools/war-room/steps.tsv, or it becomes a named gap.
    12. loops/ci3-weekly.json (CI3's loop brief) tells the loop to read tools/ci-bench and its ci-benchmarks branch. Recommend: repoint the brief to tools/war-room and drop the branch.

    D. The ci-benchmarks data branch
    13. The search includes ci-benchmarks. gather.py still fetches that branch for the page's ci_bench slot and for cost's CI share. Only ci-bench.yml's daily.sh writes it, so after deletion it goes stale forever. Its other mentions are the war-room.yml:98 comment, STATUS.md, the war-room README and test_gather.py. Options: (a) gather stops reading ci-benchmarks: ci_bench becomes an explained missing slot ("retired: PRs an hour comes from the collector snapshot"), cost runs on journeys only, and test_gather.py's branch cases follow. (b) Keep the read, and make ci-benchmarks in gather.py, its test and the README a named gap. Recommend (a): a stale point shown as current is worse than an explained gap, and the snapshot's chart replaces the headline.

    Already settled inside owned paths: required.py moves to tools/war-room/required.py because ci/main-batch/shadow.py (live, run in ci.yml) imports it. I'm not touching ci/escapes/escapes.py:48's comment: it is pinned by blob in ci/main-batch/admit.py and doesn't match the path search.

  8. added
    needs-info
    on Nov 16, 2026
  9. 5 remaining items

  10. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator: three follow-ups to the batch ruling (6916607926), found while building on room/827-retire-bench-metrics (no pull request yet). (1) Items 2/16 timing risk: from the builder's sandbox, the collector snapshot that publish would reuse took over 15 minutes and was cut off; the hourly publish job's whole cap is 15 minutes. With same-day reuse, 23 of 24 publishes save the read, but each UTC day's first publish would hit the cap, save nothing, and every later one would retry and fail the same way. No GitHub runner timing yet; the builder is timing a lighter read of just prs_per_hour. Decision needed: wire the snapshot only if a runner fits the cap, use the lighter read for the chart, or keep the publish hookup as a named gap. (2) The hookup needs about 6 lines in publish.py (the scan and allowed-file lines for the saved snapshot), not the one line granted. (3) The new war-room-proof.yml proof job may need its 10-minute limit raised: test_publish.py and test_gather.py alone took about 6 minutes here. Fleet recommendation: (1) the lighter prs_per_hour read if it fits, else a named gap, never a hookup that can stall the publish; (2) yes, exactly those lines; (3) yes, a measured limit with headroom.

  11. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling on the three follow-ups: yes to the fleet's recommendation on each.

    1. Never a hookup that can stall the publish. Use the lighter prs_per_hour read for the chart only if, timed on a GitHub runner, it adds under 60 seconds to a publish; otherwise the publish hookup is a named gap and this ticket ships without it.
    2. Yes, exactly those scan and allowed-file lines in publish.py for the saved snapshot (about six), and only if item 1 goes ahead.
    3. Yes, set war-room-proof.yml's job limit from a measured run with headroom, 20 minutes at most.
  12. added 10 commits that reference this issue on Nov 16, 2026
  13. jparker2006 commented on Nov 16, 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