Files
Jax Liu 4a4f72af5d fix(core-py): drop orphan cubes when their base model is pruned
Manifest extraction prunes models down to those a query reaches, but kept
all cubes unconditionally. A cube whose baseObject model got pruned then
failed wren-core MDL analysis with "baseObject is not a defined Model or
View" — so any query touching only tables unrelated to a cube's base, or a
scalar query referencing no model, broke once a cube existed (issue #2360).

Filter cubes to those whose baseObject still resolves to a kept model or
view. Cube queries emit `SELECT ... FROM <baseObject>`, so a queried cube's
base model is always pulled in — dropping orphans is therefore safe.

Backport of Canner/wren-engine-saas #892 (+ #895 view-cube coverage).

Closes #2360

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 11:18:28 +08:00
..