Skip to content

docs: reconcile core::optimizer/core::plan with what's actually shipped - #145

Merged
zzylol merged 1 commit into
mainfrom
docs/reconcile-optimizer-plan-with-real-implementation
Jul 21, 2026
Merged

zzylol merged 1 commit into
mainfrom
docs/reconcile-optimizer-plan-with-real-implementation

Conversation

@zzylol

@zzylol zzylol commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #144's review flag: design.md's core::optimizer (L4 framework) and core::plan (shared cross-layer traits) sections described a general Cascades-style rule engine (OptimizerRule/RuleEngine, a shared rule library) that was never built. What actually shipped in crates/plan (asap-plan) is narrower and different in shape.

  • core::optimizer now leads with what's real: boundary::implementation_for (per-node choice), bind::implement_tree (whole-tree walk), cost_model::CostModel (the one pluggable ranking extension point -- not a general rewrite interface), cse::dedupe_subtrees (workload CSE), boundary::Matcher (the "does an available Implementation satisfy a required one" question -- docs: document bind/implementation/match terminology and their layers #144's "Match" terminology row). Cites docs: document bind/implementation/match terminology and their layers #144's terminology table throughout. Explains what a deployment does beyond asap-plan's scope (the conservative non-Aggregate stop in implement_tree, any rewriting past summary-candidate ranking), using ASAPQuery-backend's control_plane as the concrete downstream example.
  • The original rule-engine sketch survives in a collapsed <details> block, explicitly labeled "never built" -- so it doesn't just silently vanish for anyone who remembers it or finds it in git blame.
  • core::physical (L5) and core::plan each get a "Status: planned, not yet built" callout -- confirmed via grep that no asap-physical crate, and no DeploymentModel/PhysicalPlanner/OptimizerRule/StageAllocator type, exists anywhere in the workspace. core::plan additionally flags that its own name collides with the real, landed asap-plan crate (a completely different thing, documented under core::optimizer) -- confusing even setting the staleness aside.
  • Fixes §6.0's crate-map table: core::cost was listed "stub" but cost_model.rs is real, tested code (deliberately narrow in scope, not incomplete).

Test plan

  • Docs-only change; verified <details>/code-fence balance (grep -c sanity check) and read through the full diff in context
  • Grepped the whole workspace to confirm OptimizerRule/RuleEngine/PhysicalPlanner/DeploymentModel/StageAllocator/SketchCatalog don't exist anywhere, before writing the "never built" framing

🤖 Generated with Claude Code

Flagged in #144's review: design.md's core::optimizer (L4 framework)
and core::plan (shared cross-layer traits) sections described a
general Cascades-style rule engine (OptimizerRule/RuleEngine, a shared
rule library keyed by BindKllOnQuantile-style structs) that was never
built. What actually shipped in crates/plan (asap-plan) is narrower:
boundary::implementation_for (per-node choice), bind::implement_tree
(whole-tree walk), cost_model::CostModel (the one pluggable ranking
extension point, not a general rewrite interface), cse::dedupe_subtrees
(workload CSE), and boundary::Matcher (the "does an available
Implementation satisfy a required one" question, #144's "Match" row).

core::optimizer now leads with what's real, cites the #144 terminology
table for each piece, and explains what a deployment does beyond
asap-plan's scope (implement_tree's conservative non-Aggregate stop,
any rewriting past summary-candidate ranking) using ASAPQuery-backend's
control_plane as the concrete downstream example. The original rule-
engine sketch survives in a collapsed <details> block, explicitly
labeled "never built", instead of silently disappearing -- readers
who remember it (or find it in git blame) get a pointer to why it's
gone rather than a mystery.

core::physical (L5) and core::plan get a "Status: planned, not yet
built" callout each -- confirmed via grep that no asap-physical crate
or DeploymentModel/PhysicalPlanner/OptimizerRule/StageAllocator type
exists anywhere in the workspace. core::plan additionally flags its
own naming collision with the real asap-plan crate (a different thing
entirely, landed under core::optimizer) since that's confusing on its
own even setting the staleness aside.

Also fixes §6.0's crate-map table: core::cost was listed "stub" but
cost_model.rs is real, tested code (just deliberately narrow in scope,
not incomplete).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zzylol
zzylol merged commit a1fe4b2 into main Jul 21, 2026
1 check passed
@zzylol
zzylol deleted the docs/reconcile-optimizer-plan-with-real-implementation branch July 21, 2026 21:30
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