This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit dacb402
feat(types): derive and export the strict authoring twin of the node face (#8642)
* feat(types): derive and export the strict authoring twin of the node face
Publish `StrictAnyComponentSchema`, `StrictSchemaNodeSchema` and
`deriveStrictAuthoringSchema` from `@object-ui/types/zod` — a derived twin of
the node face that closes every declared object at every depth.
Additive: the rendering face keeps its `.passthrough()`, no accept set moves,
and no consumer is wired to the new face.
The twins are derived, never hand-written. Objects are cloned by patching a
copy of their own def so `.refine()` / `.superRefine()` checks survive; a twin
rebuilt with `z.object(shape)` would drop them and under-report red. Both sides
of a pipe are walked, so a `z.preprocess`'s real schema is closed too.
Part of #8345
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
* docs(types): import ButtonSchema in the strict-face README example
The snippet used `ButtonSchema` without importing it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
* fix(types): close the strict twin over callable zod nodes, and pin the population
The walker's type guard was `typeof value === 'object'`. Zod 4.4.3 builds some
objects through `$ZodObjectJIT`, whose instances are CALLABLE — 20 of them are
reachable on this face, all through `@objectstack/spec`-derived subtrees. The
guard handed each one back untouched, so the subtree beneath went unwalked and
6 objects stayed open on the twin: an invented key inside one of them was
accepted and silently dropped, while the same key at the root was refused and
named.
Nothing could catch that. No document in the 556-document corpus carries an
undeclared key inside those 6 objects, and the pin file's own census began
`typeof node !== 'object'` — it shared the blind spot with what it measured.
Both guards now admit callable nodes, and the pin that was missing is here: a
POPULATION pin requiring every object reachable on the twin to carry
`catchall: never`, with the function-typed count asserted non-zero so the
control cannot silently regress. REPRO-A is pinned as a document too, and the
cycle's real invariant — the barrel is the sole entry — is pinned in both of
its halves.
Part of #8345
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
* docs(types): re-derive the pipe census the blind guard had understated
The `pipe` arm's comment said "one pipe reachable, `in` an array and `out` the
transform". That reading was taken through the object-only guard. With callable
nodes admitted, four pipes are reachable — including a preprocessor under
`page.interfaceConfig.filterBy[]` that the old walker could not see at all.
No code changes; the comment now states what the tree measures.
Part of #8345
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2609812 commit dacb402
5 files changed
Lines changed: 980 additions & 0 deletions
File tree
- .changeset
- packages/types
- src
- __tests__
- zod
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
124 | 160 | | |
125 | 161 | | |
126 | 162 | | |
| |||
0 commit comments