Skip to content

Remove isRegex and close the step object at format 0.9 - #36

Merged
rjnienaber merged 1 commit into
mainfrom
feat/drop-isregex
Sep 7, 2026
Merged

rjnienaber merged 1 commit into
mainfrom
feat/drop-isregex

Conversation

@rjnienaber

Copy link
Copy Markdown
Owner

Redactions have superseded isRegex since 0.4. Keeping both left two ways to match by pattern, a rule forbidding their combination, and a step type that could be either.

Nothing has been written against isRegex, so it goes now rather than waiting for 1.0.

What changed

  • isRegex removed from the schema, the Go type, and the validator; Step.UsesPattern() and validateRegexes are gone with it. Redactions are the only way a step matches by pattern.
  • The step object gains "additionalProperties": false. Without it, a script still carrying isRegex would have been accepted and quietly matched literally — reporting success for a comparison it did not make. It is now rejected by name:
    Script validation errors:
    runs.0.steps.0: Additional property isRegex is not allowed
    
  • Format bumped to 0.9. version.go and docs/script-format.md now state the 0.x rule explicitly: while MAJOR is 0 a minor may take a field away as well as add one, and the additive promise starts at 1.0.

Verification

make format, make lint, PRESCRIPT_REQUIRE_RUNNERS=1 make test, make build_dev and make examples all pass; the dice histogram is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_019f9gkZVUEo3jtv51GSb4vJ

Redactions have superseded isRegex since 0.4: a {{name}} placeholder says
which part of a line varies and why, where a whole-line regular expression
made the line stop reading as the output it stands for. Keeping both meant
two ways to match by pattern, a rule forbidding their combination, and a
step type that could be either.

Nothing has been written against isRegex, so it goes now rather than
waiting for 1.0. While MAJOR is 0 a minor may take something away as well
as add it, which is what 0.x means everywhere else; version.go and the
format doc now say so, and the promise starts at 1.0.

The step object gains additionalProperties: false, without which a script
still carrying isRegex would have been accepted and quietly matched
literally -- reporting success for a comparison it did not make, which is
the one failure this tool must not commit itself. It is now rejected by
name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019f9gkZVUEo3jtv51GSb4vJ
@rjnienaber
rjnienaber merged commit 929032d into main Sep 7, 2026
5 checks passed
@rjnienaber
rjnienaber deleted the feat/drop-isregex branch September 7, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant