Repository navigation
refactor(planner): plan without deadlines over every tumbling-window width (#1185, part 2) - #1198
Merged
Merged
Conversation
…ling-window width (#1185, part 2) The facade's planning budget, the seed and expanding tumbling-window-width rounds, and the Pass 1, Pass 2 and Stage 2 generation deadlines are removed. Planning runs Pass 2 once over the complete width domain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1185, part 2) Types and executor exports, retention and compilation took an optional deadline that no caller set; the devtools, snapshots, dag-viewer and scripts lose the time-limit flag and the round report fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; docs without planning deadlines (#1185, part 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r other reasons (#1185, part 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… part 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…udget (#1197) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Part 2 of #1185 (part 1: #1188). The planner still ran on a wall-clock budget upstream of Stage 3. The facade gave planning 30 s, split into a seed round over a few tumbling-window widths and growing intermediate rounds, and kept the best round's plan. Pass 1, Pass 2 and Stage 2 checked deadlines too. So the widths searched, and with them the selected plan, depended on machine speed and load. That is what made the wall-clock-ignored tests (markers #1067/#1175/#1180) flaky.
What
PlanSearchSettings::time_limit_mstypesandexecutorEvaluationDeadlineExceededstage_pipeline --milp-time-limit-s@MILP gaps (Stage 3 review: plan selection, the MILP over the memo, cost and accuracy constraints #1015).How
crates/planner/src/run.rs):run_planningruns Stage 0 and Pass 1, then Pass 2 → Stage 2 → Stage 3 once, then builds the selected plan withAssignmentRealizer::realize.Round,RoundEnd,RoundOutcomeandplan_round.calibration_is_frozenandhas_splittable_window.PlanningRoundReportis folded intoPlanningReport.Pass2RoundState), the width domain and frontier (TumblingWindowWidthDomain,TumblingWindowWidthFrontier) andcheck_generation_deadline.tumbling_window_width_domain(grids), the divisor set the oldCompleteround used. It still skips candidates whose signature already exists.types,executor: the deadline parameters are deleted. No caller ever set them.flatten_before,compile_beforeand theset_retentiondeadline, along with their*DeadlineExceedederrors.CandidateGenerationTimeout,PerComputationLogicalMemoCandidatesError::TimeoutandPass2RuleError::DeadlineExceeded.Key code interfaces added / modified
crates/planner/src/run.rspass2/logical_memo_candidates.rs,catalog/mod.rsRemoved, with no replacement:
executor::compile_beforeandError::CompilationDeadlineExceededflatten_beforeandFlattenDeadlineExceededPhysicalASAPCompilationErrorTumblingWindowChainExpansionErrorInstallableDagError::DeadlineExceededCandidateGenerationTimeoutErrorSelectingPlan::EvaluationDeadlineExceededSelector::offer_beforestage_pipeline --milp-time-limit-sUsage:
Major algorithm changes
Tumbling-window-width search
tumbling_window_width_domain(grids)(every divisor width), then Stage 2 and Stage 3 once.stage_pipeline)runtime_installtwo-query fixtureplanner-layering-1Before this PR
Planning stopped after 30 s. On large workloads it returned the best plan over the widths it had reached, which varied with machine load. Tests that depended on the full domain were ignored as wall-clock flakes.
After this PR
Planning is deterministic: it returns the optimum over every tumbling-window width for any machine speed, and the time it takes is the cost of that search. The wall-clock markers #1067/#1175/#1180 are gone from the tests.
Verification
devtools stage_pipeline: 44 pass, andplanner_fuzz,memo_pricingand the manifest test are un-ignored.corpus_snapshots --release --include-ignored: 9 pass (q05 now searches the full domain; its snapshot is unchanged).test_server28, Node 45. Thetest_viewerheader check is updated for the removed round text.cargo fmt --all --checkandcargo clippy --workspace --tests --all-features: clean.cargo test --workspace(the CI command) was used to find the tests that now take over 30 min; they are ignored with Planning is about 20x slower since the full tumbling-window-width domain (#1185) #1197.Limitations
tools/benchmark_tumbling_window_search.pyand the two evaluation docs are marked historical: their budget and round fields no longer exist.server.py's 300 sPLAN_TIMEOUT_SECONDS(HTTP subprocess guard) andplanner_fuzz --time-budget-s(campaign length) are kept; neither is a planning parameter.Closes #1185.
🤖 Generated with Claude Code