Skip to content

fix(planner): refuse roll-up plans in milp_output - #814

Merged
zzylol merged 1 commit into
mainfrom
milp-output-reject-rollups
Oct 10, 2026
Merged

zzylol merged 1 commit into
mainfrom
milp-output-reject-rollups

Conversation

@zzylol

@zzylol zzylol commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Closes #813.

milp_output::aggregation_config takes a deployment's labels from the first RAQE it serves. ProjectASAP/sketch-bench#190 lets a deployment grouped by G_d serve a RAQE grouped by a subset G_r (a roll-up). With a roll-up plan, the configs would be written at whichever grouping came first, and nothing would error. asap-planner-rs tracks sketch-bench main, so this lands on the next lockfile update.

Change

  • plan_to_planner_output checks every RAQE against its deployment.
  • If the groupings differ, it returns the new MilpOutputError::RollupUnsupported { query, raqe, deployment }, which names both label sets.
  • The aggregation_config doc now states the invariant it relies on.

Reading a deployment at a coarser grouping in the engine is a separate feature. This is the interface #190 asks for in the meantime.

Tests

  • New rollup_is_refused: plans sum by (job), widens its deployment to (instance, job), and expects the error. It fails without the check.
  • cargo test -p asap_planner --lib optimizer:: (66 passed), cargo clippy -p asap_planner --all-targets -D warnings and cargo fmt --check pass. These ran on a CloudLab node, because the local machine lacks OpenSSL headers.

The issue also records a check that came back clean: MultipleIncrease is always keyed per series, because sum(rate) isn't collapsable and bare rate keeps every label.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis

sketch-bench#190 lets a deployment grouped by G_d serve a RAQE grouped
by a subset G_r. aggregation_config takes the labels from the first RAQE
a deployment serves, so such a plan would be written at whichever
grouping came first, silently. Until the engine reads a deployment at a
coarser grouping, plan_to_planner_output refuses a RAQE whose grouping
differs from its deployment's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
@zzylol
zzylol merged commit 0fd93d4 into main Oct 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MILP planner writes a roll-up plan at the first RAQE's grouping

2 participants