Skip to content

docs: define ASAPPlanner input, output, and workflow - #445

Merged
zzylol merged 53 commits into
mainfrom
docs/issue-438-planner-contract
Sep 22, 2026
Merged

zzylol merged 53 commits into
mainfrom
docs/issue-438-planner-contract

Conversation

@zzylol

@zzylol zzylol commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

Issue #438 shows that the current documentation exposes individual planner stages without first defining the supported end-to-end integration workflow. Callers cannot easily tell which inputs are required, when lifecycle planning is necessary, or whether PlanSpace, a ranked group, or a materialized DAG is the final output. Related terminology and API-surface ambiguity is tracked in #427, and #428.

Before this PR

A caller could discover search_workload*, cost_sorted, global_selection, and lifecycle APIs independently and reasonably conclude that each was a separate valid end state. For example, a recurring summary could be structurally selected without making clear that this does not establish that maintaining it is cheaper than exact recomputation. Window semantics, summary frameworks, physical layouts, window edges, and physical handoffs were also easy to conflate.

After this PR

The design documentation starts from one outer workflow: canonical roots and requirements enter ASAPPlanner, and PlanSpace is the canonical logical output. It then explicitly documents:

  • required, optional, and optimization-specific inputs;
  • the meaning and categories of evidence;
  • PlanSpace, ranked views, materialized DAGs, and lifecycle-aware outputs;
  • inspection, structural-selection, and lifecycle-aware workflows and their promises;
  • replanning as a fresh invocation with a new workload/evidence snapshot; and
  • ownership-specific vocabulary for query windows, summary frameworks, physical layouts, pane layouts, window edges, physical handoffs, and comparison scopes.

The lifecycle-aware workflow is identified as the recommended path before claiming that maintained summary state is preferable to raw execution. Physical binding, deployment, transitions, and execution remain downstream responsibilities. The document also states that public Rust visibility does not automatically make a type part of the recommended integration surface.

Renames: before vs. after

Before After Meaning / scope
MemoGroup TargetSubDAGCandidates Rust type: alternatives for one target sub-DAG, not SQL grouping
RankedGroup RankedTargetSubDAGCandidates Rust type: the same target's candidates in cost-model preference order, with aligned costs
GlobalSelection::materialize(root) GlobalSelection::assemble_selected_dag(root) Public method: assemble the selected logical DAG for one query root; no runtime materialization
materialize_with_summary_maintenance_lifecycles(...) assemble_selected_dag_with_summary_maintenance_lifecycles(...) Public helper: assemble the DAG and return it inside a plan with summary-maintenance decisions
“memo group” / “candidate group” “target sub-DAG candidate set” Design prose: alternatives for the same replaceable query subexpression
“Selection and materialization helper” “Selection and DAG assembly” Section name: distinguish logical DAG construction from creating stored state
“Lifecycle-aware helper” “Summary-maintenance-lifecycle-aware helper” Section name: explicitly identify which lifecycle is being planned
“materialized root” (logical assembly result) “assembled Post-ASAP DAG root” Design prose; real runtime materialized views/state keep their terminology

The four Rust API renames are source-breaking: update imports and call sites. They do not change planning behavior or the DAG-root representation.

Remaining names such as groups(), group_for(), SelectedGroup, and MaterializeSummaryMaintenanceLifecycleError are renamed separately in #457 (issue #456), not in this PR. The integration entry-point API is tracked separately in #458 (issue #453).

Validation

  • git diff --check
  • verified all relative links added by the document resolve locally

Closes #438
Related to #427 and #428
Related to ProjectASAP/ASAPQuery-backend#734

@zzylol zzylol changed the title docs: define ASAPPlanner input, output, and workflows docs: define ASAPPlanner input, output, and workflow Sep 18, 2026
@zzylol
zzylol removed the request for review from milindsrivastava1997 September 18, 2026 18:54
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
Comment thread docs/design_docs/architecture/input-output-workflow.md
Comment thread docs/design_docs/architecture/input-output-workflow.md Outdated
@zzylol

zzylol commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Following up issues / actions: #453 Lib Function APIs, and create PR for renaming the interfaces and abstractions in the code. #456

@zzylol
zzylol merged commit 10d9384 into main Sep 22, 2026
3 checks passed
Selvomega added a commit that referenced this pull request Sep 26, 2026
Brings per-measure FILTER predicates (#466) plus the five main commits it
is based on (#445, #455, #426, #460, #461). Conflicts resolved toward
main: `ValueOperationAtIngestionTime`, `query_time_nested_sum`, and the
unconditional `finalize_exact_accumulator` from #461 replace dev/dqc's
older #379 shape; the #455 wording in the architecture docs stands; the
moved `accuracy.rs` is dropped in favor of `accuracy/mod.rs`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Selvomega added a commit that referenced this pull request Sep 29, 2026
Cherry-pick of the PR #458 merge commit (4dd64e5) onto main. PR #458 was
merged into refactor/issue-456-interface-names after that branch had
already reached main via #457 and #445, so its content never landed on
main. Adds the asap-planner facade crate (#429), the pluggable
optimization pass (#430), and the ParsedWorkload boundary type.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
zzylol added a commit that referenced this pull request Sep 30, 2026
#445, #470, #472, and #478 each described the Planner output from a
different angle. Add an output-layers section that places them in order:
candidate space, selected logical plan, and exported logical DAG. Say that
PlanOutput is derived from PlanSpace rather than being a second output.
Use "candidate" instead of "alternative" throughout input-output-workflow.md.

Rebase note: conflicts in docs/design_docs/architecture/input-output-workflow.md
with the stack below are resolved to this commit's version of the file, as
integration merge e59640f resolved them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol added a commit that referenced this pull request Sep 30, 2026
#445, #470, #472, and #478 each described the Planner output from a
different angle. Add an output-layers section that places them in order:
candidate space, selected logical plan, and exported logical DAG. Say that
PlanOutput is derived from PlanSpace rather than being a second output.
Use "candidate" instead of "alternative" throughout input-output-workflow.md.

Rebase note: conflicts in docs/design_docs/architecture/input-output-workflow.md
with the stack below are resolved to this commit's version of the file, as
integration merge e59640f resolved them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Input/Output and Proper Workflow of ASAPPlanner

3 participants