Skip to content

CI: ci_rerun_stats --logs classifies image-pull re-runs; MGT gate-step scan measured (Part of #5137, #5142) - #5224

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5137-20261016T0715Z
Oct 16, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5137-20261016T0715Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5137, #5142. No workflow edit.

Re-run measure (after #5141 / #5177 / #5190)

ci_rerun_stats.py mainframe-ground-truth.yml det-sweep.yml --since 2026-10-15 --timeout ground-truth=35 --logs

before (10-13..14, 39 h) after (10-15..16)
MGT re-run attempts 13 0
Det Sweep re-run attempts 9 1

The one Det Sweep re-run (run 38830516356 attempt 1, PR branch churn/5089) is registry_pull: shard db2 4/4 raised Db2ImagePullError: INFRASTRUCTURE (not a code defect): could not pull the pinned Db2 image icr.io/... after 4 attempts; det then failed with "its shard did not report". Truly external, already behind the bounded retry (#5097), so no new retry.

Change

tests/tools/ci_rerun_stats.py: new cause registry_pull, found with --logs (reads only the log of a job whose failed step is a Db2 one; marker PULL_MARKER = the Db2ImagePullError text). Without --logs, or with the log expired, it stays db2_start. Tests: marker in the failed job's log / in another job's / absent / no logs; a log never overrides a timeout or a non-Db2 step; _db2_logs fetches only failed Db2 jobs.

#5142 box 2: MGT "Gate against" step (2-4 min) - measured, no fix adopted

The step is the cold scan of the 3 keyed corpora, run serially by ground_truth_ledger.measure_all. I tried scanning them concurrently (process pool warm-up) and timed the full ground_truth_ledger.py check cold, pinned to 4 cores with GALAXYSCOPE_MAX_WORKERS=4 (the runner's size):

run 1 run 2 run 3
serial (today) 87 s 95 s 86 s
3 scans concurrent 70 s 74 s 84 s

About 15% and inside the noise: one galaxyscope already uses the 4 cores (user time 3m36 vs wall 1m27 serial), so the corpora do not overlap usefully. Below my 20% bar, so not shipped. The cost is the engine scanning ~3 corpora; a real cut needs a warm scan cache keyed on the files that change a scan (the engine HEAD key makes every engine PR cold by design).

Box 1 (dsf unchanged-check) was fixed by #5190 (content-hash key); its cache is cold until main's next push touching the generation paths.

Sibling gaps

  • MGT gate step 90-250 s cold scan: measured above, not reduced; needs a scan-cache key narrower than the engine HEAD (changes what a stale DB can mean for a gate; owner call).
  • Det Sweep re-runs: 1 sample in the window; re-measure after a week.

Gates

pytest tests/tools/test_ci_rerun_stats.py + test_ci_retry.py 33 passed (plain pytest from /tmp); pr_gates.py --fast 6/6. tests/tools only: no golden, ledger or ratchet effect.

Lessons for agents

  • gh api .../jobs/ID/logs refuses output with terminal escape sequences: pass --allow-escape-sequences.
  • A process pool, not threads, for concurrent mainframe_corpus.scan: it sets and restores os.environ["PYTHONPATH"] around its subprocess.

🤖 Generated with Claude Code

…t failure (Part of #5137, #5142)

A failed Db2 start step is db2_start in the job JSON; with --logs the failed job's log is read and the
Db2ImagePullError INFRASTRUCTURE marker makes it registry_pull (external; the bounded pull retry already
exists). Verified live on Det Sweep run 38830516356 attempt 1 (icr.io pull failed after 4 attempts).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 16, 2026 07:30
@squid-protocol
squid-protocol enabled auto-merge (squash) October 16, 2026 07:31
@squid-protocol
squid-protocol merged commit e807928 into main Oct 16, 2026
42 checks passed
@squid-protocol
squid-protocol deleted the churn/5137-20261016T0715Z branch October 16, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant