[PR #6948] [CLOSED] fix(binary): name alternatives for unsupported layout targets #7468

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6948
Author: @zhachar14h-cell
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: fix/binary-layout-actionable-refusal


📝 Commits (1)

  • 34ca3ba fix(binary): name alternatives for unsupported layout targets

📊 Changes

5 files changed (+79 additions, -19 deletions)

View changed files

📝 docs/binary-diagnostics.md (+16 -0)
📝 src/native/pwntools/PwntoolsDecoder.ts (+11 -1)
📝 src/native/pwntools/PwntoolsLayoutProvider.ts (+2 -0)
📝 tests/acceptance/elfNotesCli.test.ts (+20 -16)
📝 tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts (+30 -2)

📄 Description

Summary

Addresses the recovery-guidance option in #6934. An ELF32 layout refusal currently tells callers to choose another operation without naming one. The refusal now names inspect_with_objdump file/section-header operations and inspect_elf_notes, their CLI spellings and objdump prerequisites. It explains that these provide narrower facts; the ELF64 x86-64 little-endian EXEC/DYN/REL layout profile is unchanged.

Change and scope

The layout adapter owns its recovery text. The shared pwntools decoder carries that optional profile value into the existing AnalysisUnsupportedTargetError.remediationAction; CLI and MCP retain their shared error projection. No diagnostic-string matching, extra target parsing, automatic fallback or new schema is introduced. Recorded-crash recovery retains its existing default.

This is an ordinary diagnostic correction within the contribution scope; a new-capability maintainer decision is not applicable.

Contract and boundary impact

  • Owner / earliest changed stage: pwntools decoder-reply translation, with recovery authored by PwntoolsLayoutProvider.
  • Public contract: preserves unsupported_target, non-retryability, selected path, producer reason and captured diagnostics; changes remediation.action.
  • Evidence, target authority, process/snapshot cleanup, package metadata and schema contracts: unchanged. Recommendations do not invoke the suggested operations.
  • Compatibility: existing Linux x64 layout profile only; no ELF32 normalized layout support added.

Evidence and regression coverage

Source-derived baseline diagnosis: the decoder omitted refusal-specific recovery, so the shared projection supplied the generic “choose an operation” action. The Linux runtime reproduction in #6934 was not independently rerun here.

Extended the existing decoder-reply boundary matrix with unsupported-target, asserting the retained refusal/diagnostics, named alternatives and private-snapshot cleanup. This uses a simulated producer, not real pwntools. That Linux-only case is skipped on this Windows host.

Expanded the existing public CLI build-id test to ELF32 and ELF64. Both pass, verifying the engine-free notes route recommended by the new guidance. Existing MCP notes tests also pass.

Validation performed

Windows x64, pinned Node 24.22.1 and npm 11.16.0; source base 915e56e3.

  • npm run check:fast — passed.
  • npm run check — passed on the final diff, including typecheck, compilation, lint, formatting, knip, metadata and architecture checks.
  • npm run test:focused -- src/application/binaryDiagnostics/BinaryLayoutService.test.ts src/native/pwntools/PwntoolsFailures.test.ts tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts tests/acceptance/elfNotesCli.test.ts tests/boundary/mcp/elfNotesMcp.test.ts — 35 passed, 35 Linux-only cases skipped.
  • npm run docs:check — passed, including 9 README consistency tests.
  • node scripts/verify-test-discovery.mjs — all 2,332 files discovered exactly once.
  • Pre-commit lint/format hooks and git diff --check — passed.

The documented matching-version native-addon restore was used locally and its artifact verification passed. No binary or generated output is committed.

Compatibility, safety, and release

No breaking change or migration. No performance improvement is claimed. Full deterministic suite, Linux decoder regression, real pwntools and GNU objdump workflows remain unverified locally; Linux/provider verification is needed before integration.

Author readiness

Human owner: @zhachar14h-cell

  • 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

  • One focused diagnostic outcome; related issue linked.
  • Required Linux/provider verification and current hosted checks are complete.
  • Human owner has completed the readiness declaration.

🔄 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/6948 **Author:** [@zhachar14h-cell](https://github.com/zhachar14h-cell) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/binary-layout-actionable-refusal` --- ### 📝 Commits (1) - [`34ca3ba`](https://github.com/morluto/rea/commit/34ca3bad3585498f1c2b7ada643aacc773079ce8) fix(binary): name alternatives for unsupported layout targets ### 📊 Changes **5 files changed** (+79 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `docs/binary-diagnostics.md` (+16 -0) 📝 `src/native/pwntools/PwntoolsDecoder.ts` (+11 -1) 📝 `src/native/pwntools/PwntoolsLayoutProvider.ts` (+2 -0) 📝 `tests/acceptance/elfNotesCli.test.ts` (+20 -16) 📝 `tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts` (+30 -2) </details> ### 📄 Description ## Summary Addresses the recovery-guidance option in #6934. An ELF32 layout refusal currently tells callers to choose another operation without naming one. The refusal now names `inspect_with_objdump` file/section-header operations and `inspect_elf_notes`, their CLI spellings and objdump prerequisites. It explains that these provide narrower facts; the ELF64 x86-64 little-endian EXEC/DYN/REL layout profile is unchanged. ## Change and scope The layout adapter owns its recovery text. The shared pwntools decoder carries that optional profile value into the existing `AnalysisUnsupportedTargetError.remediationAction`; CLI and MCP retain their shared error projection. No diagnostic-string matching, extra target parsing, automatic fallback or new schema is introduced. Recorded-crash recovery retains its existing default. This is an ordinary diagnostic correction within the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope); a new-capability maintainer decision is not applicable. ## Contract and boundary impact - Owner / earliest changed stage: pwntools decoder-reply translation, with recovery authored by `PwntoolsLayoutProvider`. - Public contract: preserves `unsupported_target`, non-retryability, selected path, producer reason and captured diagnostics; changes `remediation.action`. - Evidence, target authority, process/snapshot cleanup, package metadata and schema contracts: unchanged. Recommendations do not invoke the suggested operations. - Compatibility: existing Linux x64 layout profile only; no ELF32 normalized layout support added. ## Evidence and regression coverage Source-derived baseline diagnosis: the decoder omitted refusal-specific recovery, so the shared projection supplied the generic “choose an operation” action. The Linux runtime reproduction in #6934 was not independently rerun here. Extended the existing decoder-reply boundary matrix with `unsupported-target`, asserting the retained refusal/diagnostics, named alternatives and private-snapshot cleanup. This uses a simulated producer, not real pwntools. That Linux-only case is skipped on this Windows host. Expanded the existing public CLI build-id test to ELF32 and ELF64. Both pass, verifying the engine-free notes route recommended by the new guidance. Existing MCP notes tests also pass. ## Validation performed Windows x64, pinned Node 24.22.1 and npm 11.16.0; source base `915e56e3`. - `npm run check:fast` — passed. - `npm run check` — passed on the final diff, including typecheck, compilation, lint, formatting, knip, metadata and architecture checks. - `npm run test:focused -- src/application/binaryDiagnostics/BinaryLayoutService.test.ts src/native/pwntools/PwntoolsFailures.test.ts tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts tests/acceptance/elfNotesCli.test.ts tests/boundary/mcp/elfNotesMcp.test.ts` — 35 passed, 35 Linux-only cases skipped. - `npm run docs:check` — passed, including 9 README consistency tests. - `node scripts/verify-test-discovery.mjs` — all 2,332 files discovered exactly once. - Pre-commit lint/format hooks and `git diff --check` — passed. The documented matching-version native-addon restore was used locally and its artifact verification passed. No binary or generated output is committed. ## Compatibility, safety, and release No breaking change or migration. No performance improvement is claimed. Full deterministic suite, Linux decoder regression, real pwntools and GNU objdump workflows remain unverified locally; Linux/provider verification is needed before integration. ## Author readiness Human owner: @zhachar14h-cell - [ ] 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 - [x] One focused diagnostic outcome; related issue linked. - [ ] Required Linux/provider verification and current hosted checks are complete. - [ ] Human owner has completed the readiness declaration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:48:03 +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#7468
No description provided.