Uh oh!
There was an error while loading. Please reload this page.
test(app-shell): make field-rule 'non-CEL dialect' fixture forward-compatible (framework#3278) - #2696
Merged
Merged
Conversation
…mpatible
The 'skips non-CEL dialect envelopes' test used `{ dialect: 'js', source: '!!!' }`.
framework#3278 (spec PR #3291) retires the `js` expression dialect from
`ExpressionDialect` (now `cel|cron|template`), which will make that envelope
shape-invalid once objectui bumps to the narrowed spec, breaking the
`.toEqual([])` assertion via a spec-Zod issue at `fields.status.visibleWhen`.
Swap to `{ dialect: 'template', source: '!!!' }` — a well-typed NON-CEL dialect
that survives the narrowing. It must stay non-CEL: `predicateSource` only lints
`dialect: undefined | 'cel'`, so `dialect: 'cel'` would make the lint OWN the
garbage source and flag it, flipping the assertion. Behavior-neutral against the
current spec (15.1.1, `js` still present) and the future narrowed spec alike.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
clientValidation.fieldRules.test.ts— the "skips non-CEL dialect envelopes" test used{ dialect: 'js', source: '!!!' }as its fixture. framework PR #3291 (issue #3278) retires thejsexpression dialect:ExpressionDialectin@objectstack/specnarrows toz.enum(['cel', 'cron', 'template']). Once objectui bumps to that spec,{ dialect: 'js', … }becomes shape-invalid, and the draft validator's spec-Zod pass would emit an issue atfields.status.visibleWhen, breaking the.toEqual([])assertion.Change
Swap the fixture to
{ dialect: 'template', source: '!!!' }— a well-typed, non-CEL dialect that survives the narrowing.Why not
dialect: 'cel'(the obvious "bad source under a valid dialect")? The test proves the CEL lint skips non-CEL envelopes.predicateSourceonly extracts source whendialect === undefined || dialect === 'cel', sodialect: 'cel'would make the lint own the garbage'!!!'and flag it — flipping the assertion. The replacement had to stay a non-CEL dialect;templateis safest ('!!!'is a valid constant template → no spec-Zod content error either).Notes
jspresent); no shipped spec has droppedjsyet.{ dialect: 'template', … }produces the identical test outcome against both the current and the future narrowed spec, so this is a safe pre-emptive hygiene change.dialect: 'js'expression author in objectui.language: 'js'(L2 ScriptBody, a separate enum) is unaffected and untouched.@objectstack/formulaengine.🤖 Generated with Claude Code