Skip to content

feat(devtools): rank dag_export --post-asap without a cost document - #432

Open
Selvomega wants to merge 2 commits into
mainfrom
feat/dag_export_flexibility
Open

Selvomega wants to merge 2 commits into
mainfrom
feat/dag_export_flexibility

Conversation

@Selvomega

@Selvomega Selvomega commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

--post-asap without --planner-cost-json ran nothing. The gate exists because a post-ASAP export asserts a cost-ranked decision, and dag_export owns no deployment evidence with which to defend one. But a user with no deployment yet still wants to see which replacements the search finds, which one it commits to, and what the merged post-ASAP DAG looks like — and that needs the structure to be real, not the numbers.

Add --default-cost, mutually exclusive with --planner-cost-json. It ranks candidates with DefaultCostModel and keeps export_model as None, so every annotation stays CostSource::Unavailable with no value, workload_cost_summary degrades to an unavailable summary, and the viewer renders "Not estimated". The structural number decides which candidate wins and is then discarded, never serialized. The flag pair is rejected rather than given a precedence order, before the document is parsed, because the two disagree about what the export may claim, not just about which model ranks. --topk-margin-json still applies under --default-cost: accuracy evidence is orthogonal to cost evidence.

Absent both flags the export is byte-identical to before; only the stderr line differs, which now names both cost sources instead of demanding evidence.

This is not a revival of what 5dbf4d9 removed. That commit deleted two things: winner_cost_annotations emitting a modeled CostAnnotation from AnalyticalCostModel, and the analytical.map_or(&default_model, ...) choice of which model ranks. Only the latter returns. A DefaultCostModel number was never an exported cost, and structural node counts remain intentionally unusable as a cost fallback.

Closes #431

`--post-asap` without `--planner-cost-json` ran nothing. The gate exists
because a post-ASAP export asserts a cost-ranked decision, and dag_export
owns no deployment evidence with which to defend one. But a user with no
deployment yet still wants to see which replacements the search finds,
which one it commits to, and what the merged post-ASAP DAG looks like —
and that needs the structure to be real, not the numbers.

Add `--default-cost`, mutually exclusive with `--planner-cost-json`. It
ranks candidates with `DefaultCostModel` and keeps `export_model` as
`None`, so every annotation stays `CostSource::Unavailable` with no
`value`, `workload_cost_summary` degrades to an unavailable summary, and
the viewer renders "Not estimated". The structural number decides which
candidate wins and is then discarded, never serialized. The flag pair is
rejected rather than given a precedence order, before the document is
parsed, because the two disagree about what the export may claim, not
just about which model ranks. `--topk-margin-json` still applies under
`--default-cost`: accuracy evidence is orthogonal to cost evidence.

Absent both flags the export is byte-identical to before; only the stderr
line differs, which now names both cost sources instead of demanding
evidence.

This is not a revival of what 5dbf4d9 removed. That commit deleted two
things: `winner_cost_annotations` emitting a modeled `CostAnnotation`
from `AnalyticalCostModel`, and the `analytical.map_or(&default_model,
...)` choice of which model ranks. Only the latter returns. A
`DefaultCostModel` number was never an exported cost, and structural node
counts remain intentionally unusable as a cost fallback.

Refs #431

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Selvomega
Selvomega requested a review from zzylol September 17, 2026 00:17
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.

[Feature] Extending dag_export's flexibility so that users can use it without a cost model

1 participant