Skip to content

fix(ida): retain upstream tool error diagnostics - #2695

Closed
g1at wants to merge 15 commits into
morluto:mainfrom
g1at:codex/ida-upstream-error-diagnostics
Closed

g1at wants to merge 15 commits into
morluto:mainfrom
g1at:codex/ida-upstream-error-diagnostics

Conversation

@g1at

@g1at g1at commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem and outcome

IDA MCP tool errors could lose the producer's explanation or retain configured authentication inside diagnostics and nested transport errors. This change exposes useful upstream reasons in existing CLI/MCP error diagnostics while keeping credential handling at the IDA boundary. For example, an upstream invalid-parameter explanation now remains available in details.diagnostics.reason.

Refs #2301; complements #2307 and #2449. It does not add support for an otherwise incompatible upstream protocol.

Behavior and ownership

  • Configured Authorization, Proxy-Authorization, and Cookie values have one interpretation owner. Basic protects complete decoded pairs, nonempty passwords, and supported Base64 spellings; standalone usernames remain identity values. Unknown Basic charset retains strict UTF-8 and exact Latin-1 candidates, without lossy decoding, BOM removal, or URL decoding.
  • Diagnostic inputs have the maintained 64-KiB UTF-8 source budget, including configurations without credentials. Oversized text produces an explicit omission notice before JSON interpretation or matching. Successful observations are outside this budget.
  • JSON redaction preserves source spelling, duplicate keys, exact numeric lexemes, and unrelated caller context. Only a strictly valid whole document permits decoded-only string interpretation. Malformed documents retain both raw and complete decoded-run matches. Overlapping occurrences are covered and their source spans are merged before buffered output; invalid units do not join fragments. The standard replacement label is retained only when it cannot contain or join a credential; otherwise a graphic Unicode scalar absent from every credential is selected. This also prevents marker boundaries from creating a new credential.
  • One complete Content-Type parser owns format and charset decisions for non-2xx responses and successful-status JSON parse failures. It consumes the entire field, including HTTP quoted pairs, and treats malformed or duplicate parameters as unknown rather than silently discarding them. Supported JSON/+json and plain text retain sanitized diagnostics; other formats or unsupported/uncertain encodings explicitly omit the body.
  • Only the pinned SDK producer's exact POST-body position is trusted as already sanitized. Other SDK context is redacted independently, with LF separating owners. Retained causes contain newly constructed safe messages and known HTTP status/protocol code; raw bodies, parser exceptions, arbitrary SDK data, old stacks, and nested error graphs are excluded. Owned capacity failures retain their typed public projection.

No public operation, schema, target action, or authority is added. Successfully parsed results, lazy successful JSON, SSE streams, and caller-selected paths/URLs retain their existing contracts. Windows fixture corrections explicitly select the Node launcher's actual SYSTEMROOT and release only registered test-owned native runtimes after retention assertions; production resource retention is unchanged.

Validation

Final candidate: 09283a1.

  • Focused regression result and elapsed time: 21 files: 416 passed, 7 existing platform-conditioned skips; 23.3 seconds..
  • Typecheck, format, lint, knip, metadata, and architecture checks: Passed npm run check (20.8 seconds): 0 lint errors, 1090 warnings; all listed checks and module guards passed..
  • Final Windows IDA CLI/MCP and installed Relay bridge result: Passed public CLI/MCP IDA verification (15.9 seconds), including feature tracing, distinct-function switching, invalid input, unchanged fixture and verified owned cleanup. Installed Relay 3.0.2 bridge passed (7.4 seconds), with session/bridge close and unchanged registry entry..
  • Automatic review state at the final commit: Awaiting both automatic reviews of this exact commit..

Independent production parser cases passed 60/60 and marker-boundary cases passed 24/24. Two line-wrap-only fixes from the merged main were required by the full format gate.

Completed supporting checks: the three Windows fixture files passed 63/63 tests in 17.06s, including their required runtime build. The native addon was rebuilt with the repository's standard MinGW lane against the merged sources; source hashes, artifact SHA/PE checks, and Windows Node loading passed. Its old artifact was backed up, and the arithmetic ELF fixture digest remained unchanged.

The real-provider lane uses Windows IDA Pro 9.2 / idalib / Hex-Rays with compatible ida-pro-mcp and Relay's actual installed stdio bridge, through a private candidate launch override. It analyzes a self-compiled arithmetic ELF statically, without executing it, and closes only owned headless sessions without saving a database. Fixture SHA-256: b20b67bac6830e5e7aaf36478b952f54703afd6647319a17268d7d0cd09467d3.

Authentication, malformed-header/body, overlap, replacement-collision, and error-projection cases use the pinned SDK and local synthetic producers; they do not establish authenticated real IDA HTTP behavior. The Windows lifecycle fixtures use a recording producer and real filesystem ownership, not an IDA worker.

Limits

Attached GUI behavior, authenticated IDA HTTP, arbitrary historical Basic charsets, and future authProvider/DPoP or response-clone consumers remain unverified. Real xref correctness beyond contract checks lacks an independently supplied expected address. Other platform/provider coverage and the full repository suite: not rerun; the seven skipped ownership/thinning cases require another platform..

Seven bounded helper microbenchmark samples passed independent output oracles. For equivalent 65,536-byte source tasks, complete output hashes matched revision 8524361; two fresh-child samples measured old 35.2/36.3 ms and final 31.7/30.8 ms, old total CPU 46/62 ms and final 78/47 ms, and peak single-process RSS 103,964/104,520 KiB versus 71,612/71,232 KiB. These are descriptive samples, with initialization/marker selection excluded and concurrent checks possible; no stable speed or CPU improvement is claimed. Cold-only helper measurements do not measure agent tokens, warm tasks, completed CLI/MCP task CPU, or process-family peak memory. Inputs beyond the source budget now produce omission, so their outputs are not equivalent redaction workflows. Binaries, databases, credentials, ambient environment snapshots, and private verification reports are excluded from commits.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T18:58:59.847234Z 797f270 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.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge; no new actionable defect was established.

Summary

The PR retains upstream IDA tool explanations in details.diagnostics.reason while removing configured credentials from error text and retained causes.

  • IDA error diagnostics remove configured credentials and keep caller context.
  • JSON diagnostics keep their original text while credentials are removed.
  • IDA MCP errors keep safe upstream reasons in public diagnostics.
  • Windows IDA test fixtures use the launcher environment and release owned runtimes.

The three supplied previous threads are unnumbered. Their reported problems are addressed by the current code, so no duplicate comments are proposed. The merge-base checks differed, so this review used the full PR diff. Supersession could not be confirmed because GitHub access was unavailable. Tests were not rerun.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Upstream IDA response] --> B{Successful observation?}
  B -->|Yes| C[Existing result decoding]
  B -->|No| D{Diagnostic source}
  D -->|Tool error blocks| E[Literal and JSON-aware redaction]
  D -->|HTTP body| F[Check complete Content-Type]
  F -->|Supported| G[Redact plain text or JSON]
  F -->|Unknown or unsupported| H[Explicit omission notice]
  E --> I[Safe error message]
  G --> I
  H --> I
  I --> J[Safe retained cause]
  I --> K[Public diagnostics reason]
Loading

Reviews (14) · Last reviewed commit: "Merge branch 'main' into codex/ida-upstr..." · Reviewed by Greptile

@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: ecee3013f0

ℹ️ 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/ida/IdaMcpConnection.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: 5c1a30e9d3

ℹ️ 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/ida/IdaMcpConnection.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: 7d79125b62

ℹ️ 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/ida/IdaDiagnosticRedactor.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: a0a6d6422e

ℹ️ 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/ida/IdaMcpConnection.ts Resolved
Comment thread src/ida/IdaJsonDiagnostic.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: 4a8c751a89

ℹ️ 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/ida/IdaDiagnosticRedactor.ts Resolved
Comment thread src/ida/IdaMcpConnection.ts Resolved
Comment thread src/ida/IdaDiagnosticRedactor.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: 8524361bb1

ℹ️ 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/ida/IdaMcpConnection.ts Resolved
Address review findings at their producing boundaries and preserve directly affected consumers. Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request.
Comment thread src/ida/IdaMcpConnection.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: 6d9c1d3be5

ℹ️ 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/ida/IdaMcpConnection.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: 46cd1d7ae4

ℹ️ 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/ida/IdaDiagnosticRedactor.ts Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open.

  1. thread 1

The successful isError envelope bypassed transport rejection. The current connection now passes its configured diagnostic redactor directly into decodeIdaToolResult, so errors are sanitized at the producer-envelope boundary while successful Evidence remains unchanged. Confirmed the existing fix in the live fork head.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

Credential interpretation must follow the marked header formats. The current redactor already parses arbitrary authorization schemes/auth-params and RFC cookie pairs, retaining duplicates and opaque values rather than guessing from ordinary text. Confirmed this existing fix; the additional Basic decoding is handled by the same owner.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

Enumerating encoded spellings was brittle. The current JSON diagnostic owner scans source spans and decodes JSON character units before matching configured credentials, preserving unrelated source text and accepting alternative valid escape spellings. Confirmed this existing fix in the live branch.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

The JSON owner now determines valid versus malformed documents itself and retains both literal and complete decoded-character matches for malformed input, including unquoted runs. The HTTP error path invokes that same owner, so a Content-Type label does not force valid-document semantics. Confirmed this existing fix in the live branch.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

Basic authentication has an explicit reversible encoding. The credential owner now validates/canonically decodes its Base64 payload, retains the decoded credential and password for supported UTF-8/Latin-1 spellings, and continues to preserve ordinary username text. Added a decoded-password/escaped-JSON regression.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

The malformed JSON error retained its raw body and native SyntaxError cause. Sanitization now happens when constructing IdaHttpJsonError, which stores only safe text and omits the raw parser cause; the outer error reuses that safe text without reprocessing replacement markers. Other SDK transport errors no longer retain unsanitized original error fields as a cause.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

Short-secret expansion allocated match arrays and redaction ranges from unbounded text. The diagnostic owner now rejects source diagnostic text above 64 KiB before JSON decoding or matching, with an explicit omission marker, bounding replacement expansion too. Successful observations are unaffected. Added a multi-megabyte one-character-credential regression; performance costs were not measured.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

  1. thread 1

The declared media type owns error-body interpretation. JSON bodies use the JSON source-span redactor, plain text uses literal credential redaction, and unsupported structured error media types are explicitly omitted before the SDK retains them. This prevents HTML/XML entity spellings from entering public diagnostics without pretending an unsupported encoding was decoded.

Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6d9c1d3

@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: 6f4eaae480

ℹ️ 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/ida/IdaMcpConnection.ts Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open.

  1. thread 1

Confirmed the author already fixed this in live head 46cd1d7. retainedTransportCause reconstructs only known SDK HTTP status/code or protocol code with a sanitized message, and attaches that safe cause to the outer failure. Arbitrary upstream fields, stacks and nested causes are not copied. No additional change was needed for this finding. No directly related source cleanup remains.

Validation: inspected the producer and affected consumers; targeted formatting applied where applicable. Tests and automated checks were not run at the user’s explicit request. Real-provider/platform execution remains unverified. Commit: 6f4eaae

  1. thread 1

Basic credential decoding retained the configured Base64 spelling but omitted normalized transport spellings. The credential owner now derives canonical padded and unpadded spellings from validated decoded octets, alongside the decoded pair/password and original configured spelling. Added padded, unpadded and extra-padding regressions; ordinary user identifiers remain outside the credential set. No directly related source cleanup remains.

Validation: inspected the producer and affected consumers; targeted formatting applied where applicable. Tests and automated checks were not run at the user’s explicit request. Real-provider/platform execution remains unverified. Commit: 6f4eaae

@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: mcp MCP server, transport, and tool registration P2: medium Medium priority issue labels Oct 13, 2026

@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: 3b1b36e307

ℹ️ 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/ida/IdaDiagnosticRedactor.ts Resolved
Comment thread src/ida/IdaMcpConnection.ts Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

Fixed publicly in 3b1b36e. MIMEType alone silently discarded malformed charset syntax. The HTTP diagnostic producer now parses the entire parameter sequence before MIMEType conversion, rejecting whitespace around the required equals sign, malformed or trailing parameters, and duplicate parameter names; only then can an allowlisted charset body reach redaction. Source inspection and git diff --check passed. Tests and HTTP workloads were skipped at the user request. No related cleanup remains.

@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: 09283a166f

ℹ️ 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/ida/IdaMcpConnection.ts Outdated
);
if (result.isError === true) {
const reason = redactDiagnostic(blocks.join("\n"));
throw new AnalysisProtocolError(`IDA MCP tool failed: ${reason}`, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Redact the assembled tool failure message

With Authorization: Basic ZmFpbGVkOiBwdWJsaWM= (decoded as failed: public) and an isError text of public, the redactor sees neither the decoded pair nor its leading-space password, but this interpolation then recreates failed: public across the fixed suffix. For an operation that already recorded a lookup before the failing tool call, IdaSessionClient.#failure copies this cause.message into partial_observation.normalized_result.target_binding.reason, so CLI/MCP output contains the configured credential; redact the assembled message or insert a credential-safe boundary before constructing the error.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Comment thread src/ida/IdaMcpConnection.ts Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

Addressed: Merge overlapping credential spans before replacement. The reported trigger was: When configured authentication payloads overlap—for example Authorization: Custom X], Cookie: a=]SECRET, and producer text X]SECRET—the global regex emits only the leftmost X] match and resumes after the ], so it never reports the ]SECRET span beginning one character later. The output becomes [redacted transport… Owner-level correction: IdaDiagnosticRedactor collects overlapping occurrences per credential and merges spans before replacement, covering overlaps whose starts are inside a prior match. This puts the interpretation in the producing representation/owner and lets consumers use that shared fact. The change is at public head 09283a1; fork ref g1at/rea/codex/ida-upstream-error-diagnostics` matches the PR head, and the assigned frozen head is its ancestor. Validation: Pinned oxfmt and git diff --check passed. Tests, builds, typechecks, lint, provider workloads, and CI reruns were not run. No additional cleanup is identified for this finding.

review thread

Addressed: Isolate only the actual sanitized body span. The reported trigger was: On the Streamable HTTP non-2xx path, if a short sanitized body also occurs inside a configured credential elsewhere in the SDK message—for example body X, Authorization: Custom abcXdef, and HTTP status text abcXdef—splitting on every body occurrence divides the status-text credential before redactor.text sees it, then… Owner-level correction: The HTTP error path identifies and preserves only the response-body occurrence/span before sanitization; equal body text elsewhere in SDK status text stays subject to credential redaction. This puts the interpretation in the producing representation/owner and lets consumers use that shared fact. The change is at public head 09283a166ffea488c59e2b0d5ac3c4cd31a4007a; fork ref g1at/rea/codex/ida-upstream-error-diagnostics matches the PR head, and the assigned frozen head is its ancestor. Validation: Pinned oxfmt and git diff --check passed. Tests, builds, typechecks, lint, provider workloads, and CI reruns were not run. No additional cleanup is identified for this finding.

@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: 9b6fed4148

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

if (!response.ok) {
// Normalize before the SDK can swallow a body-consumer failure or drop
// its format metadata. Both consumers use this one owned diagnostic.
safeBody = httpErrorBody(response, await readText(), redactor);

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 Cap HTTP error bodies before calling response.text()

When an HTTP IDA registration returns a sufficiently large non-2xx body (even one whose Content-Type will be omitted), await readText() buffers the complete response before httpErrorBody either discards it or passes it to the new 64-KiB redactor, so a chunked or misleading-length error can still exhaust the REA process. Fresh evidence after the earlier short-secret expansion fix is that its source cap is downstream of this full Fetch allocation; read and cancel the stream at the diagnostic limit (and fast-reject an oversized Content-Length) instead.

AGENTS.md reference: AGENTS.md:L49-L50

Useful? React with 👍 / 👎.

morluto added a commit that referenced this pull request Oct 14, 2026
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route.

Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002.

Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated.

BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
morluto added a commit that referenced this pull request Oct 14, 2026
Use one named input-schema projection for clients and catalog identity, preserve dialect declarations, and bound compact schema depth. Keep canonical SDK output validation when output advertisements are disabled. Release request-owned state on cancellation and carry upstream limitations through composed workflows. Preserve doctor full-output envelopes and validate navigation facts at their owner.

Reviewed fixes: #2088, #2108, #2513, #2684, #2693, #2695, #2836, #2864, #2868, #2877, #2933, #2998, #3002, #3015.

Validation: focused schema, SDK output-validation, context, and workflow tests passed; no schema dialect or canonical output validation was relaxed.
@CassieFox23

Copy link
Copy Markdown
Contributor

Heads up: main already has this change in d4bd65c. The code is in src/ida/IdaJsonDiagnostic.ts, and headless IDA tool diagnostics in partial evidence covers it. It is listed on tracker #3582. If this PR still adds something main doesn't have, please say so here and I'll take it off the list. Thanks for the fix!

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@morluto

morluto commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thanks @g1at. Closing this PR as superseded by 80de3145e on main.

The upstream IDA diagnostic retention/redaction implementation and coverage are integrated. Main also replaces the branch-local module-mock fault probe with its isolated connection-owned injection.

This is an unmerged closure: it does not label this PR as merged or remove contributor history/credit. The decision uses the current source diff and existing validation record; no new local test or provider run is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working P2: medium Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants