Skip to content

ci: per-test time ratchet in mainframe-ground-truth parts (Part of #5166) - #5256

Merged
squid-protocol merged 2 commits into
mainfrom
ci/5166-ground-truth-time-ratchet
Oct 16, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
ci/5166-ground-truth-time-ratchet

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5166 (box B follow-up).

What

mainframe-ground-truth.yml, ground-truth-part job (both matrix parts): the pytest step gets GITGALAXY_TEST_TIMES ($RUNNER_TEMP/times-ground-truth-part-N.json), followed by a "Per-test time ratchet (#5166)" step (time_ratchet.py check --times <that file>, the CI times file, not .test_durations) and an if: always() times upload. Copied from smoke-test.yml's full-suite parts. The check is inside the job the required ground-truth check aggregates, so an unmarked slow tests/cobol_mainframe test fails on its own PR (#5240, #5248 were this class). Ratchet logic, baseline and .test_durations untouched.

The artifact is test-times-ground-truth-part-N, which does not match smoke-test's test-times-part-*, so the nightly suite budget merge is unchanged.

New test: tests/core_engine/test_ground_truth_time_ratchet_workflow.py (env, ratchet reads the file pytest writes, order, artifact name).

Class table (workflows that run pytest)

Workflow Ratchet Status
smoke-test.yml yes already
mainframe-ground-truth.yml added here this PR
full-suite-gate.yml no sibling gap: OS x Python matrix, label-triggered; Windows/macOS runners are not comparable to the Linux baseline
cics-crucible.yml no sibling gap: tests/cics_crucible, own suite, not in the baseline
golden-crucible.yml no sibling gap: opt-in golden_crucible marker only

Evidence

  • time_ratchet.py check on a fake times file with an unmarked 20 s cobol_mainframe test: exit 1, FAIL line.
  • New test and workflow tests (draft gate, ground-truth plan, cache keys): pass; new test also passes via plain pytest from /tmp.
  • pr_gates --fast: 6/6. --ratchets: 8 pass, 0 skipped.
  • Real proof is this PR's own ground-truth run (the workflow is a plan input, so it runs in full once ready). If it exposes an existing unmarked >15 s test, mark that test slow, not the ratchet.

Cross-repo: none.

🤖 Generated with Claude Code

…rt of #5166)

smoke-test.yml ignores tests/cobol_mainframe on a PR, so an unmarked slow test there
was only caught after merge on main (#5240, #5248). Each ground-truth part now writes
GITGALAXY_TEST_TIMES and runs time_ratchet.py check on it, as smoke-test's parts do.

Co-Authored-By: Claude Opus 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 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 13:21
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

Severity Count
🔴 Critical 1
🟠 High 0
🟡 Medium 0
🟢 Low 0
ℹ️ Info 0

🔴 Critical Findings

[gitleaks] Identified a Private Key, which may compromise cryptographic security and sensitive data encryption.

File: .test_durations:19704
Rule: private-key
Secret detected in .test_durations (rule: private-key)

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5256 @ 6a41787: 2 failed check(s)

== ground-truth (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38907210327/job/116998990992
repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {7083f366-3204-43d0-b23c-23e53cc8ef1d}
Region: centralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: ground-truth
##[group]Run echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
# #5164: ... or when the plan found no ground-truth input in the PR (mode none). An empty mode is not none.
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$MODE" = "none"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
MODE: full
##[endgroup]
ground-truth parts: failure (tested-tree skip: , plan mode: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38907210327/job/116994188433
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
FAIL tests/cobol_mainframe/test_det_port_check.py::test_a_cases_subprograms_are_translated_with_it_4803: 67.0s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
FAIL tests/cobol_mainframe/test_refraction_differential.py::test_full_corpus_no_new_unexplained[aws-mainframe-modernization-carddemo]: 22.9s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
FAIL tests/cobol_mainframe/test_refraction_differential.py::test_full_corpus_no_new_unexplained[dsf]: 19.2s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
FAIL tests/cobol_mainframe/test_refraction_snapshot.py::test_full_corpus_snapshot[aws-mainframe-modernization-carddemo]: 18.2s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
##[error]Process completed with exit code 1.
log tail:
archive: true
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
PYTHONUTF8: 1
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 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 128046
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5207ec097cf3565e8096b876e7954b7420659c85785fdb6a0b80d34f4e85ef8b
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 12049406591
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 128046 bytes. Artifact ID is 12049406591
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/38907210327/artifacts/12049406591
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/ab7a5be0-8d90-487c-bd3f-2cb058c9db10' 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

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 16, 2026
…y over 15 s (Part of #5166)

The new ground-truth time ratchet failed part 1 on four existing tests (CI times of run
38907210327): they get their observed seconds, so only NEW slow tests fail. Part 2/2 had
none over the limit; smoke-test's parts already gate the rest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol removed 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

CI shepherd: the head of this PR (96f5456) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). 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:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 16, 2026 13:40
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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 shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant