Skip to content

core: placeholder regex and EXPECT_MATCHERS duplicate their Zod definitions #158

Description

@Dione-b

Summary

Two validations duplicate their canonical Zod definitions:

  1. Placeholder pattern — the ${contracts.<name>.contractId} regex is defined in both contracts/placeholder-engine.ts:10 and config/validate-contract-graph.ts:5.
  2. Expect matchersEXPECT_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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programarea: validationRegex validation, input validationenhancementNew feature or requestpriority: lowLow priority fix - tech debt or minor consistency

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions