Skip to content

Inline workflows get cost basis unknown; price by pipeline identity like the VRAM projection #797

Closed

Description

@dkackman

Field report

A per-shot-reference copy of the music-video template, run inline, reported cost basis "unknown". The server had observed runs of the same pipeline.

Assessment (verified)

  • Observed cost history is keyed by catalog name. dw/server/routes/jobs.py:750-762 passes observed=None with no catalog_name, and ObservedCosts.rows_for(name) (dw/server/observed_cost.py:390) looks up by name.
  • The VRAM projection already matches by pipeline identity: component_type + model_name + workflow (dw/vram_inheritance.py).
  • This is documented behaviour: the MCP instructions tell agents to quote the models/ entry by hand. But an agent that inlines a catalog template to change one knob loses its price.

Proposed

Fall back to pricing by pipeline identity for an inline workflow, the same way vram_inheritance matches. Report it under a distinct basis (e.g. "inherited") so it reads as an approximation.

Activity

  1. added
    enhancementNew feature or request
    field-reportFiled from Don's own dw sessions (real use), not the harness
    target:mini-aiFound against a non-lem server (DW_TARGET=mini-ai); Don triages
    owner:donParked for human decision
    status:needs-approvalParked pending a written proposal + human approval
    and removed on Oct 10, 2026
  2. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    triage: escalate — adds a new cost basis consumers must learn ('inherited') and a pipeline-identity price-matching path in validate_workflow with an open edge-case matrix (offload/quant/frames differing from the observed runs); needs sign-off on the concept before a fix session builds it. (claude-opus-5-5 via anthropic)

  3. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Approved (Don). Build the pipeline-identity fallback for inline workflows. It should match on component_type + model_name + workflow, the same key dw/vram_inheritance.py uses, and report under a distinct "inherited" basis so callers read it as an approximation. When the inline workflow's offload, quantization or frame count differ from the observed runs, the result should say so the way validate's VRAM-ceiling warning does: warn, never refuse. Document the new basis wherever the existing bases are listed.

    Ruling recorded by claude-opus-5-5 (anthropic) for Don.

  4. added and removed
    owner:donParked for human decision
    status:needs-approvalParked pending a written proposal + human approval
    on Oct 10, 2026
  5. added 2 commits that reference this issue on Oct 10, 2026
  6. 10 remaining items

  7. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Architecture review: bounced (map finding). I read f90f9df and 4e56a9e under dw/ and dw_mcp/ against docs/ARCHITECTURE.md and item 3 of docs/stabilization/harness/stage-c-guardrails.md. 1eee13a (#799) is in the same range but I didn't review it.

    Finding: the map has no row for this. The change adds a new rule with new owners: an inline workflow (one with no catalog name) is priced from a catalog template's observed runs, matched by pipeline identity, under basis inherited, and is warned, never refused. Those owners are dw/server/deps.py: inherited_observed, dw/vram_inheritance.py: inherited_differences, and dw/plan.py: _observed (the INHERITED basis), with the warning in dw/server/routes/jobs.py: _inherited_cost_warnings. docs/ARCHITECTURE.md at a2db75f doesn't name any of them. Under "Validation, plan and cost", the "Inherited VRAM ceiling" row covers only the VRAM ceiling (ceiling_index), and "The estimate" row covers only observed ahead of curated. The checklist says a change that adds an owner updates its row in the same change, and tests/test_architecture_map.py can't catch a row that's missing.

    What would resolve it: add an "Inherited cost" row (or extend "The estimate"). Name the owners above and state the rule: same component_type + model_name + workflow key as vram_inheritance; most cold runs wins, then name; differs covers offload, quantization and frame count; warn, never refuse. List the enforcing tests from tests/test_inherited_cost.py. Because the catalog parse now lives in _catalog_listing, which the ceiling index and the cost lookup share, it would help to name it in the "Inherited VRAM ceiling" row too.

    Clean, for the record:

    • Second owner: none. The change calls the existing owners: template_identity and vram_estimate._resolved for identity and variable: resolution, observed_cost.declared_drivers plus observed_for_name for buckets and history, and plan._tempered for tempering when there are few runs.
    • Build vs. buy: none.
    • Context: no CLAUDE.md changes; the rationale is in the module docstrings.

    Reviewed by claude-opus-5-5 (anthropic).

  8. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    triage: batch with #800 — both are shipped on develop and bounced by architecture review only for a missing docs/ARCHITECTURE.md row; one session adds both rows (per each review comment) and hands both off. (claude-opus-5-5 via anthropic)

  9. added a commit that references this issue on Oct 10, 2026
  10. added
    docs-reviewDocs-only fix the tester can't observe; a read-only reviewer verifies it
    and removed
    docs-reviewDocs-only fix the tester can't observe; a read-only reviewer verifies it
    on Oct 10, 2026
  11. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Architecture-review finding addressed in 8b52148 on develop (docs-only: docs/ARCHITECTURE.md rows added — "Inherited cost", plus `_catalog_listing` named in the ceiling row; tests/test_architecture_map.py passes). No code changed since the earlier hand-off, so the MCP verify described in the fix comment stands; the driver deploys develop. I left off docs-review because the tester still has the code fix to verify.

    claude-sonnet-5-5 via anthropic

  12. dkackman commented on Oct 10, 2026

    @dkackman
    OwnerAuthor

    Verified on the mini-ai server (mps on mini-ai.lan, develop @ 8b52148) by claude-opus-5-5 (anthropic).

    Baseline: get_workflow("templates/text-to-image") has observed with mps runs (cold 0.18 min, 13 cold runs, driver num_images_per_prompt: 1).

    All calls below are validate_workflow(workflow=<inline copy of templates/text-to-image, id changed>):

    1. Plain inline copy (id qa-inline-t2i): basis: "inherited", inherited_from: "templates/text-to-image", differs: [], minutes: 0.2, runs: 13. Warning: "cost estimate is inherited from this box's runs of templates/text-to-image (same pipeline), not of this workflow". Previously this would have been unknown.
    2. Same copy plus configuration.offload: "model": basis: "inherited", differs: ["offload"], and the warning adds "its offload differ from that template, so the real cost may too". valid: true, so it warns and doesn't refuse. ✔
    3. Adjacent case, a pipeline no template has run (StableDiffusionPipeline + stabilityai/stable-diffusion-2-1): basis: "unknown", no inherited warning. ✔
    4. Adjacent case, a driver bucket with no history (inline copy, arguments: {num_images_per_prompt: 4}): basis: "unknown". That matches validate_workflow(name="templates/text-to-image", arguments={num_images_per_prompt: 4}), which also gives unknown. So the inline copy uses its own driver value, as the hand-off says. ✔

    I didn't test the quantization and frame count entries in differs; offload covers the same mechanism. One cosmetic nit, not a blocker: with a single entry the warning reads "its offload differ" (a plural verb for a single noun).

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

    backend:sharedenhancementNew feature or requestfield-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 calltarget:mini-aiFound against a non-lem server (DW_TARGET=mini-ai); Don triagesverified-on:mps

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions