Skip to content

validate_workflow: overriding a declared cost_driver silently returns basis: catalog with the wrong (unmatched) figure #267

Closed

Description

@dkackman

templates/ltx2/text-to-video declares num_frames as a cost_driver. Overriding it from the curated 121 to 345 should invalidate the curated quote — and bucketing correctly finds no matching observed bucket for 345 — but validate_workflow then falls back to basis: "catalog", minutes: 1.8, runs: null: the curated figure measured for 121 frames, presented as if it still applied to 345.

Contrast: the identical override (121 → 345) on the H3 template instead produces basis: "unknown". Not a great answer either, but an honest one.

Why this is worse than unknown: catalog is documented as "a measured total for a run whose lists are the ones it was measured with" — which is exactly the case this isn't. It looks authoritative. Acting on it, I quoted "8 minutes" to a user from prompt-adjacent arithmetic instead of the tool's own (wrong) number, which is the only reason the wrong quote didn't ship further.

Ask: when a declared cost_driver is overridden away from the value the curated figure was measured against, and no observed bucket matches the new value, the plan should fall back to basis: "unknown" (as H3 already does), not silently keep serving the stale catalog figure.

Related: #255 (a different case of estimate.minutes not reflecting what the plan actually is — that one is cached_steps ignored, this one is a cost_driver override ignored).

Activity

  1. dkackman commented on Sep 21, 2026

    @dkackman
    OwnerAuthor

    triage: batch with #255, #268 — same dw/plan.py estimate code; #255's session does the work. Note for that session: _price only reprices a list-length change (_repriced); a scalar cost_driver moved off the value the curated figure was measured at is not checked at all, which is why LTX2 answers catalog while H3 (no curated cost for that shape) answers unknown. (triage by implementer agent, model opus via provider anthropic; lem is at develop head c5d4ac5, so nothing here is fixed-but-undeployed)

  2. added a commit that references this issue on Sep 21, 2026
  3. dkackman commented on Sep 21, 2026

    @dkackman
    OwnerAuthor

    Fixed. A declared `cost_driver` overridden away from its catalog-measured value now falls back to `basis: "unknown"` instead of quoting the stale catalog figure. Added `_scalar_driver_shifted()` in `dw/plan.py`, which extends the existing `_repriced()` check (previously only `for_each` list-length changes) to also catch a scalar driver variable overridden away from the value the catalog `cost` entry was measured at.

    Shipped as part of a batch with #255 and #268 (all three are fixes to dw/plan.py's pricing logic), one branch, one deploy.

    Suggested regression case (for the tester to add once verified): in regression-suite-smoke.md, validate a workflow that declares a scalar cost_drivers entry with arguments overriding that variable away from its catalog-measured default, and confirm plan.estimate.basis == "unknown" rather than the catalog minutes.

  4. dkackman commented on Sep 21, 2026

    @dkackman
    OwnerAuthor

    Verified over MCP against lem (develop 859e43c).

    Ran validate_workflow(name="templates/ltx2/text-to-video", arguments={"num_frames": 345}) → plan.estimate is now {minutes: null, basis: "unknown", runs: null, measured_on: null} — the stale catalog 1.8 min figure is gone. Matches expected:.

    Adjacent cases:

    • No arguments → basis: "observed", 2.5 min, 12 runs (pricing itself is intact).
    • {"num_frames": 121, "prompt": "a quiet lake at dawn"} (driver explicitly set to its measured value plus a non-driver override) → still basis: "observed", 2.5 min — an override that doesn't move a driver off its measured value isn't punished.
    • {"width": 1280, "height": 704} (the other two declared drivers shifted) → basis: "unknown" — the check generalises beyond num_frames.

    Adding the suggested smoke regression case. Verified by tester agent, model opus via provider anthropic.

  5. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Sep 21, 2026
  6. added a commit that references this issue on Sep 22, 2026
  7. added
    field-reportFiled from Don's own dw sessions (real use), not the harness
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    field-reportFiled from Don's own dw sessions (real use), not the harnessowner:testerTester's turn to actstatus:verifiedTester confirmed the fix via a real MCP call

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions