Skip to content

Det Sweep: plan Db2 shards with 20% headroom and a long-pole floor (Part of #5882) - #6567

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/5882-20261025T0035Z
Oct 25, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/5882-20261025T0035Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5882 (planner headroom slice named in docs/agents/det-sweep-db2-acceptance.md).

What

The Db2 shard count was the fewest whose planned slowest fit the full 15 min budget, so run-to-run noise (case seconds move 30-50%) put ~3 plans in 4 over it. Also a shard's time was modelled as setup + load / jobs, hiding a long case (cbsa-bankdata, 432 s) that --jobs cannot split.

  • ci_shard_plan.py: HEADROOM = 0.8, shards_for(..., headroom=1.0), new shard_seconds (setup + max(work / jobs, longest case)), used by shards_for and timeout_minutes.
  • det_sweep_plan.py: Db2 shards plan with DB2_HEADROOM; db2_timeout uses the long-pole-aware seconds. Non-Db2 shards and Evidence Refresh keep headroom 1.0.
  • Longest-first inside a shard was already Det Sweep: a shard proves its longest case first (Part of #5882) #5947; across shards proof_sweep.split_cases. No change there.

Class / Sibling gaps

Class: a shard-count planner that sizes against the whole budget with no noise headroom and no long-pole floor. Members: Db2 shards (headroom added), non-Db2 det shards and Evidence Refresh sweep/records (get the long-pole floor, headroom unchanged), timeouts_for db2 (floor). Sibling gaps: DB2_MAX_SHARDS cap (6) is hit, see below; no fail-loudly PlanError when the cap cannot fit the unscaled target (existing tests pin cap-holds behaviour; not done here).

Sizing (ci-workflows.md)

Replay, committed durations, 81 Db2 cases, setup 420 s, jobs 4:

Db2 shards planned slowest shard work (s)
before 4 858 s 1738/1753/1748/1750
after 6 (cap) 852 s 1167/1160/1167/1166/1166/1163

Cost: +2 Db2 runners per full sweep, each with a ~4-7 min Db2 start (~10-14 runner-min). Note the 720 s headroom target is not reachable inside the cap of 6, so the plan takes the cap; the gain is shorter, balanced shards (planned ratio 1.006). Not replayed over the last 50 PRs (no sweep_plan --replay run): the change only affects PRs already planning db2_cases: all or large Db2 sets. Remaining: raise DB2_MAX_SHARDS (6+6+plan+det = 14 of 20 jobs)? and re-measure on the next full sweep; #5882 stays open.

Tests

test_ci_shard_plan.py (headroom boundary, long-pole floor, pole placement, Db2 plan fits headroom target, committed durations), test_db2_shard_plan.py ratio assertion loosened. Shard/plan tests, tree-wide guards, pr_gates --fast pass. Ratchets not run (no engine/golden change).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 25, 2026 00:44
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 25, 2026 00:46
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6567 @ 068e785: 1 failed check(s)

== shard 3 (1667394 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40147886926/job/121033375305
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_engine_only: 128 -> 73
summary.callgraph_misses: 28 -> 31
summary.callgraph_precision: 0.9797 -> 0.9831
summary.callgraph_recall: 0.9982 -> 0.998
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not 'eternity: 4 difference(s) from the golden\n summary.callgraph_engine_only: 128 -> 73\n summary.callgraph_misses: 28 -> 31\n summary.callgraph_precision: 0.9797 -> 0.9831\n summary.callgraph_recall: 0.9982 -> 0.998'
1 failed, 10 passed, 22 deselected in 192.41s (0:03:12)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 3 (1667394 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: doom-ios,doom-wasm,doom3-bfg,dsda-doom,eternity,freedoom,fsharp-doom,gore,linuxdoom,puredoom,woof
T0: 1792890203
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]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/13694cb1-2c22-4981-9756-e6c32b1adf47' 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-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6567 @ 9e05252: 1 failed check(s)

== shard 3 (1667394 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40150482379/job/121041711587
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_engine_only: 128 -> 73
summary.callgraph_misses: 28 -> 31
summary.callgraph_precision: 0.9797 -> 0.9831
summary.callgraph_recall: 0.9982 -> 0.998
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not 'eternity: 4 difference(s) from the golden\n summary.callgraph_engine_only: 128 -> 73\n summary.callgraph_misses: 28 -> 31\n summary.callgraph_precision: 0.9797 -> 0.9831\n summary.callgraph_recall: 0.9982 -> 0.998'
1 failed, 10 passed, 22 deselected in 112.59s (0:01:52)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 3 (1667394 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: doom-ios,doom-wasm,doom3-bfg,dsda-doom,eternity,freedoom,fsharp-doom,gore,linuxdoom,puredoom,woof
T0: 1792893417
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]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/1625cd2f-75e2-4f5f-86cc-a45eb16a8c5c' 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-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
squid-protocol and others added 2 commits October 24, 2026 22:09
… are no calls)

Bisected: eternity passes at 8545798^ and drifts at 8545798 (callgraph_engine_only 128 -> 73, misses 28 -> 31,
precision 0.9797 -> 0.9831, recall 0.9982 -> 0.998); doom-rosetta did not run on that PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 220f4ef into main Oct 25, 2026
54 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/5882-20261025T0035Z branch October 25, 2026 03:46
@squid-shepherd

Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant