Repository navigation
feat(dag-viewer): readable memo (drill-down, Stage 2 grid, plan-only and pruned filters), inputs/outputs layout, Plan Viewer rename (#1262) - #1277
Merged
milindsrivastava1997 merged 14 commits intoNov 11, 2026
Conversation
…sion (#1262) A memo group with more than 12 candidates used to collapse to one count per origin and expand to every candidate, so a 280-candidate CmsWithHeap group (depth × width × heap_size) was one box or 280 boxes. It now splits by its first varying dimension (origin, sketch family, each θ field, window width), and clicking a count drills into it until at most 12 remain. The group label shows the path, clicking the group goes back a level, and the group's details offer the other varying dimensions to split by. The dimensions come from the candidate's existing `parameters` and `operator`; the document is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them apart (#1262) Drilled to depth=5 › heap_size=10, a CmsWithHeap group's 7 candidates all read "θ CmsWithHeap(depth=5, heap_s…": the clipped θ hid width, the one dimension that differs. Drilled in, a candidate now shows the dimensions still varying among the shown ones ("θ width=28"). The split-by buttons use the page's .btn style, so the dimension in use shows as pressed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot undefined (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nputs, a how-to-read line, light theme by default with a toggle (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heme toggle top right (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…riants as a timing × lifetime grid (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
… panel with the cost model, no Stage 3 sidebar, short step names, Stage 2 variants toggle (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
…mo's how-to-read as a short list (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
The page, its server, code comments and every doc that names it; the user guide moves to docs/user_guide_docs/plan-viewer.md. The document format (asap-stage-pipeline/v2) keeps its name. asap_planner.rs's header comment still says Stage Viewer: changing it runs the cargo hooks, where two devtools tests already fail on this branch's base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
…ments (#1262) bce9c4017 added docs/user_guide_docs/plan-viewer.md; this removes stage-viewer.md and renames the viewer everywhere else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
…own with the inputs as Input; "error metric not set" (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
…1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
…column (#1262) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve
zzylol
approved these changes
Nov 11, 2026
milindsrivastava1997
merged commit Nov 11, 2026
8f5495f
into
feat/1261-readable-stage-output
1 of 2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
undefined (Total), ….stage_dump/q3_10m5m_5m5m_3m3m.json(three quantile queries):Closes #1262.
Screenshots
These are in the light theme, taken in headless Chrome on
stage_dump/q3_10m5m_5m5m_3m3m.json(1–5) andexample1(6–7). The images live on thepr-assets/1262branch, which is not for merging.1. Planner inputs: the queries, the queries' DAG labelled Input, the data workload, and deployment and planner settings.

2. Planner output: candidate counts, the outcome line, and the selected plan.

3. Memo, Pass 2. Pruned candidates are hidden. Each candidate has its Stage 2 grid (rows ingest/query; columns not kept / one run / across runs; filled, crossed, or dark outline = used by the plan).

4. Memo with "selected plan only".

5. A candidate's details: the Stage 2 grid as a table, then each variant's physical edges. G19#0 is the shared 5-minute KLL chain, and the plan uses its query-time variant C53.

6. Drilling into example1's G9 (280 CmsWithHeap candidates, with "show pruned candidates" on):

depth=5(70) split into 10heap_sizecounts.7. G9's details: "split by" picks the dimension the counts split on.

Review guide
feat/1261-readable-stage-output(feat(devtools): asap_planner text output is terse by default; --verbose prints the details (#1261) #1276), which is stacked onrefactor/1207-tools(refactor: tools and snapshots over the #1207 memo, edges and contexts (#1207 PR 9) #1239).tools/dag-viewer/memo.js:memoCandidateDims,memoGroupDrill,memoPhysicalGridandmemoGridImage, then the changes tomemoStepElementsand the controller (draw,tap,showCandidate).tools/dag-viewer/index.html: the inputs/outputs layout.tools/dag-viewer/app.js: outcome line, settings, zoom, theme.tools/dag-viewer/stages.js:settingsRows,fitGraph.README.md,docs/**(docs/user_guide_docs/stage-viewer.md→plan-viewer.md),tools/dag-viewer/*and one comment incrates/devtools/src/bin/asap_planner.rs.test_viewer.pyfor removed or renamed elements.memoGroupDrill: buckets, and which dimension to split by next.memoStepElements.memoPhysicalGrid's rule for "used by the plan": a physical edge into or out of the variant hasselected: true.Behavior: before → after
The user runs
asap_planner --workload stage_dump/q3_10m5m_5m5m_3m3m.json --run-until stage3 --format json --out out/q3.jsonand opens?doc=out/q3.json.summaries: undefined (Total), …Cms (Total), …, accuracy guarantees, cost modelanalytical-cost-v2 (illustrative statistics)) above Planner output (outcome lineplan selected · candidate-connection search · MILP 340 variables, 514 constraints · …, plan, views, memo)70 · depth=5… ; click to drill in (e.g. 10heap_sizebuckets → 7 candidatesθ width=28…); the group's details offer split bywidth/heap_sizeg9>g1)C<id>s in the detailsStage 0, the frontends' DAG hash-consed,Stage 1, Pass 1, …Stage 0,Stage 1 · Pass 1,Stage 1 · Pass 2(metric not set)(error metric not set)Need served: debugging and explaining the planner's memo, i.e. which candidates exist, why they were pruned, and how the plan was chosen (issue #1262).
Interfaces
Viewer JavaScript only; there are no Rust interface changes.
tools/dag-viewer/memo.jsexpanded(a list of expanded groups) is replaced bydrill(per group, its drill path), because a group now splits on more than one dimension.tools/dag-viewer/stages.jsThese three are removed because their only caller, the Stage 3 sidebar and the one-line deployment text, is gone.
settingsRowsreplaces the last two.tools/dag-viewer/app.jsUsage, checked in
memo.test.mjsontest-fixtures/p90-kll.json:Algorithm changes
None in the planner. The viewer only changes how it draws:
memoGroupDrill):memoCandidateDimsorder.selected: truehas it as producer or consumer. This covers leaves (Scan) and roots.Decisions and open questions
inputs[].edgesin the JSON means (stored edges vs. recomputed pairs) is filed as asap_planner and viewer: Pass 2 edges are recomputed instead of read from the stored list, and are labeled with α symbols #1275 and is not changed here. The details panel still shows the recomputed list.asap-stage-pipeline/v2.Verification
node --test *.test.mjs(tools/dag-viewer)python3 -m unittest test_viewer test_server(py-mini-racer 0.6.0)cargo test -p asap-devtools --test devtools7b65e693d) without this PR's commits:the_nine_query_workload_lowers_and_installs,workload_examples_select_valid_plans_with_linked_materialized_views. The only Rust change here is one comment (committed with--no-verifyfor that reason).New tests:
Evidence: see Screenshots above, all taken from this branch in headless Chrome. To reproduce, run
python3 tools/dag-viewer/server.pyand open?doc=out/<doc>.json.Follow-ups
Human review — do not complete with an agent
🤖 Generated with Claude Code
https://claude.ai/code/session_014qhwq4QkRexgK7yPwbksve