Summary
Two validations duplicate their canonical Zod definitions:
- Placeholder pattern — the
${contracts.<name>.contractId} regex is defined in both contracts/placeholder-engine.ts:10 and config/validate-contract-graph.ts:5.
- Expect matchers —
EXPECT_MATCHERS (contracts/verify-expect.ts:17-27, a Set) duplicates ExpectMatcherSchema (config/config.schema.ts:32-42, a z.enum).
Why it matters
The allowed placeholder grammar and matcher list can drift between validation-time and resolve-time, and adding a matcher requires editing two files.
Suggested fix
Export the placeholder pattern from placeholder-engine.ts and import it in validate-contract-graph.ts; derive EXPECT_MATCHERS from ExpectMatcherSchema.options (or drop the set).
Priority: Low | Release impact: Patch | Breaking: No
Summary
Two validations duplicate their canonical Zod definitions:
${contracts.<name>.contractId}regex is defined in bothcontracts/placeholder-engine.ts:10andconfig/validate-contract-graph.ts:5.EXPECT_MATCHERS(contracts/verify-expect.ts:17-27, aSet) duplicatesExpectMatcherSchema(config/config.schema.ts:32-42, az.enum).Why it matters
The allowed placeholder grammar and matcher list can drift between validation-time and resolve-time, and adding a matcher requires editing two files.
Suggested fix
Export the placeholder pattern from
placeholder-engine.tsand import it invalidate-contract-graph.ts; deriveEXPECT_MATCHERSfromExpectMatcherSchema.options(or drop the set).Priority: Low | Release impact: Patch | Breaking: No