Commit 23619f5
fix(cli): make
* fix(cli): make `os explain flow` teach a flow that actually parses
The catalog entry is hand-maintained and does not derive from FlowSchema,
so its sample drifted into teaching a shape the spec rejects outright:
- `steps` and `trigger` are strictObject ALIASES on FlowSchema (for
`nodes` and `type`). Authoring either is a loud parse error, and a
record-change flow binds its object on the START node's `config`,
not at the flow top level.
- A node's per-type data lives under `config`, so the sample's
top-level `field`/`value` pair were undeclared keys on a `.strict()`
node schema, and the required `id`/`label` were missing.
- `edges` is required; the sample had no graph at all.
- The assignment value `'$currentUser'` is a `$`-prefixed sentinel no
resolver in this repo recognises. The flow value dialect is
brace-based and the acting user is `{$User.Id}`.
Also: an `assignment` node sets a flow VARIABLE, not a record field, so
"assign on create" is an `update_record` node. The sample now shows the
real shape end to end and is pinned by a test that parses it against
FlowSchema, which is the only guard that cannot itself drift.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* chore(changeset): patch @objectstack/cli for the os explain flow sample fix
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* test(cli): keep the new explain pins free of implicit any
`packages/cli/test/commands.test.ts` sits outside every tsc program in the
repo (the TEST_DEBT ledger records the package), so nothing would have
reported an implicit `any` in the pins added for #14782 — and an implicit
`any` there silently stops the assertion from checking anything.
Measured with an ad-hoc strict pass over the file: origin/main carries 15
errors (13 TS2835 from its extensionless relative imports, 2 TS7006 in the
pre-existing ownership test). The first draft of the pins took that to 18.
With a local `CatalogField` shape and a typed `Object.entries` cast it is
back to exactly the baseline 15 — no new error, and no widening of what
the pins actually assert.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
---------
Co-authored-by: Claude <noreply@anthropic.com>os explain flow teach a flow that actually parses (#14809)1 parent b91c351 commit 23619f5
3 files changed
Lines changed: 107 additions & 9 deletions
File tree
- .changeset
- packages/cli
- src/commands
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | | - | |
117 | 119 | | |
118 | | - | |
119 | | - | |
| 120 | + | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | | - | |
| 126 | + | |
125 | 127 | | |
126 | | - | |
127 | | - | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
129 | 147 | | |
130 | 148 | | |
131 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 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 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
97 | 163 | | |
0 commit comments