Repository navigation
validate_workflow's plan.estimate ignores this box's observed history: basis 'unknown' on a workflow with 11 recorded runs #154
Description
tool: validate_workflow (plan.estimate), against list_workflows / get_workflow
What happens
validate_workflow is documented as the call to make before run_workflow, and its plan.estimate is what a consumer quotes a price from. But that estimate is derived from the curated cost block only — it never consults this box's own observed history, even when that history exists and the other two discovery calls report it.
Repro (workspace qa-verify, all free, no GPU)
list_workflows(shape="shot", traits="identity-referenced")
-> templates/minimax/reference-to-video:
"cost": null,
"observed_minutes": 8.04,
"observed_runs": 11
get_workflow(name="templates/minimax/reference-to-video", variables_only=true)
-> "observed": {"device": "cuda", "name": "NVIDIA GeForce RTX 3090",
"runs": 10, "cold_minutes": 8.04, "cold_runs": 10,
"cold_range_minutes": [7.75, 11.08],
"drivers": {"width": 960, "height": 544,
"num_frames": 124, "num_inference_steps": 9},
"since": "2026-09-11T20:30:38Z"}
validate_workflow(name="templates/minimax/reference-to-video")
-> "estimate": {"minutes": null, "basis": "unknown",
"device": "cuda", "measured_on": null, "partial": false}
Expected
plan.estimate reports the observed figure when there is one and no curated cost — something like {"minutes": 8.04, "basis": "observed", "measured_on": "RTX 3090", "runs": 11}. basis: "unknown" should mean nobody has a number, not nobody curated one.
Actual
basis: "unknown", minutes: null — on a workflow this machine has finished 11 times with a 8.04 min cold median and a known driver set. A caller who follows the documented path (validate, then acknowledge the cost it quotes) is told the run's cost is unknown while the server holds a good measurement two calls away.
Why this matters more than a cosmetic gap
The cost-acknowledgement handshake is built on this value. run_workflow's docs say to pass {"fingerprint": ..., "minutes": plan.estimate.minutes, ...} and reserve bare true for "a plan that was null". So an estimate that needlessly says unknown pushes callers onto the weaker acknowledgement form for exactly the workflows this box knows best — I had to pass minutes: null twice this cycle on an 8-minute H3 render.
It also lands hardest where it is least affordable. #149 deliberately dropped the curated cost from composable-references and reference-to-video because the measurements no longer matched the schedule, on the reasoning that "they will come back through this box's own history (#93)". They have come back — observed_minutes is populated — but validate_workflow still can't see them, so from the consumer side those templates read as having no cost at all.
Second, narrower half: curated wins even when observed disagrees
templates/minimax/storyboard carries both: curated cost 10.1 min and observed_minutes 11.84 over 7 runs on this box. validate_workflow(name="templates/minimax/music-video") likewise answers {"minutes": 35.0, "basis": "catalog", "measured_on": "RTX 3090"} from the curated figure.
list_workflows' own documentation says to "prefer [observed] when quoting a price for this machine, fall back to cost". plan.estimate does the opposite. I'd rather see it follow the documented precedence and keep saying which one it used via basis, since — as that doc puts it — "a figure a maintainer measured on their card and one this box averaged last week are different claims".
Notes
Found while verifying #147/#149/#150 (qa-verify), not while chasing this. No opinion on whether the two halves are one change or two. Reported by model opus via the anthropic provider, consumer-only session — everything above is from the MCP responses quoted, I have no view of the code.
Activity
fix: #154 #155 #157 #158 - the plan quotes this box's history, an H3 …
Merge fixes for #154 #155 #157 #158 - observed cost in the plan, the …
dkackman commentedon Sep 14, 2026
Fixed in c0435d2 (branch
fixes/2026-09-14c, merged todevelop), deployed tolemand verified live.Both halves, with the precedence you asked for.
plan.estimatenow consults this box's own history (dw/server/observed_cost.py) before the curatedcostblock, andbasissays which it used:estimatecarries a newrunsfield - the number of comparable cold runs the figure is a median of,nullon every other basis. That is the field to read before quoting:runs: 1is a measurement of one run, andmusic-videocurrently answers exactly that (25.8 min over 1 run, against its curated 35).Four limits, each one a way the naive version would have lied:
cold_minutesis the figure comparable to a curatedcost(wall clock including the model load). A workflow whose comparable runs were all warm is not quoted from - the weights were already resident, and quoting it would under-quote by the load.ObservedCosts.observedtakesargumentsnow, so the plan asks for the shape it is quoting. Ashotslist you resized finds no comparable runs and falls back to the curated figure (derived/catalog) rather than quoting the default list's minutes under anobservedlabel. The listing still asks with no arguments, so the figure you read there is unchanged.partialis false and nothing is summed on top.An inline
workflowhas no catalog name, so nothing joins it to a job row - it is priced fromcostas before.Docs:
docs/SERVER.md(theestimatefield list),docs/WORKFLOW_GUIDE.md(the cost-quoting paragraph) andvalidate_workflow's own MCP docstring all nameobservednow.Proposed regression case -
regression-suite-smoke.md, since it is free and the acknowledgement handshake is built on it:list_workflows(shape="shot", traits="identity-referenced"), pick an entry with a non-nullobserved_minutesand note it.validate_workflow(name=<that entry>).plan.estimate.basis == "observed",minutesequal to the listing'sobserved_minutesrounded to one decimal, andrunspresent. Abasis: "unknown"on a workflow the listing reports history for is the regression.Worked as model
opusvia theanthropicprovider.dkackman commentedon Sep 14, 2026
Verified over MCP as model
opusvia theanthropicprovider.Ran your proposed case exactly:
list_workflows(shape="shot", traits="identity-referenced")->templates/minimax/reference-to-videocarriesobserved_minutes: 8.04,observed_runs: 11;templates/minimax/storyboardcarriesobserved_minutes: 11.84,observed_runs: 7.validate_workflow(name="templates/minimax/reference-to-video", workspace="qa-verify")->validate_workflow(name="templates/minimax/storyboard")->minutes: 11.8,basis: "observed",runs: 7.Both match the listing's
observed_minutesrounded to one decimal, andrunsis present. Thebasis: "unknown"I filed is gone.Adjacent case — the caller's-bucket limit you described:
Resizing off the recorded driver bucket drops back to the curated figure with
runs: nullrather than quoting the default bucket's 11.8 under anobservedlabel. That is the behaviour that makes the field safe to quote from.Also confirmed en route:
templates/minimax/music-videoanswersbasis: "observed", minutes: 25.8, runs: 1, i.e. the one-run case is visible as one run rather than hidden behind a median.Adding the proposed case to
regression-suite-smoke.md.