[PR #4220] [CLOSED] fix(native): map Go and Rust ppc reports to the powerpc subject #6133

Closed
opened 2026-10-31 01:12:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4220
Author: @kharedevansh11
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/ppc-subject-architecture


📝 Commits (5)

  • e74ccec fix(native): map Go and Rust ppc reports to the powerpc subject
  • 06a0ef0 Merge origin/main into fix/ppc-subject-architecture
  • 8932a46 refactor(native): share the Go container architecture subject projection
  • b5ea2ef Merge remote-tracking branch 'fork/fix/ppc-subject-architecture' into fix/ppc-subject-architecture
  • f77b317 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

4 files changed (+38 additions, -0 deletions)

View changed files

📝 src/application/go/GoBinaryService.test.ts (+17 -0)
📝 src/application/rust/RustBinaryService.test.ts (+17 -0)
📝 src/domain/go/goBinary.ts (+2 -0)
📝 src/domain/rust/rustBinary.ts (+2 -0)

📄 Description

Summary

Fixes #4197. inspect-go-binary and inspect-rust-binary returned subject.architecture: null for ELF EM_PPC (and Mach-O CPU_TYPE_POWERPC) inputs even though the local report says ppc and the canonical family list includes powerpc.

Problem and expected behavior

The ELF/Mach-O readers emit the Go-style alias ppc. Both services' architectureForSubject translated 386/amd64 but fell through to an exact canonical match for everything else, so ppc became undefined → null subject. Expected: subject powerpc; ppc64 stays null because it is not a canonical family.

Change and scope

Add case "ppc": return "powerpc"; to the Go and Rust subject mappers. The local normalized_result.architecture: "ppc" is unchanged. No new families. Contribution scope: not applicable (ordinary fix).

Contract and boundary impact

  • Semantic owner and earliest changed stage: GoBinaryService / RustBinaryService Evidence subject construction.

  • CLI and MCP/tool-catalog contract: unchanged schema; subject now populated for PowerPC.

  • Evidence contract: restores a known subject fact; local report unchanged.

  • Generated metadata / package impact: none.

  • Read existing files or captured data.

Evidence and regression coverage

  • Tests added: one case each in GoBinaryService.test.ts and RustBinaryService.test.ts asserting ppc → powerpc and ppc64 → null. Both fail on main and pass with the fix.
  • Base reproduction: ran the issue's CLI script against the rebuilt checkout:
inspect-go-binary   ppc32be  report=ppc   subject=powerpc
inspect-rust-binary ppc32be  report=ppc   subject=powerpc
inspect-go-binary   ppc32le  report=ppc   subject=powerpc
inspect-rust-binary ppc32le  report=ppc   subject=powerpc
inspect-go-binary   x86      report=386   subject=x86
inspect-rust-binary x86      report=386   subject=x86
inspect-go-binary   ppc64    report=ppc64 subject=null
inspect-rust-binary ppc64    report=ppc64 subject=null
  • Remaining proof gaps: no compiler-built PowerPC Go/Rust binary; MCP path not exercised separately (same service).

Validation performed

  • npx vitest run src/application/go/GoBinaryService.test.ts src/application/rust/RustBinaryService.test.ts — 12 passed (2 new fail on base)
  • npm run build:cached + issue repro script — output above
  • npx tsc --noEmit, npx oxfmt --check, npx oxlint on changed files — clean

Compatibility, safety, and release

  • Breaking changes: none.
  • Security/containment: none; no target execution.

Author readiness

Human owner: @kharedevansh11

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

🔄 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/4220 **Author:** [@kharedevansh11](https://github.com/kharedevansh11) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ppc-subject-architecture` --- ### 📝 Commits (5) - [`e74ccec`](https://github.com/morluto/rea/commit/e74ccec4ae7e4665181911e96d019563927c00c4) fix(native): map Go and Rust ppc reports to the powerpc subject - [`06a0ef0`](https://github.com/morluto/rea/commit/06a0ef064896f4422c1ec57c81610a0e155d49b3) Merge origin/main into fix/ppc-subject-architecture - [`8932a46`](https://github.com/morluto/rea/commit/8932a4601ffbefc03cb34eb0f9781bebabc7aa7b) refactor(native): share the Go container architecture subject projection - [`b5ea2ef`](https://github.com/morluto/rea/commit/b5ea2ef7cabf831dd6a7c021777b3ab73897651b) Merge remote-tracking branch 'fork/fix/ppc-subject-architecture' into fix/ppc-subject-architecture - [`f77b317`](https://github.com/morluto/rea/commit/f77b3170c6c398b17d1b8c0344a73c72aa22e9cd) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **4 files changed** (+38 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/application/go/GoBinaryService.test.ts` (+17 -0) 📝 `src/application/rust/RustBinaryService.test.ts` (+17 -0) 📝 `src/domain/go/goBinary.ts` (+2 -0) 📝 `src/domain/rust/rustBinary.ts` (+2 -0) </details> ### 📄 Description ## Summary Fixes #4197. `inspect-go-binary` and `inspect-rust-binary` returned `subject.architecture: null` for ELF `EM_PPC` (and Mach-O `CPU_TYPE_POWERPC`) inputs even though the local report says `ppc` and the canonical family list includes `powerpc`. ## Problem and expected behavior The ELF/Mach-O readers emit the Go-style alias `ppc`. Both services' `architectureForSubject` translated `386`/`amd64` but fell through to an exact canonical match for everything else, so `ppc` became `undefined` → null subject. Expected: subject `powerpc`; `ppc64` stays null because it is not a canonical family. ## Change and scope Add `case "ppc": return "powerpc";` to the Go and Rust subject mappers. The local `normalized_result.architecture: "ppc"` is unchanged. No new families. Contribution scope: not applicable (ordinary fix). ## Contract and boundary impact - Semantic owner and earliest changed stage: `GoBinaryService` / `RustBinaryService` Evidence subject construction. - CLI and MCP/tool-catalog contract: unchanged schema; subject now populated for PowerPC. - Evidence contract: restores a known subject fact; local report unchanged. - Generated metadata / package impact: none. - [x] Read existing files or captured data. ## Evidence and regression coverage - Tests added: one case each in `GoBinaryService.test.ts` and `RustBinaryService.test.ts` asserting `ppc → powerpc` and `ppc64 → null`. Both fail on `main` and pass with the fix. - Base reproduction: ran the issue's CLI script against the rebuilt checkout: ```text inspect-go-binary ppc32be report=ppc subject=powerpc inspect-rust-binary ppc32be report=ppc subject=powerpc inspect-go-binary ppc32le report=ppc subject=powerpc inspect-rust-binary ppc32le report=ppc subject=powerpc inspect-go-binary x86 report=386 subject=x86 inspect-rust-binary x86 report=386 subject=x86 inspect-go-binary ppc64 report=ppc64 subject=null inspect-rust-binary ppc64 report=ppc64 subject=null ``` - Remaining proof gaps: no compiler-built PowerPC Go/Rust binary; MCP path not exercised separately (same service). ## Validation performed - `npx vitest run src/application/go/GoBinaryService.test.ts src/application/rust/RustBinaryService.test.ts` — 12 passed (2 new fail on base) - `npm run build:cached` + issue repro script — output above - `npx tsc --noEmit`, `npx oxfmt --check`, `npx oxlint` on changed files — clean ## Compatibility, safety, and release - Breaking changes: none. - Security/containment: none; no target execution. ## Author readiness Human owner: @kharedevansh11 - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:07 +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#6133
No description provided.