[PR #2919] test(ghidra): verify MIPS declaration and cleanup boundaries #5492

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2919
Author: @Bobtoshi
Created: 10/13/2026
Status: 🔄 Open

Base: main ← Head: codex/mips1-verification


📝 Commits (7)

  • 5df5571 feat(ghidra): admit verified recordless MIPS I o32 executables
  • d8630ea test(ghidra): verify MIPS branch decoding and retain diagnostics
  • 5ec1a57 fix(mips)!: reject uninspected GNU ABI attributes
  • 102f813 test(mips): isolate native boundary controls from ambient settings
  • 05e2366 test(mips): verify cleanup and pin readelf locale
  • 0a8f70f Merge latest upstream and verify MIPS declaration coverage
  • e389016 chore: preserve untouched upstream tests after merge

📊 Changes

7 files changed (+364 additions, -0 deletions)

View changed files

📝 docs/ghidra-mips.md (+16 -0)
📝 knip.json (+1 -0)
➕ scripts/verify-real-ghidra-mips-boundaries.mjs (+195 -0)
📝 src/ghidra/GhidraMipsProfile.test.ts (+18 -0)
📝 src/ghidra/GhidraMipsProfile.ts (+2 -0)
📝 tests/boundary/filesystem/mipsAbiFlags.test.ts (+40 -0)
➕ tests/conformance/ghidra/mips1-fixture.mjs (+92 -0)

📄 Description

MIPS ABI declarations may remain hidden when a section table is only partly captured, even if a valid program ABI-flags record exists. This branch preserves upstream's new GNU-attribute parser/reconciliation and incomplete-coverage refusal, and adds an exact regression for a final 24-byte GNU section-header prefix with a conflicting soft-float payload in both byte orders.

MIPS I remains unsupported and now explains the unverified load-delay semantics. The source-owned production CLI/MCP verifier independently decodes GNU soft-float attributes with readelf, checks both refusal controls, and checks existing recordless MIPS32 dossiers and exact loaded bytes. This does not add MIPS I admission or claim firmware/FP correctness. Related to #2734.

The verifier uses an explicit minimal environment and fresh process-run token, pins readelf to LC_ALL=C, rejects unsupported hosts before allocating a workspace, and requires verified empty descendants before success. Failures preserve diagnostic files. Ambient seeds/analyzer settings cannot modify the controls.

Validation at e389016ff5:

  • 149 focused profile/header/metadata/conformance tests passed; static/module/architecture, docs and test discovery passed (all 1,290 files discovered once).
  • Real Ghidra 12.1.4/macOS arm64: both endian MIPS I and unsupported GNU-FP declarations refused through production CLI/MCP; existing recordless MIPS32 controls still produced dossiers and exact bytes. GNU readelf independently decoded soft float. Source hashes unchanged, targets not executed, cleanup verified with no remaining descendants.
  • A simulated Windows platform was rejected before provider/workspace startup; no native Windows or Linux run is claimed.
  • Native controls passed with poisoned ambient REA settings and a conflicting parent locale. Timing, agent tokens and process-family memory are unmeasured; no performance claim.

The prior blanket GNU-section refusal is superseded by upstream commit 938728227; it is not reintroduced. Latest tested upstream main is efbc486b9b. GitHub requires maintainer approval to run fork-origin PR Actions; no upstream CI pass or merge readiness is claimed from local verification alone.


🔄 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/2919 **Author:** [@Bobtoshi](https://github.com/Bobtoshi) **Created:** 10/13/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/mips1-verification` --- ### 📝 Commits (7) - [`5df5571`](https://github.com/morluto/rea/commit/5df557113c240f1dd83a3352ad5276f12b73eb1a) feat(ghidra): admit verified recordless MIPS I o32 executables - [`d8630ea`](https://github.com/morluto/rea/commit/d8630eaf13f4d8a8112e92f1882bb5a0dc74a409) test(ghidra): verify MIPS branch decoding and retain diagnostics - [`5ec1a57`](https://github.com/morluto/rea/commit/5ec1a57a297fa81e14a405a49ebc374e0d4627d1) fix(mips)!: reject uninspected GNU ABI attributes - [`102f813`](https://github.com/morluto/rea/commit/102f813f785dcd30867d135895df9779e9a0858c) test(mips): isolate native boundary controls from ambient settings - [`05e2366`](https://github.com/morluto/rea/commit/05e23666d856b739790498d37ddb578b007632a2) test(mips): verify cleanup and pin readelf locale - [`0a8f70f`](https://github.com/morluto/rea/commit/0a8f70f0a39648733ea9adcc0f2e0b8d1f6c2d69) Merge latest upstream and verify MIPS declaration coverage - [`e389016`](https://github.com/morluto/rea/commit/e389016ff5758221bc2394c0df2d8368cb501294) chore: preserve untouched upstream tests after merge ### 📊 Changes **7 files changed** (+364 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/ghidra-mips.md` (+16 -0) 📝 `knip.json` (+1 -0) ➕ `scripts/verify-real-ghidra-mips-boundaries.mjs` (+195 -0) 📝 `src/ghidra/GhidraMipsProfile.test.ts` (+18 -0) 📝 `src/ghidra/GhidraMipsProfile.ts` (+2 -0) 📝 `tests/boundary/filesystem/mipsAbiFlags.test.ts` (+40 -0) ➕ `tests/conformance/ghidra/mips1-fixture.mjs` (+92 -0) </details> ### 📄 Description MIPS ABI declarations may remain hidden when a section table is only partly captured, even if a valid program ABI-flags record exists. This branch preserves upstream's new GNU-attribute parser/reconciliation and incomplete-coverage refusal, and adds an exact regression for a final 24-byte GNU section-header prefix with a conflicting soft-float payload in both byte orders. MIPS I remains unsupported and now explains the unverified load-delay semantics. The source-owned production CLI/MCP verifier independently decodes GNU soft-float attributes with readelf, checks both refusal controls, and checks existing recordless MIPS32 dossiers and exact loaded bytes. This does not add MIPS I admission or claim firmware/FP correctness. Related to #2734. The verifier uses an explicit minimal environment and fresh process-run token, pins readelf to LC_ALL=C, rejects unsupported hosts before allocating a workspace, and requires verified empty descendants before success. Failures preserve diagnostic files. Ambient seeds/analyzer settings cannot modify the controls. Validation at e389016ff5758221bc2394c0df2d8368cb501294: - 149 focused profile/header/metadata/conformance tests passed; static/module/architecture, docs and test discovery passed (all 1,290 files discovered once). - Real Ghidra 12.1.4/macOS arm64: both endian MIPS I and unsupported GNU-FP declarations refused through production CLI/MCP; existing recordless MIPS32 controls still produced dossiers and exact bytes. GNU readelf independently decoded soft float. Source hashes unchanged, targets not executed, cleanup verified with no remaining descendants. - A simulated Windows platform was rejected before provider/workspace startup; no native Windows or Linux run is claimed. - Native controls passed with poisoned ambient REA settings and a conflicting parent locale. Timing, agent tokens and process-family memory are unmeasured; no performance claim. The prior blanket GNU-section refusal is superseded by upstream commit 938728227; it is not reintroduced. Latest tested upstream main is efbc486b9bf8ab46da16fdd6ed88128849e30e81. GitHub requires maintainer approval to run fork-origin PR Actions; no upstream CI pass or merge readiness is claimed from local verification alone. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5492
No description provided.