refactor phase 6: extras boundaries + the layer contract - #303
Merged
Conversation
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 18, 2026 23:15
6d6792e to
e352f20
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 18, 2026 23:15
0300119 to
4034b5d
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 18, 2026 23:27
e352f20 to
0ebde8b
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 18, 2026 23:27
4034b5d to
79e0de8
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 18, 2026 23:37
0ebde8b to
893448d
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 18, 2026 23:37
79e0de8 to
215684f
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 18, 2026 23:44
893448d to
1e14d07
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 18, 2026 23:44
215684f to
4821c9b
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 18, 2026 23:50
1e14d07 to
1fb09b6
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 18, 2026 23:50
4821c9b to
043655a
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 19, 2026 00:05
1fb09b6 to
4e40e80
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 19, 2026 00:05
043655a to
3b7cf68
Compare
hussainsultan
force-pushed
the
refactor/phase5-api-surface
branch
from
August 19, 2026 00:34
4e40e80 to
f5cdede
Compare
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
2 times, most recently
from
August 19, 2026 00:39
d49de04 to
f996d6e
Compare
… agents - query.find_time_dimension is public (server and the MCP backend were importing the underscore name) - server's chart endpoints resolve the agents chart generator at call time and answer 501 with an install hint when the agent extra is missing — pip install 'boring-semantic-layer[server]' no longer drags in the agents package - chart/utils uses the op metadata protocol (source.get_dimensions()) instead of reaching into ops privates; SemanticGroupByOp and SemanticProjectOp join the pass-through protocol so the metadata surface is complete on every op (a chart time-axis regression caught by the chart suites forced exactly this completion) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The SCC ratchet graduates into the full structural contract: - test_layer_contract: every import edge must point to an equal or lower layer (primitives -> analysis -> compilers -> ops -> expr -> api/query/yaml -> serialization -> extras/facade); a new top-level module must declare its layer or the test refuses to guess - test_extras_do_not_import_core_privates: chart/agents/server may import only the core public surface (the _xorq flavor shim is the one documented exception) Both pass on the current graph with zero allowlisted violations. ibis-framework capped <12: BSL subclasses Relation and reaches into Deferred internals, so a new major gets matrix-tested (the weekly IBIS_VERSION=all job) before the cap moves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CLAUDE.md, flights.csv, the git-catalogs/worldcup embedded repo, and the three WIP example scripts (malloy_interop.py imports the malloy package that only exists on feat/malloy-interop and would break 'make examples' in CI) return to untracked working-tree files. git-catalogs/ and flights.csv are gitignored so this can't recur. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hussainsultan
force-pushed
the
refactor/phase6-boundaries
branch
from
August 19, 2026 00:44
f996d6e to
e458c81
Compare
hussainsultan
changed the base branch from
refactor/phase5-api-surface
to
main
August 19, 2026 00:44
hussainsultan
marked this pull request as ready for review
August 19, 2026 00:49
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.
Phase 6 — the final planned phase of the refactor, stacked on #302. The structural rules the whole stack worked toward are now machine-enforced, and the optional extras stand on the public surface. Full suite: 1745 passed, exit 0;
make examples-coregreen.Extras stand on the public surface
serverno longer importsagents: the chart endpoints resolve the agents chart generator at call time and answer HTTP 501 with an install hint when the agent extra is absent —pip install 'boring-semantic-layer[server]'gives you a server that works, not an ImportError.query.find_time_dimensionis public — the server and the MCP backend were importing the underscore name.chart/utilsuses the op metadata protocol (source.get_dimensions()) instead of reaching into ops privates. That forced the protocol to be complete:SemanticGroupByOp/SemanticProjectOpjoin the pass-through mixin — a real regression (time-series charts rendering as bars because GroupBy lackedget_dimensions) was caught by the chart suites mid-change and drove the fix.The layer contract, enforced
The SCC ratchet graduates into the full structural contract in
test_import_graph.py:test_layer_contract— every import edge (lazy included) must point to an equal or lower layer: primitives → analysis → compilers → ops → expr/format → api/query/yaml → serialization → extras + root facade. A new top-level module must declare its layer; the test refuses to guess.test_extras_do_not_import_core_privates— chart/agents/server may import only public core names and modules (the_xorqflavor shim is the one documented exception).Both pass on the current graph with zero allowlisted violations — the contract describes what the stack built, not an aspiration.
Dependency posture
ibis-frameworkcapped<12(core subclassesRelationand walksDeferredinternals; a new major gets matrix-tested by the weeklyIBIS_VERSION=alljob before the cap moves). Lockfiles regenerated.Housekeeping
A broad
git addbriefly swept local working files (CLAUDE.md, a CSV, an embedded repo, three WIP example scripts — one of which imports themalloypackage that only exists onfeat/malloy-interopand would have brokenmake examplesin CI). All un-committed in a follow-up;git-catalogs/andflights.csvare now gitignored so it can't recur.Where the plan stands
This completes the six planned phases (#295→#303): CI safety net → dead code + SCC rim → primitives + typed errors → DAG → ops split → preagg decomposition → serialization consolidation → API surface → boundaries + contract. Remaining named follow-ups, none blocking: phase-4-interior decomposition of the per-source preagg loop, ~40 broad handlers in the preagg path, fluent time_grain/having methods, the
index()wrapper, the drifted twin test files, and the expr.py docstring pass.🤖 Generated with Claude Code