@@ -97,7 +97,7 @@ creating a parallel schema source of truth.
9797
9898## Escape hatches
9999
100- The walker in ` @/util/effect-zod ` exposes three explicit escape hatches for
100+ The walker in ` @/util/effect-zod ` exposes two explicit escape hatches for
101101cases the pure-Schema path cannot express. Each one stays in the codebase
102102only as long as its upstream or local dependency requires it — inline
103103comments document when each can be deleted.
@@ -109,19 +109,7 @@ Replaces the entire derivation with a hand-crafted zod schema. Used when:
109109- the target carries external ` $ref ` metadata (e.g.
110110 ` config/model-id.ts ` points at ` https://models.dev/... ` )
111111- the target is a zod-only schema that cannot yet be expressed as Schema
112- (e.g. ` ConfigAgent.Info ` , ` ConfigPermission.Info ` , ` Log.Level ` )
113-
114- ### ` ZodPreprocess ` annotation
115-
116- Wraps the derived zod schema with ` z.preprocess(fn, inner) ` . Used by
117- ` config/permission.ts ` to inject ` __originalKeys ` before parsing, because
118- ` Schema.StructWithRest ` canonicalises output (known fields first, catchall
119- after) and destroys the user's original property order — which permission
120- rule precedence depends on.
121-
122- Tracked upstream as ` effect:core/wlh553 ` : "Schema: add preserveInputOrder
123- (or pre-parse hook) for open structs." Once that lands, ` ZodPreprocess ` and
124- the ` __originalKeys ` hack can both be deleted.
112+ (e.g. ` ConfigAgent.Info ` , ` Log.Level ` )
125113
126114### Local ` DeepMutable<T> ` in ` config/config.ts `
127115
0 commit comments