Skip to content

feat(settings): read per-call REA_ limits from the operation snapshot - #9889

Open
morluto wants to merge 9 commits into
cursor/setting-effect-field-01f4from
cursor/runtime-per-call-limits-01f4
Open

morluto wants to merge 9 commits into
cursor/setting-effect-field-01f4from
cursor/runtime-per-call-limits-01f4

Conversation

@morluto

@morluto morluto commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #9881. Per-call numeric limits are runtime analysis settings. update_mode is runtime or restart for those settings. A caller argument such as analysis_timeout_ms, max_heap_mb, or command_timeout_ms reports source: "request" and update_mode: "parameter". pending_restart is true only when a configured value is not active in this process.

An accepted runtime override is applied before provider-local validation for the JEB MCP timeout, both Kuna timeouts, the Windows ChangeTime settle settings, the debugger command deadline and output cap, and the Cutter bridge ceiling. Restart-only debugger caps still fail on an invalid launch value. JEB deadline errors carry default, setting, or runtime. Hopper startup does the same. A Kuna project timeout that has not already bound a limit uses the selected project deadline source. Pwntools input bytes already preferred the snapshot and already keep request, runtime, setting, or default. GDB and Rizin command limits copy that admission source when the shared parser accepts the launch value or replaces an invalid one with the override.

This branch merges #9885, including syntax-tree numeric-limit discovery.

Validation performed

  • npm run check:fast — passed.
  • npm run test:local -- JEB provider, Windows settle, debugger session limits, config, and analysis settings — passed (169 tests).
  • npm run test:focused -- Cutter request ceiling and Kuna installation — passed (27 tests).

Compatibility

Stop reading effect, rea_restart_required, restart_required, and restartRequired. There is no compatibility alias. mcp_server_restart_required remains server-identity alignment.

Author readiness

Human owner: @morluto

  • 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.
Open in Web Open in Cursor 

Part of #9881. Move the limits checked on each call into update_analysis_settings, keep their REA_ seeds and bounds, and reject updates outside the allowed range.
@morluto
morluto added this pull request to stack #9886 November 10, 2026 22:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:38:43.019987Z bf4e715 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51c104c827

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/gdb/GdbSessionManager.ts Resolved
Comment thread src/config/runtimeAnalysisSettings.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fc8e35f67

ℹ️ 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".

…quest

GDB reads the accepted command-output cap when it admits a command. Cutter uses that same accepted bridge ceiling for mismatch and request checks. Kuna project-timeout metadata includes the operations that wait on the shared export.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8048fe8e62

ℹ️ 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".

Comment thread src/process/ownedDebuggerSession.ts Resolved
Comment thread src/native/pwntools/PwntoolsFailures.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d90eb820de

ℹ️ 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".

Comment thread src/jeb/JebMcpConnection.ts Resolved
Comment thread src/kuna/KunaCommand.ts Resolved
…ection

Startup timeout wrapping keeps the debugger setting limit. Pwntools and Kuna failures report the selected source. Cutter session and command operations can inspect the bridge ceiling.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27b939682f

ℹ️ 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".

Comment on lines +350 to +354
operations: [
"procedure_pseudo_code",
"analyze_function",
"search_strings",
"set_address_name",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Advertise the cap for every bridge-backed operation

The operation list still omits bridge calls with potentially large payloads, such as Hopper set_comment and Ghidra annotate_native_function. Both are serialized through clients that enforce bridge.max_request_bytes, but AnalysisSettings.inspect() filters settings by this list, so inspection for either operation hides the limit that can refuse the request. Include every operation whose request or response is governed by the bridge ceiling.

AGENTS.md reference: AGENTS.md:L99-L103

Useful? React with 👍 / 👎.

Comment on lines 50 to +53
seams.environment ?? process.env,
);
if (!resolved.ok) throw resolved.error;
return resolved.value;
return applyWindowsChangeTimeSnapshot(resolved.value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply Windows overrides before parsing launch seeds

When any REA_WINDOWS_CHANGE_TIME_* launch value is invalid, resolveWindowsChangeTimeSettle() returns a configuration error here before applyWindowsChangeTimeSnapshot() can read a valid runtime override. Consequently, update_analysis_settings accepts the replacement but subsequent inventory, inspection, and extraction calls remain unusable. Resolve the accepted snapshot at the owning parse boundary so an override can replace an invalid launch seed.

AGENTS.md reference: AGENTS.md:L27-L27

Useful? React with 👍 / 👎.

JEB, Kuna, Windows, debugger, and Cutter consult an accepted override before rejecting an invalid launch value. JEB and Hopper startup deadlines keep default, setting, or runtime as the limit source, and a Kuna timeout without its own limit uses the selected project deadline source.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf4e7158b7

ℹ️ 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".

Comment on lines +232 to +235
projectTimeoutMs: projectTimeout.value.ms,
projectTimeoutSource: projectTimeout.value.source,
functionTimeoutMs: functionTimeout.value.ms,
functionTimeoutSource: functionTimeout.value.source,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep runtime Kuna deadlines out of cached launch configuration

When a Kuna target is opened while either runtime override is active, these fields store the override in the KunaInstallation reused by the session. After update_analysis_settings resets that override, kunaFunctionDeadline() and kunaProjectDeadline() see no current override and fall back to these cached runtime values rather than the launch setting (or its invalid state), so subsequent operations continue using the reset value. Preserve the parsed launch baseline separately and resolve the operation override only at each deadline admission.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

appliesAt: "next_operation",
provider: "pwntools",
operations: ["inspect_binary_layout", "inspect_recorded_crash"],
parameter: "input_bytes",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Name the nested pwntools override parameter

When an oversized artifact used a caller-supplied producer_limits.input_bytes, the projected limit has update_mode: "parameter" but advertises parameter: "input_bytes". Neither pwntools operation accepts that top-level argument—the actual request path is producer_limits.input_bytes—so a client following the structured recovery metadata will submit an invalid retry. Use the full nested parameter path, consistent with the decoder contract and other producer-limit errors.

AGENTS.md reference: AGENTS.md:L99-L103

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

Bring the remaining REA_ limits into the runtime analysis settings system

2 participants