Repository navigation
feat(lint): a page component props CEL slot over the platform parse bounds warns at validate, build and the page door - #24999
Conversation
… parse bounds Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
…rule; changeset Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 06b2b93cbf43c18db961c34b02f06ffec372f11b && git checkout 06b2b93cbf43c18db961c34b02f06ffec372f11b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4b8f597ba357ba45c7b4b4a4504c78b2a079f123 cceddfcb610abc5a2c377ea0ffc5e9e5275fa7d9 && git checkout -B drift-repro 4b8f597ba357ba45c7b4b4a4504c78b2a079f123 && git merge --no-ff cceddfcb610abc5a2c377ea0ffc5e9e5275fa7d9
node scripts/docs-audit/affected-docs.mjs --json 4b8f597ba357ba45c7b4b4a4504c78b2a079f123
|
Closes #24953
What
A CEL slot declared inside a page component's
propertiesbag that overruns@objectstack/formula'sDEFAULT_LIMITS(maxAstNodes256,maxDepth,maxListElements) is now reported atos validate,os build,os lintand the page publish door (on itsadvisorieschannel). The rule ispage-predicate-over-budget(validatePagePredicateBounds, a new file inpackages/lint). It is a warning in 18.x under the standing ruling 「甲」 (#6015, record 6292005854). Refusing a page that saves today is a narrowing that no ADR-0087 conversion can carry, because a predicate cannot be shrunk mechanically. The 19.0 refusal text is in the report for the seat to file.Premise, measured on
origin/mainf32d795visibleWhenthe card names had 98||terms (489 AST nodes,validateExpressionanswerscel-too-large/maxAstNodes/ 256).PageSchema.safeParsegave success.runAuthoringRules('validate' | 'build')gave 0 findings. The page door gave 0 errors, 0 advisories.visibleWhengavevisibility-predicate-over-budget, error. So the bound is already enforced as an error on the node slot, by the visibility family. The tab item is not a component, so that pass never reads itsvisibleWhen.object-formsectionvisibleWhen, anobject-forminline fieldvisibleWhen, andrecord:alertvisible. A syntax fault on a tab item (record.x === 1) also drew nothing; see Acceptance notes.How
propertiesis parsed with itsComponentPropsMaprow. Every position where the parse produces a{ dialect: 'cel', source }envelope (the output ofEvaluatedExpressionInputSchema) is a CEL slot. A slot that a row declares later is covered with no edit here.validateExpression's. Only itscel-too-largerefusal is reported, with thelimitandlimitValueit carries. The finding names the key and the bound. It does not echo the source:validateExpression'sdetailquotes the author's line.children,footer,items[].children, frompageComponentSlotPositions()) are not descended, becausewalkPageComponentsyields those children as components of their own. The nodevisibleWhenstays the visibility family's error.advisorytier, all three commands,CLI_AND_RUNTIME,runtimeTypes: ['page'].content/docs: the author-time rule count in four CLI transcripts moves from 49 to 50 (check:docs-transcript-drift).Tests (head
cceddfcb61)validate-page-predicate-bounds.test.ts, 18 cases. They cover: the card's shape as a warning at each of validate, build and lint; the door's advisory equal to the build's finding; the within-bounds control drawing nothing at any door; the envelope form;maxDepthandmaxListElementsnaming their bound; object-form section, inline fieldrequiredWhenandrecord:alertvisible; a booleanvisibledrawing nothing; nested tabs; no double report on nodevisibleWhen; and the wiring.@objectstack/lintfull suite: 152 files passed. The one red was the pinned page-door rule roster, updated inruntime-gate.page-visibility-predicate-writes.test.ts, and that file is 15/15 green.@objectstack/linttypecheck green.dispatch-gates --ranaccounts for all 94 derived families.check:generatedis green. NOT MEASURED, prerequisite not met (no builtdist/for the closure; declared to CI):check:dual-build-cjs-loads,check:lean-entry-closure,@objectstack/spec check:skill-examples.Acceptance notes
===on a page:tabs itemvisibleWhen) still draws nothing and fails open in the same way. Root and reference verdicts cannot be borrowed from the node surface: a tab item bindsdatato the row and spreads its bare fields. It is reported for the seat.authoring-rules.ts, on a different entry. No textual overlap is expected beyond registry adjacency.Generated by Claude Code