Repository navigation
Tighten StaffScheduling and SWRTD QUBO size bounds - #1223
Conversation
StaffScheduling -> DecisionQUBO assumed 63 bits per worker count, and SequencingWithReleaseTimesAndDeadlines -> DecisionQUBO assumed every task may start anywhere in [0, time_horizon]. Neither source exposed the quantity the construction actually depends on, so the bounds ran three to four orders of magnitude above the corpus measurements. Add num_workers_bits to StaffScheduling and max_start_slots to SequencingWithReleaseTimesAndDeadlines, state both QUBO bounds in them, and declare the new fields in the two rules that target these models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agentic Review ReportPR #1223: Tighten StaffScheduling and SWRTD QUBO size bounds. Reviewed head Structural
Semantic check of the formulas (by hand)
Quality
Feature test
FindingsCritical: none. Important
Minor |
The sparse-support test kept the 63-bit StaffScheduling budget, so a regression to the old formula would still pass. Tighten it to the new prediction, add an SWRTD case, and restate both proofs' size bounds in the new parameters, including the two incoming rules that declare them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed the review in 0801132:
🤖 Generated with Claude Code |
GiggleLiu
left a comment
There was a problem hiding this comment.
Agentic Review Report
PR #1223: Tighten StaffScheduling and SWRTD QUBO size bounds
Review date: 2026-10-29. Fresh-context read-only review of 0daa9a8265aefe40983beeba0464f8feea8c3316...0801132969fd4e442b06526a0fbfbc4956dd9209. Used the PR's own stack base, not origin/main. Local implementation evidence is diff-1223.patch; GitHub context is context-1223.txt in this directory.
Verdict: No new blocking finding in this diff. Hold stack integration until prerequisite fixes land.
Structural and semantic review
Reviewed both tightened direct-QUBO bounds, new model parameters, incoming reduction metadata, tests, and manual updates against exact #1218.
StaffScheduling uses B = magnitude bits of workers (minimum one), s schedules, and p periods. Count and slack domains require at most B bits each, giving N <= B(s+p+1). Budget terms form a clique of at most B(s+1) variables. Each period contributes at most B surplus variables, B²*s count/surplus pairs, and choose(B,2) surplus pairs. Summing yields the declared coupling bound. W=0 deliberately has B=1, an upper bound on the zero bits actually allocated.
SequencingWithReleaseTimesAndDeadlines computes max_start_slots from each task's release, deadline, and duration. All time fields are nonnegative i64, so deadline−release stays in i64. A negative available window yields zero slots; otherwise the nonnegative result plus one is widened before adding and fits u64 even at the i64 boundary. Total variables are at most n*max_start_slots, and all couplings are bounded by its complete graph.
Incoming X3C and ThreePartition reductions conservatively bound the newly required parameters. Checked that their source invariants imply the declared worker-bit/window bounds. No domain restriction, solver behavior, or extraction change is introduced.
Quality review
Regression expectations include W=0, workers requiring remainder bits, extreme windows, the staff coupling bound 67 on the selected 3-schedule/3-period instance, and the SWRTD bound 36 for three tasks with maximum window 3. The proof of the coupling bound counts actual interactions and does not rely on those example values.
Feature tests and verification limits
No exact #1223 compilation or metadata tests were run by this reviewer because the shared build slot was reserved for supported descendant tests, the #1224 numeric reproduction, and another independent PR. Source/target CLI behavior for the underlying StaffScheduling and SWRTD encodings was exercised on #1218 and passed, but that binary predates these metadata changes and does not validate these new formulas. This distinction is intentional.
Own-base git diff --check passed. Read the complete affected tests and construction code and independently derived both bounds. No current GitHub CI results were visible in the collected stack metadata. Parent should run current integrated parameter tests before merge.
Findings (severity order)
No new blocking finding. The numeric formula changes appear safe. The inherited #1214 allocation panic is outside this diff and should be fixed before integrating this dependency chain.
GitHub PR Audit — #1223
GATE: PASS
Harm signals (blocking)
- harm.secrets (
security.no-secrets): OK — inspected added text; no credential/key/token or private-data additions found. - harm.dangerous-files (
git.harm-signals): OK — changed files are scoped source, tests, and manual material; no conflict markers, unexplained binaries/archives, scratch files, or local configuration. - harm.generated-artifacts (
code.generated-artifacts): OK — no generated example/schema/reduction-graph exports or build/dependency outputs are committed. - harm.cache (
code.generated-cache): OK — no cache directories added. - harm.debug-leftovers (
code.debug-leftovers): OK — no debugger, debug print, temporary probe, or WIP instrumentation in added production code.
PR legibility (advisory)
- pr.description-quality (
github.pr-description-quality): OK — body describes scope, purpose, validation, and limits; comments and reviews were read withgh-axi pr view --full --comments --reviews. - pr.traceable (
github.prs-traceable): OK — purpose and validation are stated and the series/issue context is identifiable.
Harm gate PASS does not clear correctness findings. No tracked file, commit, remote branch, PR comment, review, or merge was modified by this reviewer.
GiggleLiu
left a comment
There was a problem hiding this comment.
Agentic Review Report: stack consolidation
Approved current head 0801132969fd4e442b06526a0fbfbc4956dd9209 for merging into feat/binary-ilp-to-sat only. This contains the previously reviewed changes and, where applicable, the preceding recorded backend merges. The numeric blockers in #1214 and #1224 are fixed and reviewed at 2226ebec4 and 52bd171a0.
Rechecked inline comments, submitted reviews, PR conversation, linked-issue comments, and Codecov comments. No new unaddressed material issue. Harm gate remains PASS from the independent reviews. The old roadmap draft/hold instructions predate the user's current authorization; deferred rules and #1219/#1220/#1221 remain excluded.
The repaired aggregate passed 7,194 native tests, formatting, all-target/all-feature Clippy, and make paper at d96e7c8b8; the final website gate subsequently passed all 336 browser cases at 77774797e. These are aggregate gates, including the separately reviewed integration fixtures, not a claim that this branch head was independently retested unchanged. Required main-branch CI remains pending. This feature-branch merge preserves the individual PR record.
Summary
The corpus accuracy report found these two direct QUBO rules to have the loosest bounds:
[0, time_horizon].Neither source model exposed the quantity the construction actually depends on, so this PR adds one parameter to each:
StaffScheduling::num_workers_bits: the magnitude bits of the worker budget, the same convention astime_horizon_bits.SequencingWithReleaseTimesAndDeadlines::max_start_slots: the largest start window of any task. It always fits inu64(at most 2^63), so the model accepts exactly the same inputs as before. A per-instance total, likeSequencingWithinIntervals::num_start_slots, could exceedu64.Both QUBO bounds are now stated in terms of these parameters. The two rules that target these models also declare the new fields:
num_workers_bits ≤ universe_size/3 + 1. Transforms have no logarithm, so this can't be tighter.max_start_slots ≤ num_groups·(bound+1).Corpus measurement (100 instances per rule, 0 violations)
num_varsnum_quadratic_termsnum_varsnum_quadratic_termsSWRTD's quadratic count still depends on how much the start intervals overlap, which no parameter expresses.
Workspace tests, fmt and clippy pass. Stacked on #1218.
🤖 Generated with Claude Code