Repository navigation
feat: any/all measures without @of and 1.1.0 rc.5 adopter fixes - #443
Merged
Merged
Conversation
Reporting, in every port: - A bare entity name the path already fixes resolves in that entity's package: a dimension's @Of after @via resolves in the package of the entity the @via reaches, and a report's @spine owner resolves in @from's package. Gated by reporting-cross-package-short-names. - @agg any / all may omit @Of and quantify the measure's @filter or @segment over the rows (bool_or / bool_and on Postgres, MAX / MIN of the condition on SQLite, D1 and MySQL, and in the Cube model). New loader rule M0 refuses an @of-less measure of any other @agg, and an @of-less any / all with no condition, with ERR_INVALID_MEASURE. Tooling: - meta gen no longer tells a docs-only run to wire a prompt generator, and claims emitted value objects only when an entity generator ran. - agentDocsFile() warns when it skips agent/ui.md; includeUiTier is documented. - meta init warns when a pre-release CLI writes generatedBy, and detect-prerelease-pins.sh fails on a pre-release generatedBy. - prerelease-link keeps a pom's final-newline state, reports only real repins, and keeps its git exclude lines in a managed block that unlink removes.
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.
What Changed
measure.aggregatewith@agg: anyorallmay omit@ofand declare a@filteror@segmentinstead. Lowers tobool_or/bool_andoverCOALESCE(condition, FALSE)on Postgres andMAX/MINoverCOALESCE(condition, 0)on SQLite, D1 and MySQL, and to the same SQL in the Cube model. A new loader rule M0 refuses an@of-less measure with any other@agg, and an@of-lessany/allwithout a condition. Gated by three new conformance fixtures across the ports.@ofafter a@viahop, and a report's@spineowner, now resolve a bareOwnerin the package of the entity the path reaches (or@from), not the declaring package. Fully-qualified names are unchanged. Gated by thereporting-cross-package-short-namesfixture.meta genno longer advises wiringpromptRender()for a docs-only run, and only claims payload value objects were emitted when an entity-module generator ran.agentDocsFile()warns when it skipsagent/ui.mdbecauseincludeUiTieris unset.meta initwarns when a pre-release CLI stampsgeneratedBy, anddetect-prerelease-pins.shflags a pre-releasegeneratedByin.metaobjects/.agent-context.json.Validation
Risk Assessment
✅ Low: The latest fix round (F1 cleanup command that tolerates grep's exit 1, F2 hedged notice wording, and a test where the exclude file holds only the legacy line) is correct. Tracing the earlier R1–R6/D11 changes across the TS, C#, Java and Python loaders and report shapes, the view and Cube SQL lowering, and the prerelease scripts found no wrong-result path, and recorded operator decisions are respected.
Testing
Baseline ts-fast/ts-unit ran earlier. Live drives: R1 and R2 with the built-from-source
metaCLI on scratch projects (docs-only config, codegen with template.prompt, agentDocsFile with and without includeUiTier). R5 withmeta verifyon the cross-package fixture, positive and bad-@Of negative. R3, R4, D11 and the notice/cleanup behaviour through the real prerelease scripts in temp repos (tools/prerelease/test-prerelease-link.sh). R6 through the real emitter on real SQLite and Postgres (report-views-sqlite/pg). Not live: C# ReportRowCodegenTests (72 pass) and full server TS bun test (11132 pass, 0 fail), both reported as untested.Evidence: R1 docs-only meta gen output
Evidence: R1 meta gen with codegen generator, advisory wording
Evidence: R2 agentDocsFile without includeUiTier
Evidence: R2 agentDocsFile with includeUiTier
Evidence: R5 verify positive
Evidence: R5 verify negative
Evidence: Full server TS regression output
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed (2) ✅
server/typescript/packages/codegen-ts/src/projection/report-ddl-emit.ts:72- R6 no-@Ofany/allaggregates the raw condition, so a row whose condition evaluates to NULL is skipped instead of counted as not passing. As a result,allreads TRUE when some rows fail the @filter/@segment. The docs define the measure as "allis true when every row does [pass the @filter]" (docs/features/reporting.md:472), and a @filter is WHERE semantics everywhere else. Concrete case: the committed fixtureallSlow(@agg all,@segment slow=latencyMs > 1000on a nullablelatencyMs). A game with calls latency=2000 and latency=NULL reads allSlow = TRUE, yet acountwith the same segment counts only 1 of its 2 calls. The integration tests lock this in: in report-views-pg.test.ts:798 and report-views-sqlite.test.ts:637, game 3 has success = TRUE and NULL, andallSucceeded(@filter success: true) asserts TRUE. Similarly,anyover a non-empty group where no row passes reads NULL instead of FALSE (game 4). Sibling sites with the same semantics: cube-members.ts:246 (bool_or(c)/MAX(c)in the Cube model), the reporting.md:512 and CHANGELOG "skipped, as bool_or skips one" wording, and the two integration-test expectations. Possible remedy: aggregateCOALESCE(c, FALSE)on Postgres andCOALESCE(c, 0)elsewhere, inside the existing spine fact-row guard. A row then passes exactly when the WHERE form would keep it, and only an empty group reads NULL. This changes a documented, test-pinned rule, so it needs the author's decision.tools/prerelease/prerelease-link.sh:903- The D11 fix makesunlinkremove only the new managed block in the sharedinfo/exclude. A clone linked with the pre-fix script (the adopter's rc.4 clone that reported D11) holds bare.npmrc/NuGet.config/.mvn/*lines outside any block. The newunlinknever removes them. A re-linkalso does not see them, becauseexclude_block_linesreads only the block, so it adds a duplicate inside the block. The leftover the intent asks to fix therefore stays in every clone that was already linked. Possible remedy: duringunlink's pruning, also drop a line outside the block that exactly matches a path this script writes (prefix plus.npmrc,NuGet.config,.mvn/settings.xml,.mvn/maven.config) when no worktree still holds a managed file there. That would touch lines outside the block, against the documented 'never a line a user added' promise, so the author should decide.🔧 Fix applied.
3 issues (1 warning, 2 infos) still open:
tools/prerelease/prerelease-link.sh:903- The D11 fix makesunlinkremove only the new managed block in the sharedinfo/exclude. A clone linked with the pre-fix script (the adopter's rc.4 clone that reported D11) holds bare.npmrc/NuGet.config/.mvn/*lines outside any block. The newunlinknever removes them. A re-linkalso does not see them, becauseexclude_block_linesreads only the block, so it adds a duplicate inside the block. The leftover the intent asks to fix therefore stays in every clone that was already linked. Possible remedy: duringunlink's pruning, also drop a line outside the block that exactly matches a path this script writes (prefix plus.npmrc,NuGet.config,.mvn/settings.xml,.mvn/maven.config) when no worktree still holds a managed file there. That would touch lines outside the block, against the documented 'never a line a user added' promise, so the author should decide.tools/prerelease/prerelease-link.sh:277- The cleanup command printed bylegacy_exclude_noticeisgrep -vxF -e <p>... <ex> > <ex>.tmp && mv <ex>.tmp <ex>. When every line of the exclude file is a legacy entry,grep -vprints nothing and exits 1, so the&& mvnever runs. The legacy line stays and a strayexclude.tmpis left behind, with no error. I reproduced it: a file holding only.npmrcgives rc=1, the line is still there, andex.tmpexists. This state is reachable. The pre-fixlocal_excludecreatedinfo/excludewith>>when it was absent, for example in a clone made without git's templates. Then the file holds only the bare lines this notice targets, and the only remedy the notice offers fails. The new test passes only becausegit initseeds the file with template comments. This code was added in fix round 1 (review-2 decision). Fix: print a command that tolerates an empty result, e.g.{ grep -vxF ... <ex> || [ $? -eq 1 ]; } > <ex>.tmp && mv <ex>.tmp <ex>. Add a test case where the exclude file holds only the legacy line.tools/prerelease/prerelease-link.sh:271- The notice says the matching bare lines were(left by an earlier version of it), but the code cannot know that. The comment two lines above says such lines are 'indistinguishable from a line a user added'. Suppose a user hand-added.npmrctoinfo/excludeto protect their own credential-bearing.npmrc. Everylink/unlinkthen tells them the line is the script's leftover and prints a command that removes it. Running that command un-ignores their own.npmrc, which is the credential exposure the exclude block exists to prevent. Keep the notice the operator decided on, but hedge the wording, e.g. 'may have been left by an earlier version of this script; keep any you added yourself'. This text was added in fix round 1.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsbash tools/prerelease/test-prerelease-link.shcd server/typescript && bun test packages/integration-tests/test/report-views-sqlite.test.ts packages/codegen-ts/test/projectioncd server/typescript && bun test packages/integration-tests/test/report-views-sqlite.test.ts packages/integration-tests/test/report-views-pg.test.ts packages/codegen-ts/test/cube packages/codegen-ts/test/agent-docs-surface.test.ts packages/codegen-ts/test/prompt-generator-gate.test.ts packages/codegen-ts/test/runner-docs-generators.test.ts packages/metadata/test/report-shape.test.tscd server/csharp && dotnet test MetaObjects.Codegen.Tests --filter ReportRowCodegenTestscd server/typescript && bun test (full regression)R1 live: bun server/typescript/packages/cli/bin/meta.ts gen in scratch project, docs-only config and entityFile configR2 live: meta gen with agentDocsFile(), with and without includeUiTierR5 live: meta verify on fixtures/conformance/reporting-cross-package-short-names input, positive and @of 'Realm.nope' negative✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.