Commit 79c71d2
fix(cli):
* test(cli): empty the scaffold ledger first, so each repair is measured red-first
`KNOWN_UNVALIDATED_SCAFFOLDS` is a shrink-only ledger carrying an
anti-staleness assertion: a kind listed in it must still FAIL. Deleting the
four entries BEFORE touching a template is therefore the instrument, not
bookkeeping — it turns the suite red for `object` / `view` / `action` / `app`
and prints each kind's refusal verbatim, which is the baseline the repairs in
the next commit are measured against.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* fix(cli): scaffold object, view, action and app in the shapes os validate accepts (#14336)
Four of the seven `os generate` templates wrote artifacts the platform's own
validator refuses, so an author following the documented path got a file their
own toolchain rejected. Re-measured on this base through the #14087 harness:
objects[0].sharingModel security-owd-unset — declares no sharingModel (OWD)
views[0].list unrecognized key(s) on this list view: `pageSize`
views[0] unrecognized key(s) on this view container: `type`, `objectName`
actions[0].type invalid option: expected "script"|"url"|"modal"|"flow"|"api"|"form"
actions[0] unrecognized key(s) on this action: `handler`
apps[0].navigation expected array, received object
`object` authors `sharingModel: 'private'` — not a new decision, but the one
#9666 already took for the `os init` templates, emitted with the same
explanation so both authoring doors agree.
`view` emits a view CONTAINER rather than a flat list view: the container's
slots are `list` / `form` / `listViews` / `formViews`, `type` belongs to a
single view, and the object binding is `object`. The flat shape mattered past
the refusal — it parses to an EMPTY container, so zero views register and the
Console renders nothing. `pageSize` moves to `pagination`, the schema that
declares it.
`action` emits `type: 'flow'` with `target` naming the flow, which is what its
`handler: { type: 'flow', target }` block was trying to express; `custom` is
not an ActionType and the second handler slot was removed in protocol 17.
`app` emits `navigation` as the array it is declared as, carrying one real
`type: 'object'` entry instead of a `{ type: 'sidebar', items: [] }` wrapper
that is not on the authoring surface.
The `action` and `app` entries target the names `os g flow NAME` and
`os g object NAME` write, so the scaffolds compose instead of each standing
alone.
`KNOWN_UNVALIDATED_SCAFFOLDS` is now empty, so the clean pin covers the whole
roster. The ledger stays shrink-only: a red there is a template to fix, never a
line to add.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
---------
Co-authored-by: Claude <noreply@anthropic.com>os generate scaffolds object, view, action and app in the shapes os validate accepts (#14548)1 parent 01e3866 commit 79c71d2
3 files changed
Lines changed: 160 additions & 42 deletions
File tree
- .changeset
- packages/cli
- src/commands
- test
Lines changed: 50 additions & 0 deletions
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| |||
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
57 | 78 | | |
58 | 79 | | |
59 | 80 | | |
| |||
63 | 84 | | |
64 | 85 | | |
65 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
66 | 105 | | |
67 | 106 | | |
68 | 107 | | |
69 | | - | |
| 108 | + | |
70 | 109 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
76 | 114 | | |
77 | 115 | | |
78 | 116 | | |
79 | 117 | | |
80 | 118 | | |
81 | 119 | | |
82 | | - | |
| 120 | + | |
83 | 121 | | |
84 | 122 | | |
85 | 123 | | |
86 | | - | |
| 124 | + | |
87 | 125 | | |
88 | 126 | | |
89 | 127 | | |
90 | 128 | | |
91 | 129 | | |
92 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
93 | 147 | | |
94 | 148 | | |
95 | 149 | | |
| |||
98 | 152 | | |
99 | 153 | | |
100 | 154 | | |
101 | | - | |
| 155 | + | |
102 | 156 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 157 | + | |
107 | 158 | | |
108 | 159 | | |
109 | 160 | | |
| |||
198 | 249 | | |
199 | 250 | | |
200 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
201 | 265 | | |
202 | 266 | | |
203 | 267 | | |
| |||
206 | 270 | | |
207 | 271 | | |
208 | 272 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
213 | 281 | | |
214 | 282 | | |
215 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
101 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
0 commit comments