Skip to content

Det Sweep: non-Db2 shard count from measured durations (Part of #5919) - #6088

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

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

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #5919 (step 2 of the Opus rescue plan). Replaces the fixed MAX_SHARDS=6 / PER_SHARD=3 for the non-Db2 Det Sweep shards with sizing from the measured durations via ci_shard_plan (already imported lazily by the planner).

  • det_sweep_plan.shards_for(p, durations, waiting): fewest runners fitting SHARD_TARGET_S (10 min), capped by pool_cap(MAX_SHARDS, waiting), then reduced while the planned slowest/fastest ratio is over 1.3. PlanError when too many cases are unmeasured. No durations: the old fixed fallback.
  • emit() passes durations/waiting and emits the planned ratio.
  • Tests: 45, 70, 140 synthetic cases keep the ratio <= 1.3, stay in the pool cap, halve when busy, and partition exactly under proof_sweep.shard_cases; growth with work; fallback; real durations file.
  • No workflow edit, no ci_layout import or mention (step 1 waits for the owner / allow_workflows).

Cross-repo: none.

Gates: pr_gates --fast 7/7; det-sweep, ground-truth-plan, shard-plan tests green (plain pytest from /tmp too). Real plan (--event schedule): 3 shards, ratio 1.0.

Class table

Class: a det-sweep runner count fixed in the planner instead of sized from measured durations.

Member Status Evidence
non-Db2 shards (shards_for, MAX_SHARDS / PER_SHARD) fixed here tests at 45, 70, 140 cases
non-Db2 shard job timeout (timeouts_for) already sized from the matrix length unchanged, follows the new count
Db2 shards (db2_shards_for) handled by #6037 / #6059 existing tests
Evidence Refresh sweep / records (evidence_plan) handled earlier existing tests
queue depth from the workflow (step 1) out of scope: workflow edit needs owner / allow_workflows
smoke parts (step 3), Full Suite Gate legs (step 4) out of scope: workflow edits #5133, #5156

Sibling gaps

None in code. Steps 1, 3 and 4 of the plan in #5919 are workflow edits (not tied to a burned-estate program); step 5 is the calibration check after they run.

Lessons for agents

  • The ratio is shrunk by lowering the shard count (LPT balances better with fewer shards), not by adding shards.

Checklist: partial -- step 2 only; steps 1, 3, 4 need workflow edits.

🤖 Generated with Claude Code

… of #5919)

shards_for takes the durations (and the queue depth): the fewest runners whose slowest fits
SHARD_TARGET_S, at most MAX_SHARDS, reduced until the planned slowest/fastest ratio is <= 1.3.
Without durations the fixed fallback stays. No workflow edit.

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 23:35
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 23:38
@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

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 6903fa8 into main Oct 22, 2026
57 checks passed
@squid-protocol
squid-protocol deleted the churn/5919-20261022T2330Z branch October 22, 2026 23:58
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