Skip to content

test(dag-viewer): update three viewer assertions the planner's newer plans made stale - #892

Merged
zzylol merged 2 commits into
mainfrom
fix/viewer-tests-stale
Oct 22, 2026
Merged

zzylol merged 2 commits into
mainfrom
fix/viewer-tests-stale

Conversation

@zzylol

@zzylol zzylol commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

Three DAG viewer tests fail on main against main's own committed example documents (cd tools/dag-viewer && python3 -m unittest test_viewer). The documents are current (cargo test -p asap-devtools --test stage_pipeline passes); the assertions still describe plans from before #855 and #884.

What

Updates three assertions in tools/dag-viewer/test_viewer.py to the plans the planner now selects. No viewer code or example document changes.

Test Old expectation Current output Changed by
test_doc_parameter_opens_one_document_with_the_selected_plan lane 1 shows L1 example 1 selects P3-m1, from L3 (shared Scan and TimeRange for Q1 and Q2) #855 (shared non-summary node built once per evaluation)
test_each_node_lists_the_queries_reaching_it_and_shared_nodes_say_so one SummaryMerge shared by q3, q4 one SummaryMerge shared by q3, q4, q5 (all read the same 100 s window of one per-series DDSketch pane chain) #855
test_search_header_groups_discards_by_cause "2 independent components searched separately" search report has components: [] and searched_as_one: not_in_joint_space: #884 finds components, but their combined plan is not in the joint search space (exact top-k reuse is not combined with panes), so the workload is searched as one (same plan cost, 1.576e-6) #884 (components split by the nodes queries can share)

How

  • The selected-plan test now looks up the selected physical candidate's from_logical and checks lane 1 shows it (pinned to L3), instead of a hard-coded L1.
  • The shared-node test expects the q3-q5 merge, labelled "shared ×3".
  • The search-header test pins searched_as_one: not_in_joint_space and checks that no component count is shown when the workload is searched as one. The component line itself stays covered by DefaultSearchTests.test_header_names_the_search_and_its_components (two queries over two metrics).

Key code interfaces added / modified

None (tests only).

Major algorithm changes

None.

Before this PR

python3 -m unittest test_viewer on main: 2 failures, 1 error.

After this PR

The viewer's Python tests pass on main's committed documents.

Verification

At 134f600:

…plans made stale

#855 made example 1 select the shared Scan/TimeRange plan from L3, and
q3-q5 in the seed-862 plan share one SummaryMerge. #884 searches the
seed-862 workload as one component. The viewer renders these documents
correctly; the assertions still expected the older plans.
@zzylol zzylol added dag-viewer DAG export and visualization tooling testing Corpus, regression, differential, or benchmark tests labels Oct 22, 2026
@zzylol
zzylol merged commit 5853e41 into main Oct 22, 2026
1 check passed
@zzylol
zzylol deleted the fix/viewer-tests-stale branch November 3, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dag-viewer DAG export and visualization tooling testing Corpus, regression, differential, or benchmark tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant