[PR #3478] [MERGED] test(ghidra): align MIPS verifier ABI and snapshot expectations #5768

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3478
Author: @AbdulSamad94
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/mips-readelf-gnu-attributes


📝 Commits (6)

  • 502c699 fix(test): retain GNU attribute absence in MIPS verifiers
  • 8fd364b chore(ci): refresh MIPS verifier audit against latest main
  • 01dbe57 test(ghidra): share GNU attribute coverage with the PSP oracle
  • d1ec747 test(ghidra): retain declared PSP GNU single-float attributes
  • c66a02c test(ghidra): map independent GNU facts to snapshot wire fields
  • 93de3a0 chore(ci): integrate current main before final MIPS qualification

📊 Changes

7 files changed (+437 additions, -121 deletions)

View changed files

📝 scripts/verify-real-ghidra-mips.mjs (+49 -84)
📝 tests/conformance/ghidra/mips-checks.d.mts (+17 -2)
📝 tests/conformance/ghidra/mips-checks.mjs (+65 -1)
📝 tests/conformance/ghidra/mips-checks.test.ts (+106 -2)
📝 tests/conformance/ghidra/psp-checks.test.ts (+142 -14)
📝 tests/conformance/ghidra/psp-fixture.d.mts (+2 -2)
📝 tests/conformance/ghidra/psp-fixture.mjs (+56 -16)

📄 Description

Summary

Fixes #3415. The independent GNU-readelf MIPS oracle omitted explicit gnuAttributes: null, falsely failing strict production/oracle comparison. Require complete indexed section coverage and inspect section types before reporting absence; retain strict equality and the snapshot expectation.

The carved-input verifier now requires the documented, specific CLI/MCP incomplete-ABI refusal, including a nonzero CLI exit rather than a timeout. Complete executable/relocatable analysis and unchanged-source checks remain covered.

Review follow-up fixes the same producing-boundary omission in PSP. One parser returns complete PSP header/ABI/GNU facts, and its builder requests section headers. Generic MIPS and PSP share complete section-type inspection. PSP retains an independently decoded GNU single-float declaration when present, distinguishes verified absence, and refuses other unsupported declarations. The old ABI-only contract is removed. A named, typed snapshot expectation converts independent domain facts to the wire representation (fp_abi), tested directly against production for absent and declared GNU facts. No production policy, public contract or execution authority changes.

Validation performed

Refreshed against main e9a71efa3; head 93de3a018, seven changed files. Linux x64, pinned Node 24.18.0/npm 11.16.0, Clang/LLD 14.0.6, GNU readelf 2.40, Ghidra 12.1.4/JDK 21.0.12.1. Existing toolchains reused.

  • Eight actual compiler-built executable/relocatable × endian × float combinations: baseline differs only by the missing GNU field; corrected metadata strictly equals production for all eight.
  • 212 focused tests passed (124 ABI/readelf/PSP cases plus 88 Ghidra client cases), preserving ABI/relocation cases and adding PSP declaration, omission, unknown-vendor/scope/tag and incomplete-section controls.
  • Controlled PSP producer omission: 15 expected failures. Returning false absence for a decoded declaration: 2 expected failures. A wrong snapshot fpAbi key causes 1 expected failure against production profile serialization. Restored source passes.
  • GNU readelf on a constructed PSP-shaped ELF with an actual GNU single-float section strictly agrees with production metadata: {fpAbi: 2, msa: null}. This establishes the reader boundary, not a PSPSDK/provider run.
  • check:ci: all 8 tasks and architecture guards passed; build:cached, pre-push check:fast and git diff --check passed.
  • Earlier heads 8fd364bf7 and d1ec747dd: complete real executable (6 cases) and relocatable (3 cases) workflows passed, including four carved refusals, CLI/MCP, snapshots, unchanged sources and verified empty owned lineage. CI on 8fd364bf7 also passed.
  • Final head 93de3a018: complete executable verifier 6 cases passed, including CLI/MCP, snapshots and all four carved refusals; verified empty owned lineage. Run 0a3422e6-67f3-4478-a090-f3caf565eef6.
  • Relocatable verifier: 3 cases passed on d1ec747dd, run 346b97f3-b508-46ab-81d8-d9db74abd443, verified empty owned lineage. Its fixtures, verifier and existing reader functions are unchanged. Main adds PE-only NativeAOT postprocessing and unrelated JavaScript/catalog work; the final executable run checks shared ELF/provider integration. No final-head relocatable run is claimed.
  • Current-head CI passed all 11 selected jobs (19 optional jobs correctly skipped). Greptile and Codex both completed on 93de3a018 with no new actionable findings. All three threads, including the duplicate old-head report, are resolved with root cause, structural fixes, validation and limits.

Heavy workflows run serially on two CPU cores, with a 1 GiB Ghidra heap and 1.5 GiB verifier Node heap. Warm tool/build/file caches, fresh provider processes. Measured completed workflows (head explicitly labeled):

Workflow / head Wall Child user/system CPU Sampled peak family RSS
Executable / 93de3a018 281.90s 416.32 / 26.96s 1.69 GiB
Relocatable / d1ec747dd 135.53s 205.73 / 12.05s 1.66 GiB

RSS sampling sums live descendants with a 100ms pause: shared pages can repeat and short/reparented processes can be missed. Wait-accounted child CPU excludes the wrapper. Agent token costs are unmeasured; no speedup claimed.

Real Windows/macOS engines, PSPSDK/Allegrex modes and a big-endian soft-float module remain unverified. PSP regression inputs combine a captured ABI declaration and labeled constructed controls; no real PSP provider claim is made.

Author readiness

Original owner: @AbdulSamad94. Existing initial readiness remains; the user explicitly delegated follow-up review, readiness updates and merge in this session.

  • 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

  • Diff, scope and focused/static verification checked.
  • Scoped real-provider verification, current-head CI and actionable review findings complete; limitations above retained.

🔄 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/3478 **Author:** [@AbdulSamad94](https://github.com/AbdulSamad94) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/mips-readelf-gnu-attributes` --- ### 📝 Commits (6) - [`502c699`](https://github.com/morluto/rea/commit/502c69981316a7cfbbcf9db4621593fe258cdd6d) fix(test): retain GNU attribute absence in MIPS verifiers - [`8fd364b`](https://github.com/morluto/rea/commit/8fd364bf76b2c12dbbaadcab03aa6e4778dec18a) chore(ci): refresh MIPS verifier audit against latest main - [`01dbe57`](https://github.com/morluto/rea/commit/01dbe57b89b952d349b2fc9d9ba51e670ceaa43b) test(ghidra): share GNU attribute coverage with the PSP oracle - [`d1ec747`](https://github.com/morluto/rea/commit/d1ec747ddcde751e90f3c8b906be9c725f24ea96) test(ghidra): retain declared PSP GNU single-float attributes - [`c66a02c`](https://github.com/morluto/rea/commit/c66a02c595cd4302afff10ced1accef907a93c54) test(ghidra): map independent GNU facts to snapshot wire fields - [`93de3a0`](https://github.com/morluto/rea/commit/93de3a0181a638a489771d3176cbac6923eeb2b6) chore(ci): integrate current main before final MIPS qualification ### 📊 Changes **7 files changed** (+437 additions, -121 deletions) <details> <summary>View changed files</summary> 📝 `scripts/verify-real-ghidra-mips.mjs` (+49 -84) 📝 `tests/conformance/ghidra/mips-checks.d.mts` (+17 -2) 📝 `tests/conformance/ghidra/mips-checks.mjs` (+65 -1) 📝 `tests/conformance/ghidra/mips-checks.test.ts` (+106 -2) 📝 `tests/conformance/ghidra/psp-checks.test.ts` (+142 -14) 📝 `tests/conformance/ghidra/psp-fixture.d.mts` (+2 -2) 📝 `tests/conformance/ghidra/psp-fixture.mjs` (+56 -16) </details> ### 📄 Description ## Summary Fixes #3415. The independent GNU-readelf MIPS oracle omitted explicit `gnuAttributes: null`, falsely failing strict production/oracle comparison. Require complete indexed section coverage and inspect section types before reporting absence; retain strict equality and the snapshot expectation. The carved-input verifier now requires the documented, specific CLI/MCP incomplete-ABI refusal, including a nonzero CLI exit rather than a timeout. Complete executable/relocatable analysis and unchanged-source checks remain covered. Review follow-up fixes the same producing-boundary omission in PSP. One parser returns complete PSP header/ABI/GNU facts, and its builder requests section headers. Generic MIPS and PSP share complete section-type inspection. PSP retains an independently decoded GNU single-float declaration when present, distinguishes verified absence, and refuses other unsupported declarations. The old ABI-only contract is removed. A named, typed snapshot expectation converts independent domain facts to the wire representation (`fp_abi`), tested directly against production for absent and declared GNU facts. No production policy, public contract or execution authority changes. ## Validation performed Refreshed against main `e9a71efa3`; head `93de3a018`, seven changed files. Linux x64, pinned Node 24.18.0/npm 11.16.0, Clang/LLD 14.0.6, GNU readelf 2.40, Ghidra 12.1.4/JDK 21.0.12.1. Existing toolchains reused. - Eight actual compiler-built executable/relocatable × endian × float combinations: baseline differs only by the missing GNU field; corrected metadata strictly equals production for all eight. - **212 focused tests passed** (124 ABI/readelf/PSP cases plus 88 Ghidra client cases), preserving ABI/relocation cases and adding PSP declaration, omission, unknown-vendor/scope/tag and incomplete-section controls. - Controlled PSP producer omission: **15 expected failures**. Returning false absence for a decoded declaration: **2 expected failures**. A wrong snapshot `fpAbi` key causes **1 expected failure** against production profile serialization. Restored source passes. - GNU readelf on a constructed PSP-shaped ELF with an actual GNU single-float section strictly agrees with production metadata: `{fpAbi: 2, msa: null}`. This establishes the reader boundary, not a PSPSDK/provider run. - `check:ci`: all 8 tasks and architecture guards passed; `build:cached`, pre-push `check:fast` and `git diff --check` passed. - Earlier heads `8fd364bf7` and `d1ec747dd`: complete real executable (6 cases) and relocatable (3 cases) workflows passed, including four carved refusals, CLI/MCP, snapshots, unchanged sources and verified empty owned lineage. CI on `8fd364bf7` also passed. - Final head `93de3a018`: complete executable verifier **6 cases passed**, including CLI/MCP, snapshots and all four carved refusals; verified empty owned lineage. Run `0a3422e6-67f3-4478-a090-f3caf565eef6`. - Relocatable verifier: **3 cases passed** on `d1ec747dd`, run `346b97f3-b508-46ab-81d8-d9db74abd443`, verified empty owned lineage. Its fixtures, verifier and existing reader functions are unchanged. Main adds PE-only NativeAOT postprocessing and unrelated JavaScript/catalog work; the final executable run checks shared ELF/provider integration. No final-head relocatable run is claimed. - [Current-head CI](https://github.com/morluto/rea/actions/runs/38744631333) passed all 11 selected jobs (19 optional jobs correctly skipped). Greptile and Codex both completed on `93de3a018` with no new actionable findings. All three threads, including the duplicate old-head report, are resolved with root cause, structural fixes, validation and limits. Heavy workflows run serially on two CPU cores, with a 1 GiB Ghidra heap and 1.5 GiB verifier Node heap. Warm tool/build/file caches, fresh provider processes. Measured completed workflows (head explicitly labeled): | Workflow / head | Wall | Child user/system CPU | Sampled peak family RSS | | --- | ---: | ---: | ---: | | Executable / `93de3a018` | 281.90s | 416.32 / 26.96s | 1.69 GiB | | Relocatable / `d1ec747dd` | 135.53s | 205.73 / 12.05s | 1.66 GiB | RSS sampling sums live descendants with a 100ms pause: shared pages can repeat and short/reparented processes can be missed. Wait-accounted child CPU excludes the wrapper. Agent token costs are unmeasured; no speedup claimed. Real Windows/macOS engines, PSPSDK/Allegrex modes and a big-endian soft-float module remain unverified. PSP regression inputs combine a captured ABI declaration and labeled constructed controls; no real PSP provider claim is made. ## Author readiness Original owner: @AbdulSamad94. Existing initial readiness remains; the user explicitly delegated follow-up review, readiness updates and merge in this session. - [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 - [x] Diff, scope and focused/static verification checked. - [x] Scoped real-provider verification, current-head CI and actionable review findings complete; limitations above retained. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:17 +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#5768
No description provided.