Problem
Normalization builtin handlers still use non-null assertions for step.pattern, so handler preconditions live implicitly in TypeScript rather than in the YAML pipeline validator.
Evidence
src/g2p/text-normalize.ts has seven new RegExp(step.pattern!, step.flags) calls in builtin handlers.
validateNormalizationPipelineConfig() currently checks known builtin handler names, but does not require the pattern field for handlers that need one.
- The YAML pipeline depends on those patterns for
dateToWords, isoDateToWords, timeToWords, currencyToWords, decimalToWords, ordinalToWordsInline, and numberToWordsInline.
Acceptance criteria
- Remove
step.pattern! from src/g2p/text-normalize.ts.
- Validate handler-specific requirements at pipeline load time: pattern-required handlers must define a string pattern, and patternless handlers must not silently rely on undefined state.
- Add focused tests for at least one missing-pattern builtin and one valid patternless builtin (
lowercase or punctuationCleanup).
- Errors use
E_NORMALIZE_CONFIG.
npm.cmd run typecheck:core passes.
Problem
Normalization builtin handlers still use non-null assertions for
step.pattern, so handler preconditions live implicitly in TypeScript rather than in the YAML pipeline validator.Evidence
src/g2p/text-normalize.tshas sevennew RegExp(step.pattern!, step.flags)calls in builtin handlers.validateNormalizationPipelineConfig()currently checks known builtin handler names, but does not require the pattern field for handlers that need one.dateToWords,isoDateToWords,timeToWords,currencyToWords,decimalToWords,ordinalToWordsInline, andnumberToWordsInline.Acceptance criteria
step.pattern!fromsrc/g2p/text-normalize.ts.lowercaseorpunctuationCleanup).E_NORMALIZE_CONFIG.npm.cmd run typecheck:corepasses.