[PR #7045] [MERGED] fix(verifiers): expect the session-continuation regex overflow reason #7602

Closed
opened 2026-11-03 13:39:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7045
Author: @RishTheFish21
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @morluto

Base: main ← Head: fix/ghidra-regex-verifier-reason


📝 Commits (1)

  • 22d064f fix(verifiers): expect the session-continuation regex overflow reason

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 scripts/lib/real-ghidra-boundaries.mjs (+3 -1)

📄 Description

Summary

#5662 changed the reason REA gives for a Ghidra regex stack overflow. The "use literal mode or simplify the regex" advice moved to remediation.action. The reason now ends with the session-continuation sentence, The active analysis session and annotations remain available. The real-Ghidra boundary check in scripts/lib/real-ghidra-boundaries.mjs still requires the old reason text (/exhausted its stack.*Use literal mode/). So every real-Ghidra lane that reaches verifyGhidraBoundaries fails on main, even though the product behaves as intended. This updates that one assertion.

No issue is linked. I found this while validating #2977, and the regression came from my own #5662.

Problem and expected behavior

Trigger: npm run verify:ghidra:aarch64-jump-table on main MAIN_SHA with real Ghidra 12.1.4:

AssertionError [ERR_ASSERTION]: The input did not match the regular expression /exhausted its stack.*Use literal mode/u. Input:

"Ghidra's Java regex engine exhausted its stack while matching pattern ^(a|aa)*b$. The active analysis session and annotations remain available."
    at verifyGhidraBoundaries (scripts/lib/real-ghidra-boundaries.mjs:532:10)

Expected: the lane accepts the current reason. It should still require the retry advice in the remediation, which the assertion just above it already checks. It should also require the reason to say that the session survived.

Change and scope

The one assertion now matches /exhausted its stack.*session and annotations remain available/u. That makes the reason check cover the contract #5662 introduced: a regex overflow doesn't close the session. The advice stays covered by the existing remediation.action assertion. No product code changes.

Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope).
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: real-Ghidra verifier (scripts/lib/real-ghidra-boundaries.mjs). No product stage changes.
  • Contribution scope fit and linked maintainer decision: Within existing boundaries (verifier fix). Maintainer decision not applicable.
  • CLI and MCP/tool-catalog contract: None.
  • Provider, bridge, target-format, or platform compatibility: None.
  • Evidence, artifact, provenance, or reconstruction contract: None.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): Not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): None.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: the real-Ghidra boundary assertion in scripts/lib/real-ghidra-boundaries.mjs.
  • Base reproduction or other evidence: the failure above is from main at MAIN_SHA. The reason text comes from regexStackExhausted in ReaGhidraBridge.java and the regex_stack_exhausted projection in GhidraProviderClient.ts, both as changed in a062529b (#5662).
  • User-visible CLI/MCP output (if applicable): none changed.
  • Remaining proof gaps: only the macOS arm64 lane was run. The compile-stage assertion that follows (/stack while compiling pattern/) already matched and is unchanged.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

macOS arm64, Ghidra 12.1.4, Temurin 21, Node 24.22.1:

  • npm run verify:ghidra:aarch64-jump-table on main MAIN_SHA: failed with the assertion above
  • the same command with this change: RESULT
  • npm run format:check: RESULT

Compatibility, safety, and release

  • Breaking changes or migration steps: None.
  • Real Hopper/Ghidra, browser, or OS coverage: Real Ghidra 12.1.4 on macOS arm64.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: Verifier-only change.

Author readiness

Human owner: @RishTheFish21

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/7045 **Author:** [@RishTheFish21](https://github.com/RishTheFish21) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ghidra-regex-verifier-reason` --- ### 📝 Commits (1) - [`22d064f`](https://github.com/morluto/rea/commit/22d064f272738113ba658f5b5d7f2c0e16b5605d) fix(verifiers): expect the session-continuation regex overflow reason ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/real-ghidra-boundaries.mjs` (+3 -1) </details> ### 📄 Description ## Summary #5662 changed the reason REA gives for a Ghidra regex stack overflow. The "use literal mode or simplify the regex" advice moved to `remediation.action`. The reason now ends with the session-continuation sentence, `The active analysis session and annotations remain available.` The real-Ghidra boundary check in `scripts/lib/real-ghidra-boundaries.mjs` still requires the old reason text (`/exhausted its stack.*Use literal mode/`). So every real-Ghidra lane that reaches `verifyGhidraBoundaries` fails on main, even though the product behaves as intended. This updates that one assertion. No issue is linked. I found this while validating #2977, and the regression came from my own #5662. ## Problem and expected behavior Trigger: `npm run verify:ghidra:aarch64-jump-table` on main `MAIN_SHA` with real Ghidra 12.1.4: ``` AssertionError [ERR_ASSERTION]: The input did not match the regular expression /exhausted its stack.*Use literal mode/u. Input: "Ghidra's Java regex engine exhausted its stack while matching pattern ^(a|aa)*b$. The active analysis session and annotations remain available." at verifyGhidraBoundaries (scripts/lib/real-ghidra-boundaries.mjs:532:10) ``` Expected: the lane accepts the current reason. It should still require the retry advice in the remediation, which the assertion just above it already checks. It should also require the reason to say that the session survived. ## Change and scope The one assertion now matches `/exhausted its stack.*session and annotations remain available/u`. That makes the reason check cover the contract #5662 introduced: a regex overflow doesn't close the session. The advice stays covered by the existing `remediation.action` assertion. No product code changes. Follow the [[contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope)](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). Unresolved scope, authority, side effects, or required verification block integration. Link the required maintainer scope decision for new providers or capabilities involving target execution, injection, mutation, or protection recovery; ordinary fixes within existing boundaries may state "not applicable". Draft PRs may leave the scope decision pending and the readiness and merge checklists unchecked. Maintainers can help resolve open questions. ## Contract and boundary impact - Semantic owner and earliest changed stage: real-Ghidra verifier (`scripts/lib/real-ghidra-boundaries.mjs`). No product stage changes. - Contribution scope fit and linked maintainer decision: Within existing boundaries (verifier fix). Maintainer decision not applicable. - CLI and MCP/tool-catalog contract: None. - Provider, bridge, target-format, or platform compatibility: None. - Evidence, artifact, provenance, or reconstruction contract: None. - Target selection, authority, upstream behavior, and cleanup details (if applicable): Not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): None. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: the real-Ghidra boundary assertion in `scripts/lib/real-ghidra-boundaries.mjs`. - Base reproduction or other evidence: the failure above is from main at `MAIN_SHA`. The reason text comes from `regexStackExhausted` in `ReaGhidraBridge.java` and the `regex_stack_exhausted` projection in `GhidraProviderClient.ts`, both as changed in a062529b (#5662). - User-visible CLI/MCP output (if applicable): none changed. - Remaining proof gaps: only the macOS arm64 lane was run. The compile-stage assertion that follows (`/stack while compiling pattern/`) already matched and is unchanged. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [ ] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed macOS arm64, Ghidra 12.1.4, Temurin 21, Node 24.22.1: - `npm run verify:ghidra:aarch64-jump-table` on main `MAIN_SHA`: failed with the assertion above - the same command with this change: RESULT - `npm run format:check`: RESULT ## Compatibility, safety, and release - Breaking changes or migration steps: None. - Real Hopper/Ghidra, browser, or OS coverage: Real Ghidra 12.1.4 on macOS arm64. - Package or release metadata impact: None. - Security, privacy, process, or containment review: Verifier-only change. ## Author readiness Human owner: @RishTheFish21 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 13:39:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7602
No description provided.