Skip to content

Mainframe Ground Truth: stop paying the 3-4 min warm-up per part; ~11 min PR check, now the slowest #5543

Closed

Description

@squid-protocol

Measured (2026-10-18, 5 successful PR runs): mainframe-ground-truth.yml is now the slowest PR check, about 11 min (parts 1/2 and 2/2 both ~11.0 min on the sampled head). Since #5530 sharded CICS Crucible (24.8 → ~8.2 min), every PR waits on this check. The next slowest are graph-accuracy-audit (7.6 min, #5501) and muninn (7.5 min, #5499).

Where the time goes, per part (step times from runs 39171967813, 39170181810, 39170005710, 39168823386, 39168781317):

step part 1/2 part 2/2
Install GitGalaxy 0.4 min 0.3-0.5 min
Gate against the ground-truth ledger 3.1-4.1 min 2.4-4.2 min
Full-corpus differential and answer-key tests (pytest-split share) 4.7-6.4 min 3.8-6.3 min

Part 1 is the long one every time (4.1 + 6.4 min). The ledger gate runs on both parts (#5133), so each part's corpus scans are warm before the timed tests. That 3-4 min is paid once per part, so adding parts adds it again: 4 parts as they are today come to about 4 + 3 + setup ≈ 8 min, not 11/2.

Proposed (the worker measures and picks, then reports)

Acceptance: PR wall time of the check before and after (target ≤ 7.5 min, level with the next slowest check) and total runner-minutes, in the PR body. The first CI run shows the same ledger verdict and test counts as main.

Value: about 3.5 min less per PR push on the critical path. At 60-80 runs/day over the 2-week CICS push, that's about 50-65 hours less PR waiting.

Owner decisions

Owner OK (2026-10-18): the mainframe-ground-truth.yml workflow edit is approved (allow_workflows), queued on nyx.

🤖 Generated with Claude Code

Activity

  1. added
    github-actions
    ci-cd
    scope:infra
    and removed on Oct 18, 2026
  2. squid-protocol commented on Oct 19, 2026

    @squid-protocol
    OwnerAuthor

    After #5559: the parts got faster, but the queue waits ate the gain

    Medians from about 15 successful first-attempt runs on each side of #5559 (merged 2026-10-19T02:56Z):

    stage before (2 parts) after (warm job + 4 parts)
    plan (job unchanged) 2 s queue, 60 s run 210 s queue, 60 s run
    ground-truth-warm (new) – 185 s queue, 261 s run
    pytest parts ~45 s queue, ~670 s run ~275 s queue, ~255 s run
    ground-truth (final) 2 s queue 134 s queue

    Wall time per run: median 16 → 22 min, p90 30 → 46 min (successful attempt-1 runs, 3 days before vs since).

    • The compute part of ci: ground-truth warm job + 4 parts (cut ~11 to ~7.5 min) (Part of #5543) #5559 worked. The parts went from about 11 to 4.3 minutes. Even with the warm job in front, the compute-only critical path fell from about 12.5 to about 10 minutes.
    • The new layout queues four times in a row (plan → warm → parts → final job) and needs 5 runners per run instead of 2. When CI is busy, each wait costs 2–5 minutes.
    • CI is short of runners overall, not only this workflow. The plan job didn't change, yet its queue wait went from 2 s to 210 s.

    Proposed next step: two parts, cheap one first

    • 1. Cached warm step, so most PRs skip a serial stage.
      • The scans in the cache dir are already keyed by engine state. Save the warm scans as an actions/cache entry keyed on corpora.json plus the engine-state hash, saved on main only (Siblings of #4968: per-PR cache saves (mainframe-corpora key) #5024).
      • plan checks for the key with lookup-only: true. On a hit, the warm job is skipped and the parts restore the cached scans directly. On a miss, which happens on a PR that changes engine code, it runs as it does today.
      • Consider 3 static parts instead of 4 if the measurements favour it.
    • 2. Busy/calm adaptive layout.
    • Measure: wall time and runner-minutes per layout, compared with the numbers above. Report them here.

    Expected gain: about 3–5 minutes per run while CI is busy. Calm runs should stay about the same or improve slightly when the cached warm step hits.

  3. 10 remaining items

  4. squid-protocol commented on Oct 24, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5543-20261024T2005Z (host melek) ended without a PR. plan-held: overlap only docs/ci.md, harmless; plan approved

  5. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    Measured after #6494/#6146/#6579 (3 successful PR runs since 2026-10-25T03:12Z, all busy layout; PR #6591 has the table): wall median 18.0 min (15.9-30.2), runner-min median 10.7 (9.4-13.6, was 13.2-17.1), compute critical path 5.6 min (5.1-7.5), queue wait summed 14.4 min. Compute meets 7.5 min; wall does not. The remaining bottleneck is runner-pool queueing over the serial plan, part and final jobs, not part 1's gate scans (103-135 s, cache miss only). Not closing: the 7.5 min wall holds only for calm cache-hit runs, and none ran in the window.

  6. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5543-20261025T0650Z (host melek) ended without a PR. No PR: no post-#6597 calm PR runs finished yet. Requeued re-measure slice (wait for >=3 first-attempt successful PR runs after 06:38:46Z).

  7. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    Re-measure after #6597 (PR #6633, docs/ci.md): 29 runs. Calm cache hit n=2 wall 14.9 min, 17.5 runner-min; calm miss n=3 wall 10.2, 24 runner-min; busy (2 parts) n=24 wall 29.2, 13.5 runner-min, compute 7.1 min. 7.5 min target met on compute, on wall only in quietest runs. No evidence against #6597. Open: fold plan/final into parts; same layout for #5530, #5562; more calm hit samples.

  8. squid-protocol commented on Oct 27, 2026

    @squid-protocol
    OwnerAuthor

    Closing (owner OK, 2026-10-26: close what's done). All checklist items are ticked. The re-measure after #6597 (29 runs) meets the 7.5 min target on compute (7.1 min), and on wall time in calm runs; busy runs are queue-bound, not warm-up-bound. Optional extensions noted in the last comment (folding plan/final into the parts, the same layout for #5530 and #5562) can be new issues if wanted.

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

    ci-cdgithub-actionsperformancescope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions