Skip to content
Draft
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
85d7a4b
DEV-1450 stage 7b.8: local-only generator slice (generate_from_planned)
ZmeiGorynych May 21, 2026
2145e55
DEV-1450 stage 7b.9: generator slice for time dimensions + model.filters
ZmeiGorynych May 22, 2026
1faa044
DEV-1450 stage 7b.10: generator slice for window transforms
ZmeiGorynych May 22, 2026
6ca3cb4
DEV-1450 stage 7b.11: generator slice for self-join CTE transforms
ZmeiGorynych May 22, 2026
c43940a
DEV-1450 stage 7b.12: generator slice for cross-model CTEs
ZmeiGorynych May 22, 2026
3ef9288
DEV-1450 stage 7b.13: generator slice for dialect parity
ZmeiGorynych May 23, 2026
d00739a
DEV-1450 stage 7b.14: production migration off MixedArithmeticField
ZmeiGorynych May 23, 2026
cff26fc
DEV-1450 stage 7b.15a: build_resolved_source_bundle
ZmeiGorynych May 23, 2026
164d975
DEV-1450 stage 7b.15b: binder/parser/core gaps for the 4 cross-model …
ZmeiGorynych May 23, 2026
1cc6508
DEV-1450 stage 7b.15c: multi-stage DAG rendering (generate_planned_st…
ZmeiGorynych May 23, 2026
cf73d3b
DEV-1450 stage 7b.15d: engine cutover (default-path flip)
ZmeiGorynych May 24, 2026
b79c4f6
DEV-1450 stage 7b.15d: integration fixes (chain re-count + time_shift…
ZmeiGorynych May 24, 2026
855dd76
DEV-1450 stage 7b.15d: integration fixes (windowed-filter ValueError …
ZmeiGorynych May 24, 2026
188ed8b
DEV-1450 stage 7b.15d: integration fixes (join cycle detection, no-jo…
ZmeiGorynych May 24, 2026
2f3a11b
DEV-1450 stage 7b.15d: integration fixes (local HAVING for aggregate …
ZmeiGorynych May 24, 2026
64a91f3
DEV-1450 stage 7b.15d: integration fix (arithmetic precedence parens …
ZmeiGorynych May 24, 2026
c92439c
DEV-1450 stage 7b.15d: integration fix (precedence parens in filter a…
ZmeiGorynych May 24, 2026
1207bc4
DEV-1450 stage 7b.15d: integration fix (first/last aggregation in pla…
ZmeiGorynych May 24, 2026
21fe98e
DEV-1450 stage 7b.15d: integration fix (composite-input window transf…
ZmeiGorynych May 24, 2026
7ffe64a
DEV-1450 stage 7b.15d: integration fix (derived columns + joined-colu…
ZmeiGorynych May 24, 2026
c00356a
DEV-1450 stage 7b.15d: integration fix (cross-model re-rooted CTE for…
ZmeiGorynych May 24, 2026
825b182
DEV-1450 stage 7b.15d: integration fix (window transform over cross-m…
ZmeiGorynych May 24, 2026
d90738d
DEV-1450 stage 7b.15e: acceptance tests via engine.execute (1445/1446…
ZmeiGorynych May 24, 2026
5601ad5
DEV-1450 stage 7b.15e: safe deletes (legacy multidot rewriter + parit…
ZmeiGorynych May 24, 2026
7a2824a
DEV-1450 follow-ups: derived-column TDs (#4a), derived-column model f…
ZmeiGorynych May 24, 2026
c1bdd75
DEV-1450 review fixes (group 3): green the Sonar reliability gate
ZmeiGorynych May 24, 2026
44047b0
DEV-1450 review fixes (group 1): cross-model derived-column completeness
ZmeiGorynych May 24, 2026
1eae2f5
DEV-1450 review fixes (group 2): correctness bugs from CodeRabbit
ZmeiGorynych May 24, 2026
2d9729e
DEV-1450 review fixes (group 4): Sonar/CodeRabbit maintainability qui…
ZmeiGorynych May 24, 2026
9e7e59e
DEV-1450 review fixes (round 2): derived agg sources, drift scope, OV…
ZmeiGorynych May 24, 2026
91d7ca2
DEV-1450: merge origin/main, reconcile tests with typed pipeline cont…
ZmeiGorynych May 26, 2026
9b36e71
DEV-1452 Stage A: AggRenderSpec — decouple dialect helpers from Enric…
ZmeiGorynych May 26, 2026
b7ba22b
DEV-1450: PR #139 review pass — Codex + CodeRabbit fixes + CI gap defer
ZmeiGorynych May 26, 2026
ee18009
Merge remote-tracking branch 'origin/egor/dev-1450-principled-redesig…
ZmeiGorynych May 26, 2026
b67eecb
DEV-1452 review fixes (group 1): ColumnSqlKey time arg + complexity
ZmeiGorynych May 26, 2026
a4f33c3
DEV-1452 review fixes (group 2): split _build_ranked_subquery_from_pl…
ZmeiGorynych May 26, 2026
9b32915
DEV-1452 review fixes (group 3): S8396 nullable idiom + DEV-1476 ref
ZmeiGorynych May 26, 2026
3c76c95
DEV-1452 review fixes (group 4): CodeRabbit outside-diff folds
ZmeiGorynych May 26, 2026
7a1110f
DEV-1450: PR #139 round 2 — complete IS/IS NOT coverage + n-ary boole…
ZmeiGorynych May 26, 2026
f1fd662
DEV-1452 review fixes (group 5): S3776 hybrid — helpers + NOSONAR
ZmeiGorynych May 27, 2026
09ab5bc
DEV-1452 Stage B: migrate query-backed expansion onto typed pipeline
ZmeiGorynych May 27, 2026
18daf82
DEV-1452 Stage B review fixes (group 1): Codex correctness — slot met…
ZmeiGorynych May 27, 2026
43fa00e
DEV-1452 Stage B review fixes (group 2): Sonar quick wins
ZmeiGorynych May 27, 2026
feb76af
DEV-1452 Stage B review fixes (group 3): S3776 NOSONAR fan-out
ZmeiGorynych May 27, 2026
eb2e6f8
DEV-1452 Stage B round 2 (group 1): Codex correctness — nested vars +…
ZmeiGorynych May 27, 2026
6ca71e9
DEV-1452 Stage B round 2 (group 2): S3776 _merge_into_existing — extr…
ZmeiGorynych May 27, 2026
351e9b2
DEV-1452 Stage B round 3: Codex — thread bundle through all 5 missing…
ZmeiGorynych May 27, 2026
cde6293
DEV-1452 Stage B round 4: Codex — sibling stage var-layer fix
ZmeiGorynych May 27, 2026
c082ae2
DEV-1452 Stage B round 5: Codex — run-by-name topo + saved ModelMeasu…
ZmeiGorynych May 27, 2026
482e243
DEV-1475: Mode-B IN / NOT IN filters with literal-tuple RHS
ZmeiGorynych May 27, 2026
e67a3de
Merge branch 'egor/dev-1450-principled-redesign-of-syntax' of https:/…
ZmeiGorynych May 27, 2026
c2b7f45
DEV-1452 Stage B round 6: Codex + CodeRabbit fixes
ZmeiGorynych May 27, 2026
5a6ac64
DEV-1452 Stage B round 7: Codex — thread filtered rank maps into cros…
ZmeiGorynych May 28, 2026
d2c32bb
DEV-1452 Stage B fix-up: binding-time errors must subclass ValueError
ZmeiGorynych May 28, 2026
37a0417
DEV-1484 Stage C (commit 1): migrate simpler test files off legacy en…
ZmeiGorynych May 28, 2026
be3aa03
DEV-1484 Stage C (commit 2): migrate reference-semantics + formula tests
ZmeiGorynych May 28, 2026
0c328bd
DEV-1484 Stage C (commit 3): drop legacy resolver unit tests + migrat…
ZmeiGorynych May 28, 2026
0a5aeb1
DEV-1484 Stage C (commit 4a): migrate cross-model derived-column test…
ZmeiGorynych May 28, 2026
1d16e7e
DEV-1484 Stage C (commit 4b): migrate test_projection_trim off legacy…
ZmeiGorynych May 28, 2026
732891b
DEV-1484 Stage C (commit 4c): scrub legacy-symbol references from tes…
ZmeiGorynych May 28, 2026
4ccb673
DEV-1452 Stage B round 8: Codex — joined-dim type + derived time-col …
ZmeiGorynych May 28, 2026
7b03363
DEV-1484 Stage C (commit 5a): migrate test_sql_generator off legacy (…
ZmeiGorynych May 28, 2026
8b2239c
Merge pull request #144 from MotleyAI/egor/dev-1452-delete-legacy-enr…
ZmeiGorynych May 28, 2026
fea8381
DEV-1484 Stage C (commit 6): complete test_sql_generator migration of…
ZmeiGorynych May 28, 2026
0065024
Merge remote-tracking branch 'origin/egor/dev-1450-principled-redesig…
ZmeiGorynych May 28, 2026
f083fbe
DEV-1494: inline cross-model derived refs in Column.filter + discover…
ZmeiGorynych May 29, 2026
db888d0
DEV-1494: address review feedback (CodeRabbit + Codex + Sonar gate)
ZmeiGorynych May 29, 2026
b343231
DEV-1494: clear remaining Sonar gate findings
ZmeiGorynych May 29, 2026
40d31b1
Merge branch 'main' of https://github.com/MotleyAI/slayer into egor/d…
ZmeiGorynych May 30, 2026
74ed95a
Merge pull request #155 from MotleyAI/egor/dev-1494-typed-pipeline-cr…
ZmeiGorynych May 30, 2026
beb6924
DEV-1500: recognize joined-model custom aggregations in FUNC_STYLE_AG…
ZmeiGorynych May 30, 2026
f7a24e3
DEV-1492: preserve transform kwargs in filter normalization
ZmeiGorynych May 31, 2026
1714df3
DEV-1501: parametric first/last in ORDER BY / HAVING — materialise + …
ZmeiGorynych May 31, 2026
8bc9504
DEV-1500: also recognize joined-model custom aggs in the quiet FUNC_S…
ZmeiGorynych May 31, 2026
dc7a775
DEV-1501 PR #159 review fixes: HAVING ranked-state threading + Sonar …
ZmeiGorynych May 31, 2026
74f2b66
Refactor: extract _chain_model + _save_4hop_chain helpers
ZmeiGorynych May 31, 2026
00a0a7a
DEV-1501 PR #159 review round 2: thread aliases through nested HAVING…
ZmeiGorynych May 31, 2026
ca84ccc
DEV-1501 PR #159 review round 3: composite first/last in projection r…
ZmeiGorynych May 31, 2026
c8fbfc5
Refactor: split normalize_model + extract save-time agg walk to a method
ZmeiGorynych May 31, 2026
93bc7cd
Merge pull request #156 from MotleyAI/egor/dev-1500-slack-func_style_…
ZmeiGorynych May 31, 2026
5073ee8
DEV-1501 PR #159 review round 4: composite-only first/last triggers r…
ZmeiGorynych May 31, 2026
248fee1
syntax: split _rewrite_comparison_equals to clear cognitive-complexit…
ZmeiGorynych May 31, 2026
a086de3
DEV-1501 PR #159 review round 5: composite first/last validation + jo…
ZmeiGorynych Jun 1, 2026
5568111
syntax: restore transform predicate-input form (bare-ref equality)
ZmeiGorynych Jun 1, 2026
426f8ad
DEV-1501 PR #159 review round 6: filtered composite + cross-model AGG…
ZmeiGorynych Jun 1, 2026
3527a09
DEV-1501 PR #159 review round 7: ScalarCallKey alias thread + dedupe …
ZmeiGorynych Jun 1, 2026
8eab620
syntax: colon-agg context disambiguates ambiguous transform/agg names
ZmeiGorynych Jun 1, 2026
a66e0e8
DEV-1501 PR #159 review round 8: derived time-col join + test dedup
ZmeiGorynych Jun 1, 2026
b1b8b09
Merge pull request #158 from MotleyAI/egor/dev-1492-parse_filter_expr…
ZmeiGorynych Jun 1, 2026
85e13c9
DEV-1501 PR #159 review round 9: cross-model HAVING args/kwargs reroot
ZmeiGorynych Jun 1, 2026
ffd85bc
Merge pull request #159 from MotleyAI/egor/dev-1501-parametric-lastfi…
ZmeiGorynych Jun 1, 2026
5aea9b0
DEV-1503: filtered-local isolation on typed pipeline + outer-WHERE wr…
ZmeiGorynych Jun 3, 2026
17d9ede
DEV-1503 review round 1: filter routing, mixed cross-model wrapper, h…
ZmeiGorynych Jun 3, 2026
1cf7ff6
DEV-1503 review round 2: composite-over-isolated + no-dim placeholder
ZmeiGorynych Jun 3, 2026
c81ab51
DEV-1503 review round 3: outer-composite routing edge cases
ZmeiGorynych Jun 3, 2026
ec90f1c
DEV-1503 review round 4: empty_base host filters + Sonar S3776
ZmeiGorynych Jun 3, 2026
3ec2fb9
DEV-1503 review round 5: skip_filter_ids in first/last base path
ZmeiGorynych Jun 3, 2026
f422473
DEV-1503 review round 5b: empty_base host filter joined-alias discovery
ZmeiGorynych Jun 3, 2026
2f22c17
DEV-1503 review round 7: dialect fallback chain on filter parse
ZmeiGorynych Jun 3, 2026
71e28f8
DEV-1503 review round 4: empty_base host filters + Sonar S3776
ZmeiGorynych Jun 3, 2026
0bd34f3
DEV-1503 review round 9: dialect fallback covers derived-ref expansion
ZmeiGorynych Jun 3, 2026
e381429
Merge pull request #163 from MotleyAI/egor/dev-1503-typed-pipeline-la…
ZmeiGorynych Jun 3, 2026
30e5e09
DEV-1502: pull joins crossed by an aggregate source's Column.sql
ZmeiGorynych Jun 3, 2026
fc0853f
DEV-1502: use pytest.approx for float SUM assertion (Sonar S1244)
ZmeiGorynych Jun 4, 2026
b8aa68d
DEV-1502: strengthen cross-model defensive test's negative assertion
ZmeiGorynych Jun 4, 2026
7862290
DEV-1502: qualify cross-model CTE join-discovery note (Codex)
ZmeiGorynych Jun 4, 2026
e04620f
DEV-1502: convert first/last derived-source test to DEV-1531 xfail
ZmeiGorynych Jun 4, 2026
1c69c78
Merge pull request #165 from MotleyAI/egor/dev-1502-typed-pipeline-__…
ZmeiGorynych Jun 5, 2026
a168d64
Merge branch 'refs/heads/egor/dev-1450-principled-redesign-of-syntax'…
ZmeiGorynych Jun 12, 2026
4278bf8
PR #153 review sweep: 5 correctness bugs + 3 keyword-only helpers + t…
ZmeiGorynych Jun 12, 2026
ed44862
PR #153 follow-up: Codex lexer fix + 3 S3776 refactors + CI for stack…
ZmeiGorynych Jun 12, 2026
2c48889
PR #153 round-3 review: 2 CI failures fixed + lexer tests + S3776 < 15
ZmeiGorynych Jun 12, 2026
e62f913
PR #153 round-3 follow-up: refactor 4 pre-existing S3776 functions in…
ZmeiGorynych Jun 12, 2026
b6edfe8
Merge pull request #153 from MotleyAI/egor/dev-1484-dev-1452-stage-c-…
ZmeiGorynych Jun 12, 2026
82c6d0d
DEV-1704 Stage 0: merge origin/main into the typed pipeline + parity …
ZmeiGorynych Jul 26, 2026
66ebe22
DEV-1704: address Stage-0 merge review — restore RLS + disposal, defe…
ZmeiGorynych Jul 26, 2026
c31f193
DEV-1715: re-wire per-query cache (DEV-1587) into the typed pipeline
ZmeiGorynych Jul 27, 2026
a906b6b
DEV-1715: address PR #254 review (Codex + CodeRabbit + Sonar)
ZmeiGorynych Jul 27, 2026
8a0b6cc
Remove stale help→inspect parity pin (DEV-1658/DEV-1717)
ZmeiGorynych Jul 27, 2026
b12968c
DEV-1704: integration triage — fix RLS get_column_types gap, pin inte…
ZmeiGorynych Jul 27, 2026
f40e01f
DEV-1704: typed Mode-B filter parser accepts the SQL LIKE operator (f…
ZmeiGorynych Jul 27, 2026
baae7b7
DEV-1704: fix CI — unpin the slayer.help-deletion test (false pin fro…
ZmeiGorynych Jul 27, 2026
3d6d55f
DEV-1716: route typed generator emission through slayer/sql/dialects/
ZmeiGorynych Jul 27, 2026
49d3218
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
894339e
DEV-1717: engine-parity batch — recommend_root_model, count_distinct_…
ZmeiGorynych Jul 27, 2026
853c307
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
774f3aa
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
8ca9b77
DEV-1716: dialect-quote the planned-path emission (time-shift / cross…
ZmeiGorynych Jul 27, 2026
d4a5b99
DEV-1716: address review — query-backed wrapped-ref mangling + Sonar/…
ZmeiGorynych Jul 27, 2026
6e863a4
DEV-1716: harden T-SQL multi-stage test to reject dotted bracketed id…
ZmeiGorynych Jul 27, 2026
6e200f4
DEV-1717: reject non-aggregating measures with a clear error (round/a…
ZmeiGorynych Jul 27, 2026
44c7f05
DEV-1716: normalize week_sunday -> WEEK in TsqlDialect.build_time_off…
ZmeiGorynych Jul 27, 2026
7bdf323
DEV-1716: decode alias-mangled stage aliases in build_flat_rename_wra…
ZmeiGorynych Jul 27, 2026
fbcec07
DEV-1716: decode mangled probe keys in get_column_types + test import…
ZmeiGorynych Jul 27, 2026
d685377
Merge pull request #257 from MotleyAI/egor/dev-1716-dev-1703-route-ty…
ZmeiGorynych Jul 27, 2026
6fef652
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
03b68c8
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
aba2f3c
DEV-1715: scan refresh keys by datasource fingerprint, not name (Codex)
ZmeiGorynych Jul 27, 2026
63ed24b
DEV-1715: pin refresh() re-exec to the entry's datasource identity (C…
ZmeiGorynych Jul 27, 2026
a73d0dc
DEV-1715: document refresh() datasource-identity pinning + query-back…
ZmeiGorynych Jul 27, 2026
a74c54c
DEV-1717: address PR #258 review (Codex + CodeRabbit + Sonar)
ZmeiGorynych Jul 27, 2026
12029cf
DEV-1715: dedupe repointed-datasource test setup (Sonar duplication g…
ZmeiGorynych Jul 27, 2026
881967c
DEV-1717: facade catalog infers count_distinct_approx as INT (Codex)
ZmeiGorynych Jul 27, 2026
f069b79
Merge pull request #254 from MotleyAI/egor/dev-1715-dev-1703-re-wire-…
ZmeiGorynych Jul 27, 2026
6832f13
Merge remote-tracking branch 'origin/egor/dev-1704-dev-1703-stage-0-m…
ZmeiGorynych Jul 27, 2026
cdee29d
Merge pull request #258 from MotleyAI/egor/dev-1717-dev-1703-engine-p…
ZmeiGorynych Jul 27, 2026
f2a8b11
Merge pull request #256 from MotleyAI/egor/dev-1704-dev-1703-stage-0-…
ZmeiGorynych Jul 27, 2026
2604ba4
Merge origin/main into egor/dev-1703 typed-pipeline branch
ZmeiGorynych Aug 1, 2026
d542ab3
DEV-1703: gate opaque-dimension guard on grouping (code-review fix)
ZmeiGorynych Aug 1, 2026
ac69ccc
DEV-1703: extend opaque-dim guard across stage boundaries (process-re…
ZmeiGorynych Aug 1, 2026
11d4976
DEV-1705 Stage 1: assert_scope_closed validator + carrier×scope matrix
ZmeiGorynych Aug 1, 2026
7d672b9
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 1, 2026
cb2cc87
DEV-1705: address PR #264 review (CodeRabbit)
ZmeiGorynych Aug 1, 2026
aed4268
Merge pull request #264 from MotleyAI/egor/dev-1705-dev-1703-stage-1-…
ZmeiGorynych Aug 1, 2026
14c4861
DEV-1706 Stage 2: ScopeFrame + single resolver + minimal alias allocator
ZmeiGorynych Aug 2, 2026
842f31f
DEV-1706: quote mixed-case join keys in the typed FROM/JOIN builder (…
ZmeiGorynych Aug 2, 2026
cf36dc2
DEV-1706: fold the aggregate-phase join collectors into the resolver
ZmeiGorynych Aug 2, 2026
9afa668
DEV-1706: fold the two ROW-phase join collectors into the resolver
ZmeiGorynych Aug 2, 2026
e9e9cce
DEV-1706: address PR #265 review (Codex composite kwarg + Sonar/CodeR…
ZmeiGorynych Aug 2, 2026
da98f98
DEV-1706: address PR #265 round-2 review (CodeRabbit)
ZmeiGorynych Aug 2, 2026
66c64fa
Merge pull request #265 from MotleyAI/egor/dev-1706-dev-1703-stage-2-…
ZmeiGorynych Aug 2, 2026
aa8f3e3
DEV-1707 Stage 3: unified reroot_aggregate_key (source + args + kwarg…
ZmeiGorynych Aug 2, 2026
bcaf249
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 2, 2026
851cea4
DEV-1707: address PR #266 review (Sonar S5778 + CodeRabbit nitpicks)
ZmeiGorynych Aug 2, 2026
0a14862
Merge pull request #266 from MotleyAI/egor/dev-1707-dev-1703-stage-3-…
ZmeiGorynych Aug 2, 2026
db9b30a
DEV-1708 Stage 4: cross-model/isolation CTE renderer on ScopeFrame + …
ZmeiGorynych Aug 3, 2026
b6ccaf8
DEV-1710 Stage 6: first/last explicit-time args resolve through Scope…
ZmeiGorynych Aug 3, 2026
96c8a32
Merge dev-1708 (Stage 4: cross-model/isolation CTE renderer on ScopeF…
ZmeiGorynych Aug 3, 2026
73a6808
DEV-1708 review round 1: ScalarCallKey/BetweenKey routed filters, com…
ZmeiGorynych Aug 3, 2026
3431e9a
DEV-1708 review round 2: NOSONAR(S3776) on two cohesive units after e…
ZmeiGorynych Aug 3, 2026
e09620c
DEV-1710: hoist generator out of pytest.raises (Sonar S5778)
ZmeiGorynych Aug 3, 2026
d60469e
DEV-1713 Stage 9: full naming module (result keys, flat names, dialec…
ZmeiGorynych Aug 3, 2026
60e9fec
Merge pull request #267 from MotleyAI/egor/dev-1708-dev-1703-stage-4-…
ZmeiGorynych Aug 3, 2026
b422b23
Merge branch 'egor/dev-1703-comprehensive-approach-expressions-crossi…
ZmeiGorynych Aug 3, 2026
30e4479
DEV-1713 PR #269 review: consecutive_periods de-collision + Sonar/Cod…
ZmeiGorynych Aug 3, 2026
31f9aae
Merge pull request #268 from MotleyAI/egor/dev-1710-dev-1703-stage-6-…
ZmeiGorynych Aug 3, 2026
3851ce0
DEV-1713 PR #269 review round 2: NOSONAR syntax + hidden-alias reserve
ZmeiGorynych Aug 3, 2026
54e2ed7
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 3, 2026
dffceb9
Merge origin/egor/dev-1703 into DEV-1713 Stage 9
ZmeiGorynych Aug 3, 2026
e473b05
DEV-1709 Stage 5: widen Law-3 isolation trigger to any crossing input…
ZmeiGorynych Aug 3, 2026
8139eaf
DEV-1711 Stage 7: time_shift CTEs on ScopeFrame (cross-model partitions)
ZmeiGorynych Aug 3, 2026
ba5f1e5
PR #271 review round 1: fragment-kwarg join registration + 2 Sonar fixes
ZmeiGorynych Aug 3, 2026
d355280
DEV-1713 PR #269 post-merge review: route enrichment flatten through …
ZmeiGorynych Aug 3, 2026
9f6b326
DEV-1726: dialect-aware case folding for CTE name collision detection
ZmeiGorynych Aug 3, 2026
20f746d
Merge pull request #271 from MotleyAI/egor/dev-1709-dev-1703-stage-5-…
ZmeiGorynych Aug 3, 2026
f66b9a8
DEV-1726 PR #273 review: Sonar fixes + CodeRabbit helper consolidation
ZmeiGorynych Aug 3, 2026
9b4386d
Merge origin/egor/dev-1703 into DEV-1713 Stage 9
ZmeiGorynych Aug 3, 2026
81d6d09
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 3, 2026
7c61561
PR #272 review sweep: structural filter-path scan + Sonar S3776/S1192…
ZmeiGorynych Aug 3, 2026
1d4a27d
Merge pull request #269 from MotleyAI/egor/dev-1713-dev-1703-stage-9-…
ZmeiGorynych Aug 3, 2026
5b489bb
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 3, 2026
9993afd
DEV-1703: make MetricFlow notebook bootstrap resilient to transient G…
ZmeiGorynych Aug 3, 2026
b305b3c
Merge umbrella (DEV-1713 Stage 9) into DEV-1711 Stage 7
ZmeiGorynych Aug 3, 2026
d536989
PR #272 CodeRabbit: null-safe doc example + compress DECISIONS entry
ZmeiGorynych Aug 3, 2026
14b9a7b
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 3, 2026
0c1598f
Merge pull request #272 from MotleyAI/egor/dev-1711-dev-1703-stage-7-…
ZmeiGorynych Aug 3, 2026
e826484
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 3, 2026
a7a0c24
DEV-1726 PR #273 review round 2: share gen-wide allocator at placehol…
ZmeiGorynych Aug 3, 2026
385d377
Merge pull request #273 from MotleyAI/egor/dev-1726-dialect-aware-cas…
ZmeiGorynych Aug 3, 2026
f5e588b
DEV-1712 Stage 8: order-only hidden slots + plan-time validations
ZmeiGorynych Aug 3, 2026
b6fec80
PR #274 review sweep: joined-ORDER-BY collision fix + Sonar/CodeRabbi…
ZmeiGorynych Aug 3, 2026
3115fc6
DEV-1728: render a cross-model aggregate grouped by a joined derived …
ZmeiGorynych Aug 4, 2026
9eca139
PR #274 review round 2: stage-host qualifier fix + S3776 NOSONAR
ZmeiGorynych Aug 4, 2026
fb30eae
DEV-1714 Stage 10: windowed measures (_wm_ range-join) on ScopeFrame
ZmeiGorynych Aug 4, 2026
db332ee
PR #274 review round 3: legacy collision guard + CodeRabbit T1/T2/T3
ZmeiGorynych Aug 4, 2026
df5222b
DEV-1728 PR #276 review round 1: Sonar gate, CodeRabbit, Codex
ZmeiGorynych Aug 4, 2026
aab4b9d
PR #274 review round 4: ambiguity/message refinements
ZmeiGorynych Aug 4, 2026
7bcf23c
DEV-1714 PR #277 review: windowed guard/plan robustness + generator e…
ZmeiGorynych Aug 4, 2026
31e80ec
DEV-1728 PR #276 review round 2: Sonar S6353 concise character class
ZmeiGorynych Aug 4, 2026
68f223f
PR #274 review round 5: reject unprojected sort key in legacy paginat…
ZmeiGorynych Aug 4, 2026
63f814f
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 4, 2026
d929da3
DEV-1714 PR #277 review round 2: ORDER BY windowed measure fix
ZmeiGorynych Aug 4, 2026
b6b1d64
Post-merge: route the order-only derived-crossing scope allocator thr…
ZmeiGorynych Aug 4, 2026
775250a
DEV-1714 PR #277 review round 3: deterministic windowed order
ZmeiGorynych Aug 4, 2026
341166a
Merge pull request #274 from MotleyAI/egor/dev-1712-dev-1703-stage-8-…
ZmeiGorynych Aug 4, 2026
6209f53
Merge origin/egor/dev-1703 (Stage 8 DEV-1712 + DEV-1726) into DEV-171…
ZmeiGorynych Aug 4, 2026
1ddab73
DEV-1714 PR #277 review round 4: route _wm_ CTE names through allocator
ZmeiGorynych Aug 4, 2026
f8afe91
DEV-1714 PR #277 review round 5: reject windowed+row mixed filter
ZmeiGorynych Aug 4, 2026
0cd20ea
Merge origin/egor/dev-1714 (Stage 10 windowed measures + Stage 8) int…
ZmeiGorynych Aug 4, 2026
b082ef9
Merge pull request #277 from MotleyAI/egor/dev-1714-dev-1703-stage-10…
ZmeiGorynych Aug 4, 2026
e7984d1
Merge pull request #276 from MotleyAI/egor/dev-1728-render-a-cross-mo…
ZmeiGorynych Aug 4, 2026
2b4d286
Merge origin/main into DEV-1703 typed pipeline (DEV-1625 parity)
ZmeiGorynych Aug 4, 2026
d4f80e7
Merge origin/egor/dev-1703 (Stages 7, 8, 10 + DEV-1726/1728) into local
ZmeiGorynych Aug 4, 2026
c022188
DEV-1733: order-only transform / composite / windowed ORDER BY targets
ZmeiGorynych Aug 4, 2026
03695d4
DEV-1732: frame-bound filters must not truncate trailing-window / shi…
ZmeiGorynych Aug 4, 2026
43f433f
Merge origin/egor/dev-1703 (DEV-1728 derived shared grain) into DEV-1732
ZmeiGorynych Aug 4, 2026
19c3fe5
DEV-1703 Phase 1: order-only refs resolve like filter refs
ZmeiGorynych Aug 4, 2026
5ece3cf
DEV-1733 PR #280 review round 1: Sonar + CodeRabbit
ZmeiGorynych Aug 4, 2026
35fd9c7
DEV-1703 Phase 2: migrate tests off the legacy enrichment stack
ZmeiGorynych Aug 4, 2026
78c1214
DEV-1703: restore distinct_dimension_values compile-time validation
ZmeiGorynych Aug 4, 2026
1ed0cab
Fix: Mode-B scalar function names are case-insensitive again
ZmeiGorynych Aug 4, 2026
2f6cdfa
DEV-1733 PR #280 review round 2: last Sonar S5778
ZmeiGorynych Aug 4, 2026
be9905b
PR #281 review sweep: Sonar S9073/S3776 + CodeRabbit + Codex hardening
ZmeiGorynych Aug 4, 2026
a4e4cdb
DEV-1703 Phase 2b: remove the last _enrich / generate(enriched=) call…
ZmeiGorynych Aug 4, 2026
db9acaf
DEV-1733 PR #280 review round 3: two silent-wrong-answer regressions
ZmeiGorynych Aug 4, 2026
39c699b
Merge pull request #281 from MotleyAI/egor/dev-1732-windowed-measures…
ZmeiGorynych Aug 4, 2026
f929fb1
Merge remote-tracking branch 'origin/egor/dev-1703-comprehensive-appr…
ZmeiGorynych Aug 4, 2026
8e5e43b
DEV-1733 PR #280 review round 4: DECISIONS summary contradicted its o…
ZmeiGorynych Aug 4, 2026
ca5ee9f
Merge pull request #280 from MotleyAI/egor/dev-1733-typed-pipeline-or…
ZmeiGorynych Aug 4, 2026
1ba5616
Merge origin/egor/dev-1703 (DEV-1732 + DEV-1733) into local
ZmeiGorynych Aug 4, 2026
6092b74
DEV-1703 Phase 3 (DEV-1485 Stage D): delete the legacy enrichment stack
ZmeiGorynych Aug 4, 2026
a633824
DEV-1703 Phase 4: docs + comments catch up with the single-pipeline r…
ZmeiGorynych Aug 4, 2026
4a1fada
DEV-1703 Phase 3 follow-up: fix a vacuous test + delete the deletion'…
ZmeiGorynych Aug 4, 2026
7453ce2
DEV-1703: delete path_resolution.py (zero production callers)
ZmeiGorynych Aug 4, 2026
4a36322
Merge origin/main (PR 211 Cube ingestion, DEV-1727, DEV-1730) into DE…
ZmeiGorynych Aug 4, 2026
5e33f70
DEV-1703: fix stale module docstrings + delete the orphaned async exp…
ZmeiGorynych Aug 4, 2026
3df9d10
DEV-1703: clear all 11 open SonarCloud issues on PR 263
ZmeiGorynych Aug 4, 2026
5d9a035
DEV-1703: rewrite docstrings that mirrored the deleted async expander
ZmeiGorynych Aug 4, 2026
2375390
DEV-1703: finish the S5778 fix — hoist the fixture calls too
ZmeiGorynych Aug 5, 2026
e7d078c
Merge pull request #263 from MotleyAI/egor/dev-1703-comprehensive-app…
ZmeiGorynych Aug 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
261 changes: 261 additions & 0 deletions slayer/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,264 @@ def __init__(self, cycle: List[Tuple[str, str]]) -> None:
self.cycle: List[Tuple[str, str]] = list(cycle)
chain = " → ".join(f"{m}.{c}" for m, c in self.cycle)
super().__init__(f"Circular column reference detected: {chain}")


# ---------------------------------------------------------------------------
# DEV-1450 stage-5 errors — typed, stable str() format.
#
# All error classes below build their message via ``_format_error_message``
# so ``str(error)`` follows the documented snapshot-friendly shape::
#
# <ErrorName>: <one-line summary>
# at <location>
# scope: <short scope summary>
# suggestion: <did-you-mean>
#
# Each indented line is optional. The first line ALWAYS starts with the
# class name so log greps and snapshot tests bind to a stable prefix.
# ---------------------------------------------------------------------------


def _format_error_message(
*,
cls_name: str,
summary: str,
location: str | None = None,
scope: str | None = None,
suggestion: str | None = None,
extras: List[Tuple[str, str]] | None = None,
) -> str:
"""Build the stable error-message string used by stage-5 error classes.

``extras`` lets a class add bespoke key/value rows after the summary
while keeping the leading ``ClassName:`` token intact.
"""
lines = [f"{cls_name}: {summary}"]
if location:
lines.append(f" at {location}")
if scope:
lines.append(f" scope: {scope}")
for k, v in (extras or []):
lines.append(f" {k}: {v}")
if suggestion:
lines.append(f" suggestion: {suggestion}")
return "\n".join(lines)


class UnknownReferenceError(SlayerError):
"""A bare or dotted reference cannot be resolved in the current scope."""

def __init__(
self,
name: str,
scope_kind: str,
scope_summary: str,
suggestion: str | None = None,
) -> None:
self.name = name
self.scope_kind = scope_kind
self.scope_summary = scope_summary
self.suggestion = suggestion
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Cannot resolve reference {name!r}.",
scope=f"{scope_kind}: {scope_summary}",
suggestion=suggestion,
))


class AmbiguousReferenceError(SlayerError):
"""A reference matches multiple candidates in scope and can't pick one."""

def __init__(self, name: str, candidates: List[str]) -> None:
self.name = name
self.candidates = sorted(candidates)
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Reference {name!r} has multiple candidates.",
extras=[("candidates", repr(self.candidates))],
))


class IllegalScopeReferenceError(SlayerError):
"""A reference is syntactically rejected by the current scope kind.

Examples: ``__`` in a Mode-B ``ModelScope`` ref (use the dotted form);
a dotted ref against a ``StageSchema`` (downstream stages see a flat
namespace, no join syntax).
"""

def __init__(self, name: str, scope_kind: str, reason: str) -> None:
self.name = name
self.scope_kind = scope_kind
self.reason = reason
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Reference {name!r} is not legal in this scope.",
scope=scope_kind,
extras=[("reason", reason)],
))


class IllegalWindowInFilterError(SlayerError):
"""A filter contains a raw ``OVER(...)`` window expression, or refers
to a ``Column.sql`` whose body contains a window function (DEV-1369 /
DEV-1336 — predicate promotion was removed). Use a rank-family
transform instead.
"""

def __init__(
self,
filter_expr: str,
source: str,
suggestion: str = "use a rank-family transform (e.g. `rank(<measure>) <= N`).",
) -> None:
self.filter_expr = filter_expr
self.source = source
self.suggestion = suggestion
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary="Window expressions are not allowed in filters.",
extras=[
("expr", repr(filter_expr)),
("source", source),
],
suggestion=suggestion,
))


class AggregationNotAllowedError(SlayerError):
"""An aggregation cannot apply to a column.

Covers type-bucket violations (``sum`` on TEXT), primary-key
restrictions (only ``count`` / ``count_distinct``), and explicit
``Column.allowed_aggregations`` whitelist violations.
"""

def __init__(self, column: str, agg: str, reason: str) -> None:
self.column = column
self.agg = agg
self.reason = reason
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Aggregation {agg!r} is not allowed on column {column!r}.",
extras=[("reason", reason)],
))


class UnknownFunctionError(SlayerError):
"""A function call in Mode B is not in the ``SCALAR_FUNCTIONS`` allowlist,
the transform registry, or the model's aggregation set (C12).
"""

_DEFAULT_SUGGESTION = "move the call to a derived Column.sql (Mode A)."

def __init__(
self,
name: str,
location: str,
suggestion: str | None = None,
) -> None:
self.name = name
self.location = location
self.suggestion = suggestion or self._DEFAULT_SUGGESTION
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Function {name!r} is not allowed in Mode B.",
location=location,
suggestion=self.suggestion,
))


class MeasureRecursionLimitError(SlayerError):
"""Named-measure expansion exceeded the configurable depth limit
(default 32; ``SLAYER_MEASURE_EXPANSION_DEPTH``).
"""

def __init__(self, chain: List[str], limit: int = 32) -> None:
self.chain = list(chain)
self.limit = limit
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Named-measure expansion exceeded depth (limit={limit}).",
extras=[("chain", " → ".join(self.chain))],
))


class MeasureCycleError(SlayerError):
"""Named-measure expansion encountered a cycle."""

def __init__(self, chain: List[str]) -> None:
self.chain = list(chain)
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary="Cyclic reference in named-measure expansion.",
extras=[("chain", " → ".join(self.chain))],
))


class DuplicateMeasureNameError(SlayerError):
"""Two measures in the same query declare the same explicit ``name``
(DEV-1443).
"""

def __init__(self, name: str, occurrences: List[str]) -> None:
self.name = name
self.occurrences = list(occurrences)
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=f"Measure name {name!r} is declared more than once.",
extras=[("occurrences", repr(self.occurrences))],
))


class MeasureNameCollidesWithColumnError(SlayerError):
"""A declared measure ``name`` matches a source column on the model
(DEV-1443) — the alias-form filter would silently bind to the source
column instead of the aggregate.
"""

def __init__(self, name: str, model: str) -> None:
self.name = name
self.model = model
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=(
f"Declared measure name {name!r} matches a source column on "
f"model {model!r}."
),
))


class CanonicalAliasShadowsColumnError(SlayerError):
"""A formula's canonical alias (e.g., ``amount_sum`` for ``amount:sum``)
shadows a source column on the same model (DEV-1443).
"""

def __init__(self, formula: str, canonical: str, model: str) -> None:
self.formula = formula
self.canonical = canonical
self.model = model
super().__init__(_format_error_message(
cls_name=type(self).__name__,
summary=(
f"Canonical alias {canonical!r} for formula {formula!r} "
f"shadows a source column on model {model!r}."
),
))


class UnreachableFilterDroppedWarning(UserWarning):
"""A host filter referenced slots that aren't reachable from a
cross-model CTE's root, so the filter was dropped from the CTE.
The host query still applies the filter to its own rows; this is a
visibility/debug warning, not an error.
"""

def __init__(self, filter_text: str, reason: str) -> None:
self.filter_text = filter_text
self.reason = reason
super().__init__(
f"Filter {filter_text!r} dropped from cross-model CTE "
f"(unreachable from CTE root): {reason}"
)
Loading