You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec)!: reject unknown keys on the approval authoring schemas (#4001 step 3)
Third click of the unknown-key strictness ratchet (flow + permission in
#4071, RLS / sharing / position in #4099). Approval is a v17-new authoring
surface — tightened while young, before stored volume exists:
- ApprovalNodeConfigSchema, ApprovalNodeApproverSchema,
ApprovalEscalationSchema and DecisionOutputDefSchema are .strict() with
fixable errors via the shared strictUnknownKeyError factory.
- ApprovalNodeConfig's guidance is the ADR-0019 re-home map: steps ->
successive approval nodes on the canvas, entryCriteria -> the entering
edge's condition, onApprove/onReject -> the approve/reject out-edges,
rejectionBehavior -> a declared back-edge (ADR-0044) with maxRevisions.
- The published JSON schema (getApprovalNodeConfigJsonSchema) now carries
additionalProperties:false into the Studio property form AND registerFlow's
per-node config validation (#4027/#4040) — deliberate: an approval gate
that quietly ignores half its config is the worst ADR-0078 instance.
Verified the #3746 hazard: z.toJSONSchema on the strict lazySchema does
not throw and emits additionalProperties:false at both nesting levels
(asserted in approval.test.ts).
Verified: spec 6995 tests + tsc clean; all 12 check gates;
plugin-approvals 326 / service-automation 457; dogfood 72 files / 418
tests; showcase / crm / todo validate clean.
Refs #4001
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147tNF4Snk7Ry1KGt4a5PY4
|`approval.zod.ts`| 4 | authorable |**next candidate** — v17 approval nodes are new authoring surface|
169
+
|`approval.zod.ts`| 4 | authorable |**strict as of #4001 step 3** — all four authoring schemas (node config / approver / escalation / decision-output). The published JSON schema carries `additionalProperties: false` into the Studio form AND `registerFlow()` config validation (#4027/#4040), so an unknown key in an approval node's `config` is rejected at registration too — verified: `z.toJSONSchema` on the strict lazySchema does not throw (#3746 hazard checked)|
0 commit comments