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
Four review findings:
1. validate.go::step (wrong-level branch) used to call a
`claimRun` helper that bypassed the run accounting, so a
repeated matcher could be silently satisfied by a single
wrong-level occurrence. Route wrong-level matches through
`claimMatch` so consumed / digitsSeen update normally and
`repeat.min` + `sequential` still fire. Drop the obsolete
`claimRun` helper. Test:
TestPlan156_WrongLevelMatchCountsTowardRepeat.
2. validate.go::claimLateScope + claimOutOfOrder emit an
explicit "matched 1 times, required at least N (out-of-order
recovery only counts the first occurrence)" diagnostic when
the late-claimed scope has `repeat.min > 1`. The in-order
matchScope path remains the canonical cardinality surface;
this keeps the contract enforced on the recovery path
without re-implementing the full run-matcher there. Test:
TestPlan156_LateClaimFlagsRepeatMin.
3. test_helpers_test.go: literalScope's doc-comment used to
point at a nonexistent `matcherScope` helper. Rewrite to
describe the intended call-site convention (tests with regex
metacharacters construct the `Scope{Matcher: ...}` literal
directly).
4. docs/guides/schemas.md: the schemas guide still described
`regex:` as a CUE raw-interpolation string even though the
reference page was corrected. Align the guide with the
helper-only resolver.
https://claude.ai/code/session_012GGH62fZUzLuzP8T4ocGkJ
0 commit comments