Skip to content

Show deployment inputs in the stage document and viewers - #610

Draft
zzylol wants to merge 1 commit into
stack/509-y1-deployment-inputsfrom
stack/509-y2-deployment-doc
Draft

zzylol wants to merge 1 commit into
stack/509-y1-deployment-inputsfrom
stack/509-y2-deployment-doc

Conversation

@zzylol

@zzylol zzylol commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Stack: Wave 3 chain: #605 → #607 → #608 → #609 → #610

Rebased on main d4869a7 (DF 54).

Why

#609 adds the deployment inputs to Stage 3, but the asap-stage-pipeline/v1 document does not show which inputs a run used. A reader of a fixture cannot tell why a candidate was rejected for a capability, or which memory weight priced it (C4).

What

stage_pipeline writes a new, optional top-level deployment section:

"deployment": {
  "capabilities": {
    "source": "asap_executor::capabilities",
    "summaries": [ { "summary": "Kll", "readouts": ["Quantile"] },
                   { "summary": "HydraCms", "readouts": ["TotalCount", "ItemCount"] },
                   { "summary": "exact Sum", "readouts": [] }, ... ],   // null = unrestricted
    "ingestion_time": true,
    "query_time_retention": false,
    "memory_budget_bytes": null,
    "raw_data_retained": true,
    "raw_bytes_per_sample": 16
  },
  "cost_model": {
    "name": "analytical-cost-v2",
    "unit": "cost_per_second",
    "calibration": { "version": "illustrative-v2", "cost_per_cpu_op": 1e-6,
                     "cost_per_scan_byte": 1e-7, "cost_per_retained_byte_second": 1.25e-7,
                     "horizon_s": 3600.0, "latency_ms_per_cost_unit": 1.0 }
  },
  "accuracy_model": { "name": "DefaultAccuracyModel", "evidence": "none" }
}

Supporting changes: SummarySupport::name() ("HydraCms", "exact Sum"), and asap_plan_selection::COST_MODEL, which candidate cost source strings now also use.

How (Before / After)

  • Before: the document has workload and stage0–stage3; the inputs are implicit.
  • After: it also has deployment. The Example 1 fixture is regenerated, and only this section is added (+100 lines). The 4a document also generates with the section; its fixture lives on feat(dag-viewer): redesign the viewer around the stage pipeline #574.
  • Viewer: tools/dag-viewer/stages.js / validateStagePipeline is not on this branch, so nothing here validates top-level keys; python3 -m unittest test_render passes (29). The section is optional, so the feat(dag-viewer): redesign the viewer around the stage pipeline #574 validator should accept it when present and not require it.
  • What the viewer's "Deployment inputs" panel should show (to port onto feat(dag-viewer): redesign the viewer around the stage pipeline #574):
    1. Capabilities: a summary × readouts table (or "unrestricted" when summaries is null), plus flags for ingestion time, query-time retention and raw data retained, the memory budget, and bytes per raw sample.
    2. Cost model: name, unit, calibration version, and the five coefficients, with the memory weight (cost_per_retained_byte_second) highlighted because it also prices raw retention.
    3. Accuracy model: name and evidence.
    4. Optionally, link Stage 3 rejections whose reason starts with deployment (or contains memory budget) to this panel.

Gate: cargo fmt --check, clippy -D warnings, cargo test --workspace: 1,662 passed, 23 ignored (#609: 1,661 / 23). There is a new devtool test for the section, and the devtool test's temp-file names are made unique, because two tests now generate the same document in parallel.

Stacked on #609. Links: #509, #525, #572, #574, #594, #604.

🤖 Generated with Claude Code

zzylol added a commit that referenced this pull request Oct 4, 2026
When a stage document carries a `deployment` section (#610), the Stages view
lists the deployment's capabilities, raw-data retention, cost model with its
calibration, and accuracy model next to the workload queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the stack/509-y1-deployment-inputs branch from 4a830c5 to 3521459 Compare October 4, 2026 21:17
@zzylol
zzylol force-pushed the stack/509-y2-deployment-doc branch from 055d48b to 73ded2f Compare October 4, 2026 21:17
zzylol added a commit that referenced this pull request Oct 4, 2026
When a stage document carries a `deployment` section (#610), the Stages view
lists the deployment's capabilities, raw-data retention, cost model with its
calibration, and accuracy model next to the workload queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stage_pipeline writes an optional `deployment` section: the executor's
capabilities (one entry per summary with its readouts, timing and
retention flags, memory budget, raw-data settings), the cost model with
its Stage3Calibration, and the accuracy model's name. The Example 1
fixture is regenerated; only the new section changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the stack/509-y1-deployment-inputs branch from 3521459 to ca6eac7 Compare October 5, 2026 06:21
@zzylol
zzylol force-pushed the stack/509-y2-deployment-doc branch from 73ded2f to c0f007f Compare October 5, 2026 06:21
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.

1 participant