Closes every known gap the Health_and_Safety composite-model fixture exposed. Four discrete fixes, each with its own regression test, plus a new auto-date toggle in the Tables tab.
- Task 6.1 — Multi-line TMDL expressions with quoted names parse correctly. The
expression 'NAME'regex used\S+for the name, which stopped at the first space inside quoted identifiers like'DirectQuery to AS - Health_and_Safety_Gold'. Every composite model silently parsed zero expressions, cascading into every DQ partition collapsing to "Unknown / M". Switched to'[^']+'|"[^"]+"|[\w.-]+so quoted names are captured. - Task 6.2 — Entity-partition source resolution via shared expressions. TMDL composite partitions use
source+ nestedentityName: …+expressionSource: 'NAME', not inline M. The previous extractor only handled thesource = <inline M>form.extractTmdlPartitionsnow accepts an expression table, followsexpressionSourcereferences, and runsinferSourceagainst the resolved body. Result on H&S: 48 DQ partitions previously "Unknown / M" now resolve to Analysis Services with the real cluster URL (powerbi://api.powerbi.com/…). The partition-name regex was also fixed to handle quoted names with spaces (partition 'Date NEW' = entity).
- Task 6.3 — Structured
externalProxyfield onModelMeasure. EXTERNALMEASURE proxy detection moved from render-time regex intobuildFullData, populating{ remoteName, type, externalModel, cluster }.clusterresolves from the corresponding shared expression'sAnalysisServices.Database(...)first argument. Downstream consumers (dashboard lineage card, measures MD export, future Quality rules) now read a structured field instead of each re-implementing the regex. Client keeps the render-time regex as a back-compat fallback for olderDATApayloads. - Task 6.4 —
origin: "user" | "auto-date"onTableData. Tables matchingLocalDateTable_*orDateTableTemplate_*are tagged as auto-date infrastructure. The client hides them from default counts on the Tables tab, Sources tab, and tab-count badges. A toggle button in the Tables-tab footer ("Show auto-date (N)" / "Hide auto-date (N)") opts them in. Default tab-count footer notes+N auto-date hiddenso the count difference is discoverable. tests/composite-model.test.ts— 5 integration tests against the real H&S fixture covering every task above:- expressions with quoted names parse
- every DQ partition resolves to Analysis Services
- EXTERNALMEASURE proxies get structured
externalProxy - proxy
clusterURL resolves from the shared expression - auto-date classification matches the naming convention exactly Tests gracefully skip if the fixture isn't checked out.
54 / 54 green (was 49, +5). Typecheck and build clean. Live smoke against test/Health_and_Safety.Report:
- 53 tables total → 43 user + 10 auto-date
- 48 DQ partitions resolve to Analysis Services (was 0 before)
- 4 "Unknown / M" remaining are user-authored import
switch_*dimension tables whose M doesn't match any built-in pattern and isn't expression-referenced (correctly out-of-scope) - 19 EXTERNALMEASURE proxies tagged with full
externalProxyincl. cluster URL - Toggle button present in Tables-tab footer