Skip to content

fix: report provider admission failures as typed codes - #8066

Merged
morluto merged 7 commits into
mainfrom
cursor/provider-admission-error-codes-168f
Oct 29, 2026
Merged

morluto merged 7 commits into
mainfrom
cursor/provider-admission-error-codes-168f

Conversation

@morluto

@morluto morluto commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Ghidra launch and extension admission, WABT output parsing, process ownership and worker runtime, EVM metadata and limiter selection, and owned staged output still threw Error and treated the English sentence as the failure identity.

Problem and expected behavior

Those failures are now typed errors whose code is the stable identity. Optional detail keeps the field that identifies the path, limit, address key, or component. Tests assert the code and those fields.

ownedDebuggerSession.ts is unchanged. Test and fixture throws that only fail a test harness stay as they are.

Change and scope

Each owner has one admission error: GhidraAdmissionError, WabtAdmissionError, ProcessAdmissionError, EvmAdmissionError, StagedOutputError, and OwnedFileHandleError. ghidraFileFailure copies a Ghidra admission code into diagnostics and does not treat that code as a Node system_code. PSP inspection and WABT configuration do the same. An unavailable EVM limiter returns its code as the reason and keeps limiter_path in diagnostics.

No resource budget number changed, so no new REA_ setting. Allegrex scan limits, the CBOR 64-level profile, the JDK options byte bound, and the Linux limits report bound stay named constants.

Follow the 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: each parser or launcher owns its refusal. Callers that matched Error.message now match code and detail or diagnostics.
  • Contribution scope fit and linked maintainer decision: not applicable. Existing admission boundaries; no new provider, execution, injection, or mutation.
  • CLI and MCP/tool-catalog contract: tool names are unchanged. A wrapped provider failure reports the code as its reason or diagnostics code. EVM limiter failures still include diagnostics.limiter_path.
  • Provider, bridge, target-format, or platform compatibility: Ghidra headless arguments, LaunchSupport options, Allegrex inspection, WABT WAT and objdump output, process limits and Darwin token reads, Solidity CBOR metadata, and staged file publication.
  • Evidence, artifact, provenance, or reconstruction contract: accepted artifacts are unchanged. Refusals identify themselves by code.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): staged-output and worker-close failures still fail closed. The cause is the typed error.
  • 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: launcher, LaunchSupport, PSP, extension, seed, WABT, Linux limits, owned worker, Darwin token reader, staged output, EVM limiter, Solidity metadata, Ghidra handshake, provider-process memory limit, and EVM directory-limiter tests assert codes and structured fields.
  • Base reproduction or other evidence: executed. The focused files below passed after the conversion. The first CI run failed on the old memory-limit sentence and on an EVM verifier that looks for the limiter path in the serialized error. Diagnostics now keep limiter_path.
  • User-visible CLI/MCP output (if applicable): adapter and capability text that copied Error.message now carries the code. PSP still prefixes PSP_EXTENSION_UNAVAILABLE. EVM limiter diagnostics still name the selected path.
  • Remaining proof gaps: no live Ghidra or WABT tool was run. Darwin helper compilation coverage is the existing fixture lane. The real EVM verifier reruns in CI.

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

Ghidra launch, PSP inspection, WABT inspection, staged publication, owned-worker close, and EVM limiter admission are the boundaries covered. Cleanup ownership tests still run. No new lifecycle stage was added.

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

  • npm run test:focused -- the Ghidra launcher, Java launch, PSP, extension, profile-artifact, seed, WABT output/interface/string/provider, Linux limits, owned worker, staged output, EVM limiter, Solidity metadata, and session-value files — passed.
  • npm run test:focused -- tests/boundary/process/darwinProcessRunTokenReader.test.ts — 28 passed, 7 skipped.
  • npm run test:focused -- tests/boundary/process/providerProcess.test.ts tests/boundary/evm/evmoleInterfaceProvider.test.ts — 61 passed, 3 skipped.
  • npm run format:check — passed.
  • npm run check:fast — typecheck and lint passed, including after merging origin/main. The pre-push hook ran check:fast again and it passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: callers that matched these Error.message sentences need to switch on code and detail or diagnostics. Accepted analysis results are unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: not run beyond fixture tests. Ghidra Java launch and PSP tests use local fixtures. The real EVM interface verifier runs in CI.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: LaunchSupport environment entries are no longer copied into the error. The failure records check: separator or check: key. No new process, network, or file write.

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 

@cursor

cursor Bot commented Oct 29, 2026

Copy link
Copy Markdown

@gensokyo-dev @dandgabr Ghidra, WABT, process, EVM, and filesystem admission failures now use typed codes. Please review when you can. Kuna is #8064.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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 ⚠️ Failed 2026-10-29T22:40:43.116755Z
We couldn’t complete this review. Comment @codex review to try again.
6e0f7d4 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: 7ab4f9f98f

ℹ️ 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/ghidra/GhidraJavaLaunch.ts Resolved
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[High impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Replaces sentence-based provider refusals with typed codes and preserves identifying details in returned errors.

  • Ghidra launch and profile failures now carry stable codes and details.
  • WABT configuration and parsing refusals now report stable codes.
  • EVM limiter, worker, and metadata refusals now carry stable codes.
  • Process ownership and worker refusals now use stable error codes.
  • Staged-file ownership failures now carry codes into publication diagnostics.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Provider refuses input] --> B[Typed error with code and detail]
  B --> C[Provider error wrapper]
  C --> D[CLI and MCP error]
  E[Metadata tokenizer finds duplicate] --> F[EvmAdmissionError]
  F --> G[Metadata admission code and detail]
Loading

Reviews (5) · Last reviewed commit: "fix(evm): detect repeated CBOR keys in t..." · Reviewed by Greptile

Comment thread src/evm/SolidityMetadata.ts Resolved
Comment thread src/ghidra/GhidraPspExtension.ts Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Comment thread src/evm/SolidityMetadata.ts Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto
morluto merged commit 317bf3f into main Oct 29, 2026
44 checks passed
@morluto
morluto deleted the cursor/provider-admission-error-codes-168f branch October 29, 2026 22:48
Entrpi added a commit to Entrpi/rea that referenced this pull request Oct 30, 2026
…e limit

Main's typed admission codes (morluto#8066) take more lines to assert than the
message patterns they replace, which took the "Ghidra headless launcher"
block to 153 lines, over oxlint's 150. The RISC-V calling-convention policy
tests move to their own block, as morluto#7484 did for the Hopper refusal tests.
@morluto morluto added area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants