Skip to content

fix(regex): advance native Joni diagnostics and strict policy - #1082

Merged
fglock merged 10 commits into
masterfrom
fix/phase36-regexp-boundary-p2
Aug 19, 2026
Merged

fix(regex): advance native Joni diagnostics and strict policy#1082
fglock merged 10 commits into
masterfrom
fix/phase36-regexp-boundary-p2

Conversation

@fglock

@fglock fglock commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • align native Joni boundary, closing-bracket, range, POSIX-class, empty-class,
    and leading-quantifier behavior with Perl
  • preserve lexical use re 'strict' through literal, runtime, cached, cloned,
    and deferred regex compilation
  • enforce Perl left-brace and non-hex warning/fatal policy without regressing
    legal wide escapes or omitted-lower-bound quantifiers
  • preserve upstream Joni behavior for non-Perl syntaxes and all original
    copyright/authorship notices

Semantic results

  • unchanged re/regexp.t: +35 passing assertions across the native Joni
    families in this batch, with zero introduced assertion failures
  • unchanged re/reg_mesg.t: 43 normalized failures removed on both JVM and
    interpreter, zero introduced; corrected plans execute 28 additional passing
    follow-up assertions
  • new Perl fixtures were validated with system Perl before PerlOnJava
  • focused default/forced-Joni JVM and interpreter gates pass

Validation

  • full make at c0db1f56d: passed all 17 tasks in 3m48s
    (/tmp/make-phase36-post1081-c0db1f56d.log)
  • full make at exact PR head 4da58459c:
    /tmp/make-phase36-post1081-4da58459c.log
  • focused logs:
    /tmp/make-phase36-boundary-empty-whitespace.log,
    /tmp/make-phase36-close-bracket-policy.log,
    /tmp/make-phase36-range-diagnostic-3.log,
    /tmp/make-phase36-posix-diagnostic.log,
    /tmp/make-phase36-empty-class-diagnostic-3.log,
    /tmp/make-phase36-wide-strict-regression.log,
    /tmp/make-phase36-quantifier-omitted.log, and
    /tmp/make-phase36-quantifier-nothing.log

Relates to dev/design/phase36-regex-parity.md.

fglock and others added 10 commits August 19, 2026 19:29
Treat empty input as having no grapheme, sentence, word, or line boundary, so
the positive assertions fail and their negations match. Accept Perl's
surrounding whitespace in boundary names without weakening unknown-name
diagnostics.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Suppress Ruby-style unescaped closing-bracket warnings under PerlNG syntax
while retaining Joni's existing parsing semantics. Add a system-Perl-validated
fixture covering literal, class, negated-class, and backreference contexts.

This closes nine unchanged regexp.t rows with no introduced failures.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Give PerlNG and PerlOnJava syntax descending character ranges Perl's
diagnostic while preserving upstream Joni behavior for other syntaxes. Align
the temporary Java differential route and add system-Perl and direct-Joni
coverage for byte and wide ranges.

This closes two unchanged regexp.t rows with no introduced failures.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Retain unknown POSIX class spelling in PerlNG diagnostics, including negated
class names, while preserving upstream Joni messages for other syntaxes. Add
system-Perl and direct-Joni coverage.

This closes four unchanged regexp.t rows with no introduced failures.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Carry lexical use re 'strict' context through literal validation, runtime
compilation, regex caching, cloning, and deferred recompilation. Apply that
context to Perl's unescaped-left-brace warning-versus-fatal policy while
preserving always-fatal and explicitly allowed brace contexts.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Make malformed non-hex escapes fatal under lexical use re 'strict', retain
exactly one default warning for qr construction and match use, and preserve
the source spelling of resolved braced hex digits. Exclude extended-class
grammar from this source-policy correction.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Exclude uppercase \\B{...} boundary constructs from literal-left-brace
classification so their dedicated empty, missing-brace, unknown-boundary,
and /a warning diagnostics remain authoritative.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Give PerlNG empty classes Perl's unmatched-opening-bracket diagnostic and
source position. Route this Perl spelling to Joni even in temporary explicit
Java differential mode, and add system-Perl and direct-Joni coverage.

This closes two unchanged regexp.t rows with no introduced failures.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Keep underscore-separated braced hexadecimal escapes and omitted-lower-bound
quantifiers out of lexical re-strict warning detection. Match Joni's accepted
interval whitespace and add a system-Perl-validated quantifier fixture.

This restores the full-build wide-scalar gate and prevents seven unchanged
regexp.t regressions introduced by the lexical-policy tranche.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Use Perl's leading-quantifier diagnostic under PerlNG syntax while preserving
upstream Joni wording for other syntaxes. Add system-Perl and direct-Joni
coverage for top-level, alternation, and case-insensitive forms.

This closes four unchanged regexp.t rows with no introduced failures.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock
fglock merged commit ac3770c into master Aug 19, 2026
2 checks passed
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