Commit 93a61be
The `sapConnector` example taught four spellings `integration/connector.zod.ts`
turns down. Measured with the compiler API before the fix, verbatim:
TS2353 'sourceField' does not exist in '{ source: string; target: string; ... }'
TS2322 '"custom"' is not assignable to
'"map" | "lookup" | "constant" | "cast" | "javascript"'
TS2353 'retryPolicy' does not exist in the webhook shape
TS2322 'string' is not assignable to '{ dialect: "cel"|"cron"|"template"; ... }'
Fixed in the document:
- fieldMappings[].sourceField/targetField -> source/target, the canonical
spelling of the base protocol in shared/mapping.zod.ts.
- transform { type: 'custom', function } -> { type: 'javascript', expression },
the nearest real member of the five-way discriminated union. The bare
string is ExpressionInput shorthand and parses to { dialect, source }.
- webhooks[].retryPolicy removed. WebhookSchema is a strictObject and
already carries a curated tombstone for it (#3494): delivery retries are
owned by the messaging outbox on a fixed schedule. There is no equivalent
key, so the block becomes a comment saying why -- and saying that the
sibling `retryConfig` is a different thing (the connector's own calls).
- the annotation is now ConnectorInput (z.input), which is what an author
writes. The bare `Connector` is z.infer on this file, so it is the shape a
parse RETURNS. Flipping this file's 20 aliases to the #4963 X / XParsed
house convention is a real but separate appetite -- filed as #5551 -- and
is deliberately NOT done here.
New gate: packages/spec/src/integration/connector-author-shape.test.ts, a
sibling of automation/etl-author-shape.test.ts (#4963 / PR #5514) owned by the
schema that owns the example. It compiles the L3 block verbatim, import line
included, with a harness self-test against vacuity; classifies the document's
three `Connector` blocks (two Migration-Guide sketches elide with a bare `...`
and are not TypeScript); restores each of the four defects as a probe that must
go red with a named diagnostic; and pins what the schema SAYS at runtime for
each -- a curated tombstone for `retryPolicy`, a silent strip plus missing
`source`/`target` for `sourceField` (the curated alias for that word lives on
./data's ImportFieldMappingSchema, not this one), a value verdict naming the
five members for 'custom'.
The document's total ```typescript block count is unchanged at 6; the sibling
gate's pin holds.
Fixes #5515
Claude-Session: https://claude.ai/code/session_018fxLGQdatPbBUvCgiVxg6D
Co-authored-by: Claude <noreply@anthropic.com>
1 parent cbb6a5c commit 93a61be
3 files changed
Lines changed: 448 additions & 26 deletions
File tree
- packages/spec
- docs
- src
- automation
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
213 | 232 | | |
214 | | - | |
| 233 | + | |
215 | 234 | | |
216 | | - | |
| 235 | + | |
217 | 236 | | |
218 | 237 | | |
219 | 238 | | |
| |||
241 | 260 | | |
242 | 261 | | |
243 | 262 | | |
244 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
245 | 266 | | |
246 | 267 | | |
247 | | - | |
248 | | - | |
| 268 | + | |
| 269 | + | |
249 | 270 | | |
250 | 271 | | |
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
254 | | - | |
255 | | - | |
| 275 | + | |
| 276 | + | |
256 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
257 | 282 | | |
258 | | - | |
259 | | - | |
| 283 | + | |
| 284 | + | |
260 | 285 | | |
261 | 286 | | |
262 | 287 | | |
| |||
270 | 295 | | |
271 | 296 | | |
272 | 297 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
278 | 303 | | |
279 | 304 | | |
280 | 305 | | |
| |||
283 | 308 | | |
284 | 309 | | |
285 | 310 | | |
286 | | - | |
| 311 | + | |
287 | 312 | | |
288 | 313 | | |
289 | 314 | | |
| |||
378 | 403 | | |
379 | 404 | | |
380 | 405 | | |
381 | | - | |
| 406 | + | |
382 | 407 | | |
383 | 408 | | |
384 | 409 | | |
| |||
423 | 448 | | |
424 | 449 | | |
425 | 450 | | |
426 | | - | |
| 451 | + | |
427 | 452 | | |
428 | 453 | | |
429 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
0 commit comments