Skip to content

ground-truth: cache the warm scans, pick layout by queue depth (Part of #5543) - #5616

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5543-20261019T1135Z
Oct 19, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5543-20261019T1135Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Part of #5543 (both checkboxes of the 2026-10-19 comment, mainframe-ground-truth.yml).

Owner decisions

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

The night-shift queue item for the rescue run (5543-20261019T1321Z) carries allow_workflows: true, so the earlier "needs owner confirmation" note is resolved.

What changed

  • plan keys the warm scans by hashFiles(corpora.json) plus engine state (gitgalaxy/**, mainframe_corpus.py, pyproject.toml, requirements) and looks them up with actions/cache/restore (lookup-only). The scans are saved on main only (Siblings of #4968: per-PR cache saves (mainframe-corpora key) #5024). On a hit the warm job is skipped; part 1 restores the cache and runs the ledger gate.
  • plan runs the new stdlib-only tests/tools/ci_layout.py to choose the layout, logged in the job summary. Calm: warm + 4 parts. Busy (more than 8 waiting PR jobs): 2 self-warming parts. Non-PR events, mode none and an unreadable queue are calm.
  • MAINFRAME_ENGINE_KEY lets CI name the scan directory so the cache key and scan dir agree.
  • The matrix comes from fromJSON(plan.matrix) with the 4-part list as fallback, so a failed plan job gives the old layout. The ground-truth aggregate accepts a skipped warm job only when the plan said none was needed. The required check name, the ledger gate, the tests and the per-test time ratchet are unchanged.
  • Tests: test_ci_critical_path_split.py follows the new layout (plus new layout, cache and aggregate tests); test_sweep_plan.py has a mechanical assertion update (matrix is now an expression, --splits ${{ matrix.parts }}).

Measurements (from gh api run history)

  • Warm job about 262 s (scan 191 s); gate about 30 s.
  • Calm miss: unchanged, warm then 4 parts.
  • Calm hit (estimate until it runs on CI): the warm job (~262 s, one runner) is dropped and part 1 gains about 30 s, so about 4 runner-minutes saved and about 4 minutes less wall time.
  • Busy: 2 parts, so fewer runners are held while the queue is deep, at the cost of longer wall time per part.

Open

  • BUSY_ABOVE=8 is my own choice; promoter-bot's busy-mode value is not in the repo.
  • The CI cache size is unmeasured (local _scans is 1.5G across many engine keys).
  • A main engine commit whose push is skipped as tested-tree leaves no cache until the nightly or another push saves it.

Remaining slices

  • docs/ci.md paragraph on the new layout (kept out for the 5-file limit).

Class sweep

Class: a CI layout hard-coded as "warm + 4 parts" in tests and docs. Sibling gaps: docs/ci.md still describes the fixed layout.

Gates: pr_gates --fast 6/6, pr_gates --ratchets 8/8, tests/tools 1505 passed (1 failure, test_pin_requirements_check_all, touches no file in this diff), time_ratchet.py check 0 over the limit.

CI on a952113

  • Calm layout ran: ground-truth-warm + parts 1/4-4/4 all green, ground-truth green (same ledger gate as main).
  • Det Sweep det red only because db2 4/4 could not pull the pinned Db2 image (infrastructure). Its 12 cases never reported. The 4 NOT PROVEN det cases (cbsa-crecust, mortgage-csmrt, mortgage-mpmt, zecs-zecs003) are the expected set (sweep: as expected), not a regression.
  • Not yet exercised on CI: the cache-hit path (main must save the scans first) and the busy layout. Measure both after merge (the issue's Measure checkbox).

🤖 Generated with Claude Code

…th (Part of #5543)

Calm queue: warm job (skipped on a scans-cache hit) + 4 parts. Busy queue:
2 self-warming parts. The choice is logged in the job summary.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 19, 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 19, 2026 12:24
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 19, 2026 12:44
@squid-protocol squid-protocol added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5616 @ a952113: 2 failed check(s)

== db2 4/4 (failure) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/39251882486/job/118057902917
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --db2-only --cases --work /tmp/gitgalaxy-scratch/ci-digest/sweep
errors:
fail-on-cache-miss: false
Traceback (most recent call last):
equivalence_db2.Db2ImagePullError: INFRASTRUCTURE (not a code defect): could not pull the pinned Db2 image icr.io/db2_community/db2@sha256:2de8151713c261843868c5c3411b57be6ae79d99d70a5b3022337836776bfda6 after 4 attempts: docker pull -q icr
##[error]the background Db2 start did not finish
##[error]Process completed with exit code 1.
log tail:
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
GITGALAXY_ORACLE_PREBUILT: 1
DB2_JOBS: 4
GITGALAXY_DB2_POOL: 4
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
MAVEN_ARGS: -ntp
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-db2-logs-3.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 642
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 05d15e26e29829ce7b785b81f01e81d383ba72758dad7995fe2feb16fe5024d8
Finalizing artifact upload
Artifact det-sweep-db2-logs-3 successfully finalized. Artifact ID 12185853531
Artifact det-sweep-db2-logs-3 has been successfully uploaded! Final size is 642 bytes. Artifact ID is 12185853531
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39251882486/artifacts/12185853531
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/6f8b1dd1-349a-4a7e-bab1-c8928039d223' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== det (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39251882486/job/118065307948
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases cbsa-crecust,mortgage-csmrt,mortgage-mpmt,zecs-zecs003 --work /tmp/gitgalaxy-scratch/ci-digest/sweep
det cases not proven: cbsa-crecust,mortgage-csmrt,mortgage-mpmt,zecs-zecs003
errors:
det mortgage-csmrt NOT PROVEN proven on 5 scenarios, covering 1/1 paragraphs and 1/2 branches
det mortgage-mpmt NOT PROVEN
det zecs-zecs003 NOT PROVEN
det cbsa-crecust NOT PROVEN
##[error]Process completed with exit code 1.
log tail:
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
With the provided path, there will be 130 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-ledger.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 104235
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 62eddf7cf805cfb8d0572df78381a0a576eee0f643d9a0d92470d80d193e2f99
Finalizing artifact upload
Artifact det-sweep-ledger successfully finalized. Artifact ID 12187616175
Artifact det-sweep-ledger has been successfully uploaded! Final size is 104235 bytes. Artifact ID is 12187616175
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39251882486/artifacts/12187616175
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/27cc98b1-23cf-430d-adf5-8514dc8b6868' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md labels Oct 19, 2026
@squid-protocol
squid-protocol merged commit 0538170 into main Oct 19, 2026
88 of 90 checks passed
@squid-protocol
squid-protocol deleted the churn/5543-20261019T1135Z branch October 19, 2026 13:30
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