Skip to content

fix: restore post-Joni core behavior - #971

Merged
fglock merged 1 commit into
masterfrom
fix/post-joni-core-regressions
Aug 16, 2026
Merged

fix: restore post-Joni core behavior#971
fglock merged 1 commit into
masterfrom
fix/post-joni-core-regressions

Conversation

@fglock

@fglock fglock commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • restore Perl list snapshot semantics when map, grep, all, or any mutates its source
  • return undef/EBADF for -t on descriptorless scalar handles
  • fetch tied regex interpolation once per interpolation
  • unwind dynamic locals, provisional captures, and $^R when a Joni callback throws
  • update the Phase 36 plan with the remaining callback-transaction and scope blockers

The new Joni commits already recover op/index.t and op/index_thr.t. This PR recovers the other reported regressions without changing existing tests.

Regression results

Test Regressed This branch
op/array.t 0/0 timeout 182/199
op/stat_errors.t 634/638 638/638
op/tie_fetch_count.t 213/343 215/343
op/index.t 414/415 415/415
op/index_thr.t 414/415 415/415

Validation

  • make — passed
  • new unit tests under system Perl — 6/6
  • new unit tests on JVM and interpreter backends — passed
  • focused callback/dynamic-pattern tests on JVM and interpreter — passed
  • make test-threads-regex — JVM 48/48 and interpreter 48/48; zero failures, errors, timeouts, or incomplete files

Remaining Phase 36 work

rxcode.t is currently 39/42 and reg_eval_scope.t is 22/49. The next implementation slice is matcher-owned mutation checkpoints for writes on abandoned backtracking paths, followed by callback pragma/caller/control-flow isolation. These are recorded in dev/design/phase36-regex-parity.md.

Snapshot list-operator inputs before callback execution, preserve EBADF for
descriptorless handles, and fetch tied regex interpolation exactly once.

Restore regex callback scope when a Joni callout throws and document the next
Phase 36 parity blockers. Add focused standard-Perl-valid regressions for each
recovered behavior.

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

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit 5a2afed into master Aug 16, 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