Skip to content

CI: fix simplifier use-chain overlay re.sub backslash escape (#36250) - #36264

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36250-simplifier-resub-escape
Sep 1, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-36250-simplifier-resub-escape

Conversation

@PurHur

@PurHur PurHur commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes script/apply-patches.sh regression from Foundation: fix Simplifier use-chain guard for July-5 partial trees (#36250) #36257: the simplifier use-chain overlay called re.sub(new_replace_variables, …) where the replacement string contains Op\Phi; Python's re.sub treats \P as an invalid escape and aborts with re.error: bad escape \P.
  • Use a lambda replacement so backslashes in the PHP source are not interpreted as regex escapes.

Closes #36250 (regression re-open via lane overflow on #36142).

Test plan

./script/apply-patches.sh                    # exit 0 (was re.error bad escape \P)
./script/phpunit.sh --filter ApplyPatchesTest  # 39/39 OK (1 skipped)
make dev-verify-fast                         # OK (105s) — aot-smoke 9/9, VM differential 15/15

Made with Cursor

The #36257 overlay used re.sub with a replacement string containing Op\Phi;
Python treats \P as an invalid escape. Use a lambda replacement instead.

Verified: ./script/apply-patches.sh OK, make dev-verify-fast OK (105s).
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 4f54686 into master Sep 1, 2026
@PurHur
PurHur deleted the agent/issue-36250-simplifier-resub-escape branch September 1, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant