Skip to content

fix(evm): explain limiter configuration and access failures - #8521

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-evm-limiter-recovery
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-evm-limiter-recovery

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #8637 at the author's request: #8637 . The replacement reuses the same published branch and HEAD. This closed PR preserves the original discussion and historical validation.

Summary

Fixes #8508. Invalid EVM limiter selections previously surfaced internal admission codes such as prlimit_not_absolute as the final capability recovery instruction, and all probe failures were classified as a missing executable.

The shared limiter-selection owner now supplies readable recovery naming the selected path and REA_EVM_PRLIMIT_COMMAND. Relative and non-file selections use the existing not_configured availability code; missing paths use executable_missing; denied access and other probe failures use runtime_unavailable. Stable admission codes and system error codes remain in diagnostics.

Change and scope

Discovery and execution already share selectEvmLimiter; the fix stays at that owner instead of parsing error prose in inventory. Final capability output receives the same corrective action, and execution admission uses the same reason and original cause. Documentation describes these filesystem-only readiness outcomes. No alternate command is selected and no tools are installed.

This is an ordinary recovery/diagnostic correction for the existing Linux x64 EVM profile. No new provider or target authority, process launch, resource-limit, worker, cleanup or dependency change. A new maintainer scope decision is not applicable. Availability uses existing codes; callers can now distinguish invalid configuration and unavailable access from absence.

Validation

Pinned baseline: aa48d494e9726d469a1b9ed917f021d8a1a4c7ea, also fresh main at verification. Windows x64, Node 24.22.1, npm 10.9.3 (repository pins 11.16.0); shared dependencies were unchanged.

  • With only the production owner restored to the exact baseline, the complete limiter-availability file had 4 failures / 7 passes. It misclassified relative/directory and EACCES/EPERM failures and returned no usable configuration action. The fixed source was restored byte-for-byte afterward.
  • Fixed complete files: 61 passed / 36 existing Linux-only skips, across limiter availability, EVM provider boundary and capability inventory. The 36 skips are pre-existing platform gates; no skip or weakened assertion was added.
  • 11/11 limiter-availability tests passed, including real temporary-file/directory/absent-path checks through final inventory, caller-selected paths, an executable-file control, injected EACCES/EPERM, cancellation while access/stat is pending, freshness rechecks and unsupported-host controls.
  • The real filesystem probes use the existing Linux/x64 capability override on Windows. The permission failures are injected, not real POSIX permission measurements; the selected file is never executed. An available probe does not prove a valid util-linux version or runtime containment.
  • npm run check:fast: 2/2 passed, 36.741 seconds. Formatting and git diff --check passed.
  • Remote tree 00eeac1db3321b0a4e962d018a521efffe24dbc1 exactly matches the tested local commit tree.

Representative results:

  • Relative prlimit: not_configured; “Set REA_EVM_PRLIMIT_COMMAND to an absolute executable regular file for caller-supplied util-linux prlimit.”
  • Directory: same action, with the selected path identified as not a regular file and prlimit_not_file preserved in diagnostics.
  • EACCES/EPERM: runtime_unavailable; grant execute permission/filesystem access or explicitly configure an accessible absolute executable regular file; original system code and path retained.
  • ENOENT/ENOTDIR: executable_missing; select an existing absolute executable regular file.

No real Linux EVM execution or compiled CLI/MCP recovery run is claimed. Hosted CI, including the existing Linux execution cases, must validate this new PR independently.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 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-11-01T14:20:38.410931Z dcb4559 PR opened
ℹ️ 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 Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect EVM limiter readiness and admission, not other provider workflows.

The PR appears safe to merge, with a non-blocking gap in tests for other filesystem failures.

Findings

  1. P2 Fallback recovery lacks test coverage ▶
Fix with agent prompt
### Issue 1
tests/boundary/evm/evmLimiterAvailability.test.ts:47-49
The new fallback for filesystem errors has no test that checks its classification or recovery. The freshness test throws an error without `code`, but only checks that its message survives. Add cases for `EIO` and an error without `code`; assert `runtime_unavailable`, the selected path, the configuration action, and whether `system_code` is present. Otherwise this behavior can regress while the tests still pass.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR fixes limiter recovery at the shared selectEvmLimiter owner.

  • EVM limiter failures now point to recovery for the selected path.

Source review found no new security issue. No runtime checks were performed. The supersession check could not be completed because GitHub access required authentication.

Reviews (1) · Last reviewed commit: "fix(evm): explain limiter configuration ..." · Reviewed by Greptile

Comment on lines +47 to +49
it.each(["EACCES", "EPERM"])(
"uses the exact absolute override and reports denied access: %s",
async (code) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Fallback recovery lacks test coverage

The new fallback for filesystem errors has no test that checks its classification or recovery. The freshness test throws an error without code, but only checks that its message survives. Add cases for EIO and an error without code; assert runtime_unavailable, the selected path, the configuration action, and whether system_code is present. Otherwise this behavior can regress while the tests still pass.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/evm/evmLimiterAvailability.test.ts
Line: 47-49

Comment:
**Fallback recovery lacks test coverage**

The new fallback for filesystem errors has no test that checks its classification or recovery. The freshness test throws an error without `code`, but only checks that its message survives. Add cases for `EIO` and an error without `code`; assert `runtime_unavailable`, the selected path, the configuration action, and whether `system_code` is present. Otherwise this behavior can regress while the tests still pass.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Heads-up from #8532 (fix for #8506): that PR gives unavailable ProviderAvailability a required remediation field, and capability discovery now uses that field verbatim instead of reason. To avoid duplicating this PR, #8532 leaves the EVM limiter owner alone and only passes its current reason through as remediation (with a comment pointing at #8508).

Whichever lands second will conflict in evmLimiterAvailability. If #8532 lands first, the readable recovery this PR adds should go into remediation (and ideally remediationAction at admission), with reason describing only the failure. Otherwise the inventory still shows the description-plus-recovery text, not a repair alone. No action needed until one of them merges.

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor Author

@kaoru0822-kitauji Thank you for the suggestion and for coordinating the overlap with #8532. I'll leave this PR unchanged for now, as you suggested, until one of the two PRs is merged.

If you have time, could you also take a look at my other open PRs, or help point them to an appropriate reviewer?

I appreciate your help and your time.

@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: evm Analysis provider / engine: evm labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: evm Analysis provider / engine: evm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] EVM limiter configuration failures expose internal codes as recovery guidance

3 participants