Repository navigation
Closed
Labels
ci-cdContinuous integration, delivery, and automated runnersenhancementNew feature, sensor, or structural signaturepriority: highCore feature broken, but workarounds existscope:infraCI, tooling, churn/factory, docs infrastructure
Milestone
Description
Why (measured 2026-10-09). A day of merges turned into a dance of re-merges and restarted 40-min CI runs. Root causes, from a review of all 39 workflows and the day's 300 runs:
- Nothing is required to merge.
mainhas no required status checks and no rulesets; repo auto-merge is on. Every gate is a convention (pr_check, the shepherd). Bot PRs merge with--autobefore their tests mean anything: evidence: refresh stale records and the evidence report #4820 landed a refresh computed on an older main and turned main red for every PR. - Generated data lives on main with several writers. PRs commit evidence records, the coverage ledger, rendered evidence pages, the register page and spec status. Seven workflows auto-commit to main after pushes (Evidence Refresh, Mainframe Ground Truth, Archetype Validation, and the call-resolution / graph-comparison / tree-sitter-accuracy / tri-comparison histories). Every bot commit stales or dirties open PRs and re-runs main's CI (19% of the day's minutes; the bot's own runs another 15%).
- Every PR proves everything. The full det sweep, golden masters and ~32 workflows run even for a one-line change. Our own PRs were 65% of the minutes, much of it restarts.
- Db2 cases are never tested on PRs; their verdicts come from local sweeps and the nightly bot.
- Third-party actions that build Docker images per run (muninn) fail together when Docker Hub throttles GitHub's runners (429/504, 2026-10-09 21:06Z onward).
Interim (done 2026-10-09): Evidence Refresh disabled (owner) and its in-flight run cancelled; #4813 (no timestamp churn); CI shepherd + digest (#4819, #4823: infra reruns ×3 15 min apart, registry rate limits = infra).
Plan, in order (each step independently safe)
- Required checks that always report + a merge queue.
- One always-running aggregator job,
ci-gate, onpull_requestandmerge_group, required by a ruleset on main. - Path-filtered workflows decide inside the job (skip → success) instead of at trigger level, so a required check can never sit "expected" forever.
- Merge queue on, so every merge is tested against the real main.
- Bots go through the queue like everyone else.
- One always-running aggregator job,
- Generated facts off main, one writer.
- Evidence records, the coverage ledger, rendered evidence pages and report, spec status and the history files move to one data branch (
generated), written only by the bots, fast-forward only, stamped with the main SHA they were built from. - PRs never commit generated files.
- Readers (the evidence report, proof_blockers, the docs site, the release gate) read the data branch; the release gate checks it was built from the release SHA.
- Ends the dance permanently and lets Evidence Refresh come back on (supersedes evidence-refresh bot: re-render / merge main right before auto-merge (a refresh computed on an older main turned main red, #4820) #4822's band-aid).
- Evidence records, the coverage ledger, rendered evidence pages and report, spec status and the history files move to one data branch (
- Prove only what moved (det sweep: copy forward verdicts by content key, prove only what moved, work-sized shards up to 20 #4814): content-keyed verdict cache, work-sized shards up to 20, and a nightly no-cache audit. Db2 cases are included through the cache plus a nightly Db2 job.
- One PR workflow:
- plan → affected shards → one result;
- the small audits (ruff, mypy, dead-key, AST/tree-sitter accuracy, golden guard…) folded into one job;
- path filters that match what each check actually reads (audit in progress);
- cancel-in-progress already holds on 36/39.
- Shepherd step 3 (CI shepherd: wait/merge/re-merge/rerun deterministically, failure digest + local repro, bounded fixer hook (was: merge watcher upgrades) #4790): "failing on main too" triage (one note, not one per PR); a fixer hook; auto re-merge when only generated files conflict. Mostly moot after step 2.
- Brittle third-party actions: run muninn from a prebuilt pinned image (or weekly + main only), so a Docker Hub hiccup can't block PRs.
While the bot is off: a nightly Db2-only det sweep (local or a small scheduled job), so Db2 cases stay checked.
Owner, 2026-10-09: "we just need to fix this mess with your plan so take over". Executed by the orchestrator + agy.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
ci-cdContinuous integration, delivery, and automated runnersenhancementNew feature, sensor, or structural signaturepriority: highCore feature broken, but workarounds existscope:infraCI, tooling, churn/factory, docs infrastructure
Activity
ci: core checks always report (required-ready); det sweep proves only…
squid-protocol commentedon Oct 9, 2026
Step 2 design: generated facts off main (draft, needs owner decisions)
Inventory (agy map, 2026-10-09): 10 generated families, all committed by PRs today:
tests/equivalence/*/evidence.json, crucible ports);oracle_assumptions.md);blockers_history.jsonl;*-historyworkflow outputs (call-resolution, graph-comparison, tree-sitter accuracy, tri-comparison);Writers are a tool run in the PR and a bot on main. Blocking checks read most of them.
Split them into two kinds; they need different treatment:
blockers_history.jsonlgenerateddata branch (or gh-pages for the docs site). PRs never commit them; the freshness tests become a bot-side check plus the release gate.Why B stays: records carry
evidence.py approvesign-offs (a person's decision, owner policy #4048), and blocking checks compare a PR's proof against them. Moving them off main would move approvals and change the evidence policy; that's a bigger decision than plumbing.Owner decisions needed:
The remaining dance after this: only PRs that change the same case touch the same B files (per-case since #4811), which is a real conflict, not churn.
squid-protocol commentedon Oct 10, 2026
Owner decisions (2026-10-09): yes to all three. (1) Rendered pages / charts off main to a
generateddata branch with one writer; (2) evidence records + ledgers stay on main, the bot refreshes stale ones nightly only, through required checks; (3) re-enable Evidence Refresh once 1+2 land. Building step 2 now.🤖 Generated with Claude Code
evidence pages off main to the `generated` branch (one writer); Evide…
evidence pages off main to the `generated` branch (one writer); Evide…
squid-protocol commentedon Oct 10, 2026
Step 1b done (2026-10-10): ruleset 24824983 "main: required checks (#4825)" active on the default branch:
det,full-suite,ground-truth,mypy-audit,ruff-audit(GitHub Actions), not strict, no bypass (bots included). Step 1a (#4826) made these report on every PR; step 2 (#4827) took the evidence pages off main; Evidence Refresh is re-enabled nightly-only.Remaining: history bots off main (step 2 v2), cached base translation for the port diff, folded small audits (step 4), muninn without per-run Docker Hub pulls, merge queue later.
🤖 Generated with Claude Code
ci: full suite in 3 parallel parts; det shards balanced by recorded d…
ci: balance the 3 full-suite parts by recorded test durations (#4825) (…
squid-protocol commentedon Oct 10, 2026
Status + trimmed plan (owner, 2026-10-10).
Done:
PR push → all green went from 40–52 min to ~13 min.
Remaining, in order:
ground-truth, now the slowest required check (8–13 min).Nice to have (later): fold the small audits into one job; history bots off main; shepherd fixer hook / auto re-merge / scheduled routine.
Dropped: evidence report off main (only the nightly bot writes it, so no dance); muninn prebuilt image (the shepherd merges past infra-only failures of non-required checks).
🤖 Generated with Claude Code
ci: path-filtered workflows trigger on what they read (17 gaps fixed,…
ci: main-watch opens an issue when a check fails on main, closes it w…
ground-truth: corpus tests in parallel with a scan lock; feature-inve…
squid-protocol commentedon Oct 10, 2026
Next batch (owner, 2026-10-10): PRs first, post-merge work when idle. After a merge, main's push-triggered workflows (the OS × Python matrix, crucibles, ground-truth, history bots…) take runners from PRs waiting on checks. GitHub has no job priority, so we control what runs after a merge and when:
cancel-in-progresson push runs of read-only check workflows; workflows that write commits keep their no-cancel rule.Plus, from this round:
setup-pythonpip caches (7.8 of 10.4 GB over 22 keys; over the 10 GB limit, so the gnucobol-image / corpora / m2 caches get evicted);gh pr update-brancha green PR that isbehindinstead of waiting forever;Delegated to Haiku / agy; orchestrator reviews before merge.
🤖 Generated with Claude Code
squid-protocol commentedon Oct 10, 2026
Batch update: pip cache consolidation dropped. My diagnosis was wrong. Only smoke-test and full-suite-gate use
cache: pip, and they already sharepyproject.tomlas key. The 22 caches are OS × Python matrix legs × refs (setup-python keys include OS + version). Fewer matrix runs (nightly-only OS matrix, Haiku B's PR) is the real lever; re-measure cache usage after it lands. Small audits folded: #4844.🤖 Generated with Claude Code
ci: the small audit checks run in one job (#4825) (#4844)
ci: PRs first -- post-merge checks run on the latest main when runner…
squid-protocol commentedon Oct 10, 2026
Done; closing. CI v2, delivered 2026-10-09/10:
generatedbranch with one writer (evidence pages off main to the generated branch (one writer); Evidence Refresh nightly only (#4825 step 2) #4827); Evidence Refresh nightly-only; per-case ledger (feat(#4789): per-case det-sweep coverage ledger; CICS spec status page bot-generated #4811); no timestamp churn (det_coverage_ledger: keep unchanged entries (stops the evidence-refresh loop that dirties every ledger PR) #4813).PR push → green went from 40–52 min to ~13 min. Leftover nice-to-haves: #4847
🤖 Generated with Claude Code
ci: post-merge dispatcher also runs on push to main; cron is the fall…
ci: seed the Generated Java same-base cache from its own uncancellabl…