Skip to content

CI planner: Db2 shard setup from measured timing, predicted shard ratio (Part of #5919) - #6059

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5919-20261022T2020Z
Oct 22, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5919-20261022T2020Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5919 (slice 4: Db2 shards in Det Sweep / Evidence Refresh). Planner + tests only, no workflow edits.

What

  • New tests/tools/db2_shard_plan.py (stdlib): measured_setup_s (median setup_s of recent Db2 shards from det_sweep_timing rows; needs 3 usable rows, clamped to 0.5-2x the typed value, else the fallback), predicted_ratio / ratio_warning / plan_check (slowest/fastest planned shard vs det_sweep_timing.MAX_RATIO 1.3, before the shards run).
  • det_sweep_plan.py: optional --timing DIR... feeds the measured setup into db2_shards_for, timeouts_for and evidence_plan (new optional params, default unchanged); emit adds db2_ratio only when there is a Db2 matrix and warns over 1.3x. The module is imported lazily so Evidence Refresh's sparse checkout still works without it.
  • Without --timing the output is unchanged (existing tests green).

Class table

Member Status
Db2 setup (DB2_SETUP_S) typed measured via --timing (here)
Ratio checked only after the run predicted in the plan (here)
Non-Db2 SHARD_SETUP_S typed sibling gap (same helper would serve)

Cross-repo

None.

Owner items (workflow edits, out of scope)

  • Add tests/tools/db2_shard_plan.py and det_sweep_timing.py to Evidence Refresh's lane sparse-checkout list before passing --timing there.
  • Download recent shard timing artifacts in the plan jobs and pass --timing.

Lessons for agents

  • pr_gates --fast uses ruff 0.17.0 from ~/.cache/gitgalaxy/ruff-0.17.0/bin/ruff (the 0.16.10 path in the worker doc is a stale directory).

Gates: pr_gates --fast 7/7, audit_check clear, tree-wide guards + time ratchet (296 tests, 0 over). Ratchets/golden not run: no parser code touched.

🤖 Generated with Claude Code

…io (Part of #5919)

db2_shard_plan.py: the median measured setup of recent Db2 shards (clamped, with a fallback) replaces the typed
DB2_SETUP_S when det_sweep_plan.py is given --timing, and the plan reports the predicted slowest/fastest ratio.
No workflow edits.

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 22, 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 22, 2026 20:29
@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 22, 2026
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 20:32
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

1 similar comment
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant