This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 33da643
feat(cli): objectui check refuses a ${…} on a text key its node never evaluates (objectui#4795) (#11126)
Fixes #4795
Clause-②: yes — `objectui check` newly refuses `${…}` in the four closed
keys where `expressionBindableTextKeysFor(type)` excludes the key, as
ruled (`5406135987`, `5479466110`). The PR waits as a draft for the
director seat's contract review.
Ruling item 2 of #4795 (maintainer, 2026-08-31, comment `5479466110`),
built in `objectui check` as ruled. Draft for the director seat's
contract review.
## The repository's own `pnpm check`: red in round 1, resolved by the
seat's answer A
`.github/workflows/lint.yml` runs `pnpm check` on this repository (step
"Verify the CLI's own check command passes on this repository").
Measured with the CLI built from each tree:
| tree | `pnpm check` exit | refusals | warnings |
|:--|:--|:--|:--|
| `main` `d1e683fa1` (no gate) | 0 | 0 | 0 |
| round 1, `ed32e7c6b` | 1 | 1 | 0 |
| this branch, `c985c4d7d` | 0 | 0 | 0 |
**The round-1 refusal.** It was
`examples/schema-catalog/src/schemas/plugin-editor/javascript-editor.json`:
a root `code-editor` whose `value` was a JavaScript sample using
template literals. That is literal content, not a misplaced expression,
and it had no mechanical channel move.
**The fix.** The seat chose A under ruling `5479466110`: 「no-row types
included」, and 「A row can always be added later with a named need + its
own measurement」. The sample now builds the same strings by
concatenation. Run, it still logs `Hello, Developer!` and returns
`Welcome, Developer`.
**Nothing pinned the old content.** No test, snapshot or docs fence
reproduces it:
- the catalog registers the file by import;
- `safe-validate-corpus-6318.test.ts` asserts only that it validates;
- `catalog-gallery-render.test.tsx` skips it, because Monaco cannot load
under happy-dom;
- `plugin-editor.mdx` embeds it by id through `SchemaExample`.
The run's closing tally is the same as on `main`: `265 validated, 167
recognised but not validated, 1 did not validate`.
## What it does
`findUnbindableTextExpressions` (new,
`packages/cli/src/utils/unbindable-text-expressions.ts`), called by
`check` on every recognised file, from either recognition arm:
- **The rule.** Each of the four keys `EXPRESSION_BINDABLE_TEXT_KEYS` on
a component node is judged against
`expressionBindableTextKeysFor(type)`. Both are imported from
`@objectstack/spec/ui`: the vocabulary and the carriage map are
consumed, not copied.
- **Component nodes (sub-rule i).** The document root, plus every node
`children` holds (an array or a single node), recursively. A root of
type `page` is not judged itself, because its `title` is a page key; its
`children` still are.
- **Expression.** The evaluator's own interpolation pattern, as
`ExpressionEvaluator.evaluate` matches it. A lone `${` or an empty `${}`
is not an expression there, so it is not one here.
- **Refusal vs warning (sub-rule ii).** A registered type (the
`isKnownSchemaType` universe) is refused: a red `x Unevaluated
expression in FILE at PATH: …` line plus a channel line, and it counts
toward the run's `Found N errors`, so the exit code is 1. A type no
registered component answers to gets a yellow `1 parent 957f695 commit 33da643
8 files changed
Lines changed: 654 additions & 8 deletions
File tree
- .changeset
- content/docs/utilities
- examples/schema-catalog/src/schemas/plugin-editor
- packages/cli
- src
- __tests__
- commands
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
231 | 248 | | |
232 | | - | |
233 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
234 | 262 | | |
235 | 263 | | |
236 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
0 commit comments