Repository navigation
Conversation
zzylol
force-pushed
the
docs/677-docs-after-stages
branch
from
October 16, 2026 17:47
bd9c717 to
8f1f5b0
Compare
…nd stage document run-a-query.md lists the binaries that exist (stage_pipeline, show_logical_dag, the corpus tools) instead of show_pre_asap_ir, show_post_asap_ir and dag_export. stage-viewer.md matches the viewer on main: tabs 1, 3a and 3b, Examples 2 and 4 from the command line with numbers regenerated by stage_pipeline, the editor's real fields, every stage_pipeline option including the cost models, and no deployment-inputs panel. The viewer README shows cost_per_second, usage and front.
…ge pipeline API library-api.md gains a section on planning a workload through the stages (e2e_plan, run_stage1_to_stage3, PlanSelectionSettings and cost models 1-3) and uses the AccuracyTarget builders; its examples compile again. Other developer docs drop dag_export and use the current type names.
…and stage results The shared and Example 2 data tables use arrival and sources[...] facts, lookback and as_of are marked as query-text columns, and Stages 2 and 3 say what is implemented (materialization options, resource usage and cost models 1-3). The acceptance docs carry the counts, costs and test statuses that stage_pipeline and the tests give at this head.
…rkload fields AccuracyGuarantee, the AccuracyTarget builders, per-source max_distinct_per_evaluation for classic HLL, and arrival/sources in the historical proposals.
The Stage Viewer guide and the viewer README describe --deployment-capabilities, the document's deployment_capabilities and pass1_pruned sections and per_node's three fields. library-api.md lists DeploymentCapabilities; the Stage 2 paragraph and the Example 4 acceptance doc describe MatAtQueryKeptAcrossEvaluations (B3).
…red_by_timing Measured sketch costs reach Stage 3 through PlanSelectionSettings::measured_operation_costs (stage_pipeline --measured-operation-costs, convert_rqe_atomic_costs); per_node gains price_source. EmpiricalCostModel, PhysicalPlanCostModel and PhysicalEvidenceSnapshot are gone, so the docs that named them say so. post-asap-ir.md uses split_shared_by_timing.
zzylol
force-pushed
the
docs/677-docs-after-stages
branch
from
October 16, 2026 19:07
8f1f5b0 to
bc3b43a
Compare
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.
Advances #677.
Why
The PRs that landed this week (Pass 2 reuse rules, Stage 2 materialization and the latency check, the
AccuracyTargetbuilders, cost models 1–3, the Pass 2*Candidatenames,FusedComputation, and theDataWorkloadreshape intoarrival+sources) changed no Markdown, or only the lines that named their own API. The docs therefore still described types, fields and tools that no longer exist onmain:run-a-query.mdsent readers toshow_pre_asap_ir,show_post_asap_iranddag_export, none of which exists.stage-viewer.mddescribed tabs (2, 4a, 4b), a deployment-inputs panel and--example planner-layering-4a/-4bthat the viewer andstage_pipelinedo not have, and its numbers predate materialization.input_cardinality,data_ingestion_interval,ingestion_rate,continuously_ingesting,Evidence<T>freshness,ResultGuarantee,AccuracyTarget::Exact / Epsilon / EpsilonDeltaandEstimatorContract::ClassicHll.library-api.mdexamples no longer compiled, and it did not mention the stage pipeline at all.What
Docs only. Each doc keeps its audience; the user's own prose is unchanged except where a name, field or behaviour is now wrong.
docs/user_guide_docs/run-a-query.md,stage-viewer.md,tools/dag-viewer/README.md, rootREADME.md,docs/README.md)run-a-query.mdlists the binaries that exist:stage_pipeline,show_logical_dag,analyze_corpora,variant_coverage,sketch_coverage, plus the two examples. Every command in it was run at this head.stage-viewer.md: the tab table has the three tabsexamples.jsondefines (1, 3a, 3b). Example 2 (now with itsMatAtQueryplans) and Example 4 (Example 3b under cost models 1, 2 and 3) move to a "no tab, run from the command line" table. The editor section describes the real fields (input tables, SQL or PromQL, ε, metric; no δ, fixed 15 s interval). The option table lists everystage_pipelineflag, including--sql,--table,--name,--metric,--cost-modeland the cluster flags. The stale "based on PR feat(dag-viewer): redesign the viewer around the stage pipeline #574" banner and the deployment-inputs panel section are removed.cost_per_second,usage,frontand theP<n>-m<k>materialization ids.stage-viewer.mddocuments--deployment-capabilities(supported_summaries,raw_data_retained,query_time_results_retained), the raw-data rejection and thepass1_prunedlisting, and Example 4's row shows kept panes (P3-m2, 8,884.53 per second) and no raw data (P3-m1 selected). The viewer README's schema addsdeployment_capabilitiesandpass1_pruned, andper_nodeholds onlycost_per_second,multiplieranddetail.library-api.mdlistsDeploymentCapabilitiesandwith_deployment_capabilities.planner-layering.md's Stage 2 paragraph and the Example 4 acceptance doc describeMatAtQueryKeptAcrossEvaluations(B3) and the B3 tests that now pass.ac8493a2):stage-viewer.mdandrun-a-query.mddocumentstage_pipeline --measured-operation-costsandconvert_rqe_atomic_costs; the viewer README'sper_nodegainsprice_source;library-api.mdaddsmeasured_operation_coststoPlanSelectionSettingsand drops the deletedEmpiricalCostModel/PhysicalPlanCostModelrows and comparison;offline-sketch-evidence.md,storage-operation-costs.mdandphysical-handoff-costs.mdsay their planner consumer is gone.post-asap-ir.mdusessplit_shared_by_timing(the rename in chore!: accumulated review nits (column-metric and viewer fixes, timing names, lost tests, stale comments) #737).docs/develop_docs/)library-api.md: a new section "Plan a workload through the stages" (asap_planner::e2e_plan,run_stage1_to_stage3,PlanningModels,PlanSelectionSettings,CostModel1–3,ResourceUsage,PlanOutput), theAccuracyTargetbuilder table, and legacy examples fixed to compile (max_error,?onsearch_workload*, the 3-argumentASAPStrategiesconstructor). The legacy-search prose is otherwise unchanged.end-to-end-accuracy-guarantees.md,pre-asap-ir.md,offline-sketch-evidence.md,physical-handoff-costs.md,storage-operation-costs.md,physical-compile-coverage.md,target-candidate-api-migration.md:AccuracyGuarantee, the builders, classic HLL's per-source distinct bound, and nodag_export.planner-layering.md: the overview diagram's data-workload node, the shared and Example 2 data tables (arrival,sources[...].series_count,sources[...].sample_interval), lookback and as_of as query-text columns (no code font), the approximate-target sentence, Example 2's SQL recognition, one added paragraph each for what Stage 2 implements and for Stage 3's resource usage and cost models 1–3, and two new rows in the Pass 2 rule table (rollup rule, exact top-k reuse rule), so it lists all five rules. The Problem Definition section is untouched.planner-layering-example{1,2,3,4}-acceptance.md: counts, costs and test statuses fromstage_pipelineand the tests at this head. These include the three Example 1 corrections recorded on Update the docs after the G1–G11 consolidation groups land #677, and Example 3a, where no DDSketch plan is valid any more because the targets are rank errors.ResultGuarantee→AccuracyGuarantee(the list recorded on Update the docs after the G1–G11 consolidation groups land #677),AccuracyTargetforms, the classic-HLL example inaccuracy-models.md, and the oldDataWorkloadfields inanalytical-resource-cost.md.How
main, were left alone (see Limitations).stage_pipelinerun at0b4fb83a, or at66533b36for the deployment-capability runs (--deployment-capabilitieswith KLL only andquery_time_results_retained, and withraw_data_retained: false) (--example planner-layering-1/-2/-3a/-3b, with--max-displayed 100000for the totals, and Example 3b under--cost-model provisioned-capacityandcluster-capacityat 256 GB and 64 GB). None was written by hand.library-api.mdwas compiled and run as a temporary test, which is not committed.Key code interfaces added / modified
None (docs only).
Before this PR
cargo run -p asap-devtools --bin show_post_asap_ir -- --sample-interval-ms 1000 queries.txt # error: no bin target named `show_post_asap_ir` in `asap-devtools` packagestage-viewer.mdsaid that Example 2's 12 valid plans were the only valid ones and that a "4b" tab existed.library-api.mdbuilt targets withAccuracyTarget::Epsilon(0.01), which no longer compiles.After this PR
cargo run -p asap-devtools --bin stage_pipeline -- \ --promql "topk by (job) (10, sum_over_time(http_requests_total[1m]))" \ --epsilon 0.01 --delta 0.001 --out plan.json # selected P1 (exact); P2 CMS+heap rejected (weights not proven non-negative), # P3 CountSketch+heap rejected (no guarantee)The guides' commands run as written, and Example 2's row in
stage-viewer.mdreports what the planner does now: 184 physical plans, 20 valid, and P1 at 6.08 per second. The shared count accumulator costs 7.04 per second when it is built once at query time, against 7.44 when it is not materialized.Verification
run-a-query.mdandstage-viewer.mdat this head: thestage_pipelineexamples and options,show_logical_dag(file and stdin),analyze_corpora --corporaand--sql-corpora,variant_coverage,sketch_coverage, and thetopk_irandcanonical_examplesexamples.python3 tools/dag-viewer/server.py --skip-build. It wrote the three tab documents and printed its address, andPOST /api/planreturned a selected plan.library-api.mdRust examples (temporary test, not committed).cargo fmt --all -- --check. No Rust or doc comment changed, socargo test --docwas not needed.Limitations and follow-ups
split_shared_by_timingis the name chore!: accumulated review nits (column-metric and viewer fixes, timing names, lost tests, stale comments) #737 introduces; until chore!: accumulated review nits (column-metric and viewer fixes, timing names, lost tests, stale comments) #737 merges,mainstill calls itsplit_shared_by_phase.library-api.md's search/ranking/selection sections,asap-aware-mapping-architecture.md,asap-aware-mapping-contracts.md,extend-asap-aware-mapping.md,input-output-workflow.md'sglobal_selectionrows and the root README's "Extending Planner" links still describe the legacy search, which is onmain. They change when it is deleted.planner-layering.md's Problem Definition row ("volume, rate, cardinality and distribution") and its illustrative Example 1 narrative stay as written; the acceptance doc records the planner's numbers.asap-primitive-schema.mdwas changed only where a type name or field list was wrong (AccuracyGuarantee, itsspecfields).