Skip to content

Phase 36: make Joni the ordinary regex default - #1080

Merged
fglock merged 16 commits into
masterfrom
integration/phase36-native-syntax-v9
Aug 19, 2026
Merged

Phase 36: make Joni the ordinary regex default#1080
fglock merged 16 commits into
masterfrom
integration/phase36-native-syntax-v9

Conversation

@fglock

@fglock fglock commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • make Joni the default and automatic matcher for ordinary regexes while retaining explicit Java selection as a temporary differential tool
  • preserve byte/Unicode pattern provenance through templates and select generated /d case-fold variants only where Perl byte semantics require them
  • align literal, property, backreference, and reverse case-fold behavior with generated Perl data without constructing byte variants for /u, /a, /aa, or Unicode-promoting source
  • freeze dynamic-pattern edge behavior and retire the redundant imported pat.t manifest row
  • restore Perl diagnostics for dotted U+ named sequences, escaped group options, oversized quantifiers, and unmatched ordinary group openers

Validation

  • make: all 17 tasks green at semantic head 66f224b28 (/tmp/make-phase36-v9-effective-byte-provenance.log)
  • prospective PR-head make: all 17 tasks green at 1938c1672 in 2m52s (/tmp/make-phase36-v9-pr-head.log)
  • named-character cache and adjacent provenance fixtures: JVM/interpreter green
  • 30-case ordinary routing matrix: Java/Joni × JVM/interpreter green
  • dynamic edge contract: system Perl 16/16 and PerlOnJava JVM/interpreter green
  • unchanged reg_mesg.t: 1754 to 1794/2613 on JVM and interpreter, 40 failures removed and zero introduced by the final diagnostic tranche
  • import sync: two consecutive private runs are byte-identical and imported pat.t is byte-identical to upstream
  • worker commits transplanted with exact 1:1 range-diff

Compatibility

Explicit Java routing remains available only for differential validation. The
Phase 36 plan still requires removal of Java matching, the selector, and
matcher-semantic preprocessing after the remaining exact-artifact corpus and
release gates pass.

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

fglock and others added 16 commits August 19, 2026 17:51
Carry byte/Unicode backing through composed regex templates, recompilation,
cloning, and nested callback templates so /d can select the correct Joni input
variant without inferring encoding from decoded Java strings.

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

Co-Authored-By: Codex <noreply@openai.com>
Mark byte-backed Joni patterns explicitly, suppress Unicode multi-character
case-fold expansion for them, and retain pinned Latin-1 simple-fold siblings.
Add direct and Perl-facing regression coverage for literal and backreference
sharp-s behavior.

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

Co-Authored-By: Codex <noreply@openai.com>
Resolve dotted U+ named-character sequences only in regex source while
retaining Perl's scalar-string error. Report an unmatched character class
before the valid sequence and attach the exact compile-site source location.

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

Co-Authored-By: Codex <codex@openai.com>
Add a system-Perl-validated matrix for ordinary constant patterns across
captures, classes, assertions, modifiers, reuse, substitution, and match state.
This freezes explicit Java and Joni behavior before changing the default route.

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

Co-Authored-By: Codex <codex@openai.com>
Route default and auto regex compilation through Joni while retaining explicit
Java as a temporary differential baseline. Update the cache mode identity and
the obsolete policy expectations to match the permanent production route.

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

Co-Authored-By: Codex <codex@openai.com>
Preserve ASCII byte-pattern provenance for reverse folds, restrict byte /d
folding to ASCII, and retain direct Unicode property membership under /aa
property closure. Add a compact system-Perl-derived matrix across modes and
backreference forms.

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

Co-Authored-By: Codex <noreply@openai.com>
Avoid changing callback global-match state for byte-backed patterns that have
no case-folding semantics, while retaining byte /d selection for /i patterns.

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

Co-Authored-By: Codex <noreply@openai.com>
Add a system-Perl-derived contract for undefined, empty, quantified, modifier,
position, callback-result, exception, and invalid-source dynamic patterns.
Render an invalid returned character class with Perl's marked diagnostic.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
Keep a stable sequence head while expanding multi-character ASCII byte-pattern
folds. ListNode.listAdd returns the appended tail, so assigning it back to the
root discarded every preceding literal segment. Add direct exact, folded, and
negative anchored coverage.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
The bulk perl5/t import already restores re/pat.t byte-for-byte now that the
historical workaround patch is retired. Remove the duplicate file row after
verifying two-pass sync idempotence and the unpatched upstream Joni gates.

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

Co-Authored-By: Codex <codex@openai.com>
Align byte-pattern variant construction with selection. Unicode, ASCII, and
ASCII-strict modes never select the ISO byte variant, so compiling it eagerly
caused property and class fold failures before the intended matcher was used.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
Do not build the default ISO byte matcher for named characters, wide numeric
escapes, or literal wide code points. These constructs promote otherwise ASCII
source to Unicode semantics and byte-variant compilation duplicated lexical
translator calls or admitted excluded Turkic folds.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
Derive effective byte provenance before constructing the regex cache key and
storing the compiled pattern. Named characters, wide numeric escapes, and wide
literal source now share one Unicode-backed cache entry between literal
validation and runtime compilation, preserving one lexical charname expansion.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
Translate Joni's generic undefined-group-option error only when its marker
follows a literal escaped group token, preserving Perl's exact diagnostic and
source marker across ordinary and forced-Joni execution.

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

Co-Authored-By: Codex <codex@openai.com>
Translate Joni's oversized repeat-range diagnostic to Perl's stable
quantifier error family while preserving the engine-provided source marker.
Add a compact system-Perl-validated parity matrix for exact, open-ended,
and bounded oversized quantifiers.

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

Co-Authored-By: Codex <codex@openai.com>
Translate Joni's generic end-of-pattern parenthesis error for ordinary
groups and place Perl's diagnostic marker at the unmatched opener. Keep
specialized (?...) constructs on their dedicated diagnostic paths.

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

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit f58e401 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