Repository navigation
feat(ghidra): bound one procedure's decompile without closing the session - #5662
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; the remaining regex wording issue is non-blocking. Findings
Fix with agent prompt### Issue 1
src/ghidra/GhidraProviderClient.ts:979-982
The cancellation-aware fix changes only `remediationAction`. The real `regex_stack_exhausted` message still says “the session remains usable,” and this branch passes it unchanged into the public error. When cancellation closes the session while that failure settles, callers get conflicting answers and may expect session-only annotations to survive.
Keep session-state wording in one place, and test the actual bridge message rather than “Observed Ghidra failure.”
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds an optional native decompile deadline while keeping the Ghidra session open.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Native decompile] --> B{Deadline reached?}
B -->|No| C[Return decompiled facts]
B -->|Yes| D{Request type}
D -->|analyze_function| E[Return listing facts and unavailable decompiler facets]
D -->|Atomic request| F[Return provider_timeout]
E --> G[Keep session open]
F --> G
A -->|Caller cancels| H[Close session and await cleanup]
Reviews (5) · Last reviewed commit: "merge: preserve Ghidra OOM diagnostics a..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e067efd6ed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Keeps BinarySession from marking every Ghidra operation unavailable after one procedure's decompile reaches the limit, and names the MCP tool-call deadline in the remediation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f2a2e5e63
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…d sessions Adds REA_GHIDRA_DECOMPILE_TIMEOUT_SECONDS to the derived Codex/Kimi tool deadline and forwards it through setup. Marks a remote failure that settles after caller cancellation so the timeout projection no longer promises session reuse.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb754c9258
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
CI is green after the review follow-ups:
|
Separate failure and registration cases by their distinct contracts. Record actual Linux Ghidra, CLI and MCP evidence with measured context, elapsed time, CPU and memory, and explicit remaining coverage limits.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2252af3b40
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Authorized maintenance merge attribution for head
The Portable tests job merges the available Vitest reports, repeating already-attributed failures; CI required fails because its upstream gates failed. Full historical CI is not green. The authorized bypass applies to the independently established baseline failures above. Performance measurements and platform/coverage limitations remain in the linked verification report; initial human readiness declarations are preserved. Merge remains pending: two new review findings require a producer/projection wording fix and an explicit existing-deadline setup explanation. These findings are being fixed, not bypassed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f2e3a389b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…nce/5662-decompile-timeout-20261023
…nce/5662-decompile-timeout-20261023
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d8dcdb621
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…nce/5662-decompile-timeout-20261023
|
Final admission for head
The repository owner explicitly authorized merging with failures established unrelated to this PR. The above baseline failures are being bypassed on that authorization; they are not reported as green or fixed here. Raw logs, all controls and the audit are under |
Adapt upstream morluto#5356, morluto#4650 and morluto#5662 to the Windows fork. Preserve listing facts and live retry policy, carry explicit settings into client setup, and qualify natural timeouts with a source-owned Windows DLL. Windows acceptance, default real-provider checks and SDK schema regressions passed; details in the verification record.
Fixes #5340.
An opt-in
REA_GHIDRA_DECOMPILE_TIMEOUT_SECONDSbounds each native decompile without asking Ghidra to close the session. Unset remains unbounded; 1–2,147,483 whole seconds follows Ghidra's signed-int millisecond conversion.Function dossiers retain listing facts, mark pseudocode/native API/value flow unavailable and remain live for retry. Atomic decompiles return the existing
provider_timeoutcontract withretryable: true,timeout_msandremote_code: decompile_timed_out. Caller cancellation still closes the session. Queue-owned wording preserves cancellation and incomplete-cleanup facts; Java regex failures describe engine facts, with lifecycle interpreted by the same provider owner.The function capability advertises this optional control. Derived setup deadlines are single-decompile estimates. Multi-function calls, including
trace_native_values, need allowance for every attempted function and other work; callers can select fewer functions, split/resume exports or change their client deadline. Existing positive deadlines are preserved. No tool schema changes.Validation:
npm run checkanddocs:checkpassed on the published implementation; all 42 deadline/registration cases passed. The preceding provider/queue/session selection had 236 passes and one independently reproduced main SIGKILL wording failure.symbolschema error; it is not claimed as passing.Verification report. Maintenance real-provider scope is Linux; Windows/macOS, natural regex overflow, long client timers and large-batch capacity remain unverified. Targets were never executed. The verifier rejects oversized fixture overrides before allocation using a 1 MiB generated-source budget.
Contribution scope: optional resource control within the existing static Ghidra workflow, with no new provider, target execution, injection, executable mutation or attached-GUI authority.
Author readiness
Human owner: @RishTheFish21
Before merge
type(scope): outcome.