[PR #5567] [CLOSED] fix(electron): report fixed fuse reader bounds as non-retryable #6965

Closed
opened 2026-11-01 21:44:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5567
Author: @kaoru0822-kitauji
Created: 10/20/2026
Status: ❌ Closed

Base: main ← Head: fix/electron-fuse-limit-advice


📝 Commits (2)

  • 83da234 fix(electron): report fixed fuse reader bounds as non-retryable
  • 5985188 Merge origin/main into fix/electron-fuse-limit-advice

📊 Changes

2 files changed (+28 additions, -5 deletions)

View changed files

📝 src/electron/ElectronFuseFailures.ts (+16 -3)
📝 src/electron/ElectronFuseProvider.test.ts (+12 -2)

📄 Description

Summary

Fixes #5537. inspect-electron-fuses correctly refuses inputs beyond its fixed reader bounds, but the refusal advice cannot help the unchanged request succeed:

  • A slice with 33 fuse sentinels returned retryable: true and advised waiting for an active analysis.
  • A 1 GiB + 1 byte file advised raising an evidence-reply file-size allowance, which this command doesn't expose.

Both refusals now return retryable: false with a remediation that names the reported fixed bound.

Problem and expected behavior

electronFuseFailure built AnalysisResourceConstraintError with resource capacity or file-size and no retryable or remediationAction. The presentation layer therefore used the generic advice for those kinds (admission capacity → wait; file-size → worker reply allowance), and projection inferred retryable: true from capacity. src/domain/analysisErrorCore.ts defines retryability by whether the same request can succeed, and docs/electron-fuses.md documents both bounds as fixed.

Change and scope

  • src/electron/ElectronFuseFailures.ts: pass retryable: false and a bound-specific remediationAction for each boundary. This follows the existing pattern for deterministic bounds (for example PeResourcesProvider, RecoveryFiles).
  • reported_limits now read ELECTRON_FUSE_LIMITS (the reader's owning constants) instead of duplicated literals; the values are unchanged (1073741824, 32).
  • The refusals, error code, resource kinds and numeric limits are unchanged.

Contribution scope: ordinary fix within existing boundaries; maintainer scope decision not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Electron fuse failure mapping (src/electron/ElectronFuseFailures.ts).

  • Contribution scope fit and linked maintainer decision: ordinary fix; not applicable.

  • CLI and MCP/tool-catalog contract: retryable and remediation.action change for these two refusals only; no schema change.

  • Provider, bridge, target-format, or platform compatibility: none.

  • Evidence, artifact, provenance, or reconstruction contract: none.

  • Target selection, authority, upstream behavior, and cleanup details: not applicable.

  • Generated metadata, package, or installation impact: none.

  • 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 updated: src/electron/ElectronFuseProvider.test.ts. The existing 33-sentinel and sparse 1 GiB + 1 cases now also assert the public projection has retryable: false and a remediation naming maximum_sentinels_per_slice / maximum_input_bytes, with no wait or allowance advice.

  • Base reproduction: with ElectronFuseFailures.ts reverted and the updated tests kept, both cases fail on base.

  • Remaining proof gaps: the issue's CLI invocation was not rerun; the tests assert the same projectAnalysisError projection the CLI and MCP serialize. macOS only.

  • 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 -- src/electron/ElectronFuseProvider.test.ts: 23 passed
  • Same command with the source fix stashed: 2 failed (both limit cases), 21 passed
  • npm run check:fast: passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none; only the refusal's retry flag and advice change.
  • Real Hopper/Ghidra, browser, or OS coverage: macOS (darwin); no provider involved.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no new reads, processes or side effects.

Author readiness

Human owner: @kaoru0822-kitauji

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

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5567 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/electron-fuse-limit-advice` --- ### 📝 Commits (2) - [`83da234`](https://github.com/morluto/rea/commit/83da234587eeaff5fb5d2e1e1abce208f205a8e2) fix(electron): report fixed fuse reader bounds as non-retryable - [`5985188`](https://github.com/morluto/rea/commit/59851883305e08121be52505b5f2673010253946) Merge origin/main into fix/electron-fuse-limit-advice ### 📊 Changes **2 files changed** (+28 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/electron/ElectronFuseFailures.ts` (+16 -3) 📝 `src/electron/ElectronFuseProvider.test.ts` (+12 -2) </details> ### 📄 Description ## Summary Fixes #5537. `inspect-electron-fuses` correctly refuses inputs beyond its fixed reader bounds, but the refusal advice cannot help the unchanged request succeed: - A slice with 33 fuse sentinels returned `retryable: true` and advised waiting for an active analysis. - A 1 GiB + 1 byte file advised raising an evidence-reply file-size allowance, which this command doesn't expose. Both refusals now return `retryable: false` with a remediation that names the reported fixed bound. ## Problem and expected behavior `electronFuseFailure` built `AnalysisResourceConstraintError` with resource `capacity` or `file-size` and no `retryable` or `remediationAction`. The presentation layer therefore used the generic advice for those kinds (admission capacity → wait; file-size → worker reply allowance), and projection inferred `retryable: true` from `capacity`. `src/domain/analysisErrorCore.ts` defines retryability by whether the same request can succeed, and `docs/electron-fuses.md` documents both bounds as fixed. ## Change and scope - `src/electron/ElectronFuseFailures.ts`: pass `retryable: false` and a bound-specific `remediationAction` for each boundary. This follows the existing pattern for deterministic bounds (for example `PeResourcesProvider`, `RecoveryFiles`). - `reported_limits` now read `ELECTRON_FUSE_LIMITS` (the reader's owning constants) instead of duplicated literals; the values are unchanged (1073741824, 32). - The refusals, error code, resource kinds and numeric limits are unchanged. Contribution scope: ordinary fix within existing boundaries; maintainer scope decision not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: Electron fuse failure mapping (`src/electron/ElectronFuseFailures.ts`). - Contribution scope fit and linked maintainer decision: ordinary fix; not applicable. - CLI and MCP/tool-catalog contract: `retryable` and `remediation.action` change for these two refusals only; no schema change. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details: not applicable. - Generated metadata, package, or installation impact: none. - [x] 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 updated: `src/electron/ElectronFuseProvider.test.ts`. The existing 33-sentinel and sparse 1 GiB + 1 cases now also assert the public projection has `retryable: false` and a remediation naming `maximum_sentinels_per_slice` / `maximum_input_bytes`, with no wait or allowance advice. - Base reproduction: with `ElectronFuseFailures.ts` reverted and the updated tests kept, both cases fail on base. - Remaining proof gaps: the issue's CLI invocation was not rerun; the tests assert the same `projectAnalysisError` projection the CLI and MCP serialize. macOS only. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- src/electron/ElectronFuseProvider.test.ts`: 23 passed - Same command with the source fix stashed: 2 failed (both limit cases), 21 passed - `npm run check:fast`: passed ## Compatibility, safety, and release - Breaking changes or migration steps: none; only the refusal's retry flag and advice change. - Real Hopper/Ghidra, browser, or OS coverage: macOS (darwin); no provider involved. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no new reads, processes or side effects. ## Author readiness Human owner: @kaoru0822-kitauji - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6965
No description provided.