[PR #3421] [MERGED] test(ghidra): isolate source admission failure sessions #5731

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

📋 Pull Request Information

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

Base: main ← Head: fix/3405-ghidra-admission-fixtures


📝 Commits (3)

  • 49d3f3c test(ghidra): isolate source admission failure sessions
  • e499067 chore(ci): refresh Ghidra admission verification on main
  • 764dc61 chore(ci): refresh Ghidra verification after main updates

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 scripts/lib/real-ghidra-target-admission.mjs (+3 -0)

📄 Description

Summary

Fixes #3405. Close the previous Ghidra session before each negative source-admission case, so missing/directory/permission checks exercise a cold client. Preserve the positive proof that an admitted private snapshot stays readable after the original source disappears.

Problem and expected behavior

Same-target reopen can admit restored bytes through retained-client health. Reusing that client then makes a directory-source rejection check read a valid private snapshot instead, causing a false verifier failure. Each negative scenario must own a fresh session; valid imported facts must remain usable.

Change and scope

Three lines in the real-provider fixture establish the cold-session boundary. No product, tool-schema, Evidence, package, target authority or provider policy changes. Existing ephemeral Ghidra databases and unchanged-executable checks remain in use. No additional maintainer capability-scope decision is applicable.

Evidence and regression coverage

#3405 records the original real Linux/Ghidra failure and the passing unchanged-runtime counterfactual. Historical full AArch64 and cross-format runs on earlier PR head c83a2ecc3 passed, including source identity, rejection, snapshot readback and cleanup. Those historical measurements do not establish current-head verification.

Validation performed

Updated the existing PR with main befbc024c9aead7fd600bae6c84af691ead1ff8c; current head 764dc613a. Verified the merge tree matches the original PR plus main, and the final diff remains exactly the three-line fixture change.

Executed on Linux x64, ordinary uid 1004, pinned Node 24.18.0/npm 11.16.0 with locked dependencies:

  • npm ci — passed.
  • npm run test:focused -- tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts — 1 passed.
  • npm run check:ci — all 8 static tasks and architecture guards passed.
  • npm run docs:check — passed, including 5 README consistency tests.
  • Pre-push npm run check:fast — passed.

Real Ghidra 12.1.4/JDK 21.0.12.1 on head e499067b1: complete --aarch64-jump-table passed (387 successful calls, 52 expected rejections, 207 tools, source-permission/missing/directory rejection, imported-snapshot readback and verified empty owned lineage). Measured wall 970.41s, waited-child user/system CPU 1268.23/83.13s, sampled peak family RSS 3.64 GiB.

Final head 764dc613a: complete --cross-format passed: seven fixtures (native debug/stripped/type-layout/jump-table, AArch64 ELF, x64 PE and Mach-O), 387 successful calls and 52 expected rejections. Permission/missing/directory checks, valid imported-snapshot readback and all retained lifecycle assertions passed; cleanup complete with verified empty owned lineage. Run 692fe182-da4a-4805-a901-2902e6cc6bcb. Wall 1082.30s, waited-child user/system CPU 1187.86/76.26s, sampled peak family RSS 3.75 GiB.

The initial cross-format attempt failed during fixture compilation before Ghidra startup because Clang could not find LLD in PATH; that failure was retained. Correcting PATH passed an exact compiler control and then the complete workflow. No assertion or timeout changed.

Current-head CI passed all 35 executed jobs, including five test shards, Apple, browser and the required gate. Greptile passed with no actionable findings; manual boundary review found none. Codex found no issues on e499067b1, but the fresh request on 764dc613a returned a service error, so it is not claimed as a current-head review pass. No unresolved review threads.

Main subsequently advanced only through an unrelated Kuna correction (b3b5c8b13); the Ghidra fixture, provider and verifier sources remain unchanged.
Heavy workflows run serially, restricted to two CPU cores, 1 GiB Java heap and 1.5 GiB Node heap. Existing local toolchains are reused; no system software is installed. Memory is sampled descendant RSS with a 100ms pause between scans; shared pages can be counted repeatedly and short/reparented processes can be missed. Measurement wrapper overhead is excluded. Warm build/tool/file caches; fresh verifier and provider processes. These are bounded resource observations, not an equivalent before/after speedup comparison.

Windows/macOS hosts remain unverified by these Linux runs. Agent token costs are unmeasured; no performance improvement is claimed.

Author readiness

Human owner: @N0zoM1z0. The existing initial readiness declaration remains in effect; the user explicitly authorized technical 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

  • Concrete problem and scope established; existing authority retained.
  • Final diff checked for unrelated changes and unsupported claims.
  • Current-head real-provider verification and CI complete; actionable reviews addressed and unavailable review explicitly recorded.

🔄 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/3421 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/3405-ghidra-admission-fixtures` --- ### 📝 Commits (3) - [`49d3f3c`](https://github.com/morluto/rea/commit/49d3f3cfcac3bdae8257fd95aaa1563382ead575) test(ghidra): isolate source admission failure sessions - [`e499067`](https://github.com/morluto/rea/commit/e499067b16574ea18d94e2b4e8b38e0657b74dcc) chore(ci): refresh Ghidra admission verification on main - [`764dc61`](https://github.com/morluto/rea/commit/764dc613a33d7ce7e519144fdfe24793156d58de) chore(ci): refresh Ghidra verification after main updates ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/real-ghidra-target-admission.mjs` (+3 -0) </details> ### 📄 Description ## Summary Fixes #3405. Close the previous Ghidra session before each negative source-admission case, so missing/directory/permission checks exercise a cold client. Preserve the positive proof that an admitted private snapshot stays readable after the original source disappears. ## Problem and expected behavior Same-target reopen can admit restored bytes through retained-client health. Reusing that client then makes a directory-source rejection check read a valid private snapshot instead, causing a false verifier failure. Each negative scenario must own a fresh session; valid imported facts must remain usable. ## Change and scope Three lines in the real-provider fixture establish the cold-session boundary. No product, tool-schema, Evidence, package, target authority or provider policy changes. Existing ephemeral Ghidra databases and unchanged-executable checks remain in use. No additional maintainer capability-scope decision is applicable. ## Evidence and regression coverage #3405 records the original real Linux/Ghidra failure and the passing unchanged-runtime counterfactual. Historical full AArch64 and cross-format runs on earlier PR head `c83a2ecc3` passed, including source identity, rejection, snapshot readback and cleanup. Those historical measurements do not establish current-head verification. ## Validation performed Updated the existing PR with main `befbc024c9aead7fd600bae6c84af691ead1ff8c`; current head `764dc613a`. Verified the merge tree matches the original PR plus main, and the final diff remains exactly the three-line fixture change. Executed on Linux x64, ordinary uid 1004, pinned Node 24.18.0/npm 11.16.0 with locked dependencies: - `npm ci` — passed. - `npm run test:focused -- tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts` — 1 passed. - `npm run check:ci` — all 8 static tasks and architecture guards passed. - `npm run docs:check` — passed, including 5 README consistency tests. - Pre-push `npm run check:fast` — passed. Real Ghidra 12.1.4/JDK 21.0.12.1 on head `e499067b1`: complete `--aarch64-jump-table` passed (387 successful calls, 52 expected rejections, 207 tools, source-permission/missing/directory rejection, imported-snapshot readback and verified empty owned lineage). Measured wall 970.41s, waited-child user/system CPU 1268.23/83.13s, sampled peak family RSS 3.64 GiB. Final head `764dc613a`: complete `--cross-format` passed: seven fixtures (native debug/stripped/type-layout/jump-table, AArch64 ELF, x64 PE and Mach-O), 387 successful calls and 52 expected rejections. Permission/missing/directory checks, valid imported-snapshot readback and all retained lifecycle assertions passed; cleanup complete with verified empty owned lineage. Run `692fe182-da4a-4805-a901-2902e6cc6bcb`. Wall 1082.30s, waited-child user/system CPU 1187.86/76.26s, sampled peak family RSS 3.75 GiB. The initial cross-format attempt failed during fixture compilation before Ghidra startup because Clang could not find LLD in PATH; that failure was retained. Correcting PATH passed an exact compiler control and then the complete workflow. No assertion or timeout changed. [Current-head CI](https://github.com/morluto/rea/actions/runs/38734651267) passed all 35 executed jobs, including five test shards, Apple, browser and the required gate. Greptile passed with no actionable findings; manual boundary review found none. Codex found no issues on `e499067b1`, but the fresh request on `764dc613a` returned a service error, so it is not claimed as a current-head review pass. No unresolved review threads. Main subsequently advanced only through an unrelated Kuna correction (`b3b5c8b13`); the Ghidra fixture, provider and verifier sources remain unchanged. Heavy workflows run serially, restricted to two CPU cores, 1 GiB Java heap and 1.5 GiB Node heap. Existing local toolchains are reused; no system software is installed. Memory is sampled descendant RSS with a 100ms pause between scans; shared pages can be counted repeatedly and short/reparented processes can be missed. Measurement wrapper overhead is excluded. Warm build/tool/file caches; fresh verifier and provider processes. These are bounded resource observations, not an equivalent before/after speedup comparison. Windows/macOS hosts remain unverified by these Linux runs. Agent token costs are unmeasured; no performance improvement is claimed. ## Author readiness Human owner: @N0zoM1z0. The existing initial readiness declaration remains in effect; the user explicitly authorized technical 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] Concrete problem and scope established; existing authority retained. - [x] Final diff checked for unrelated changes and unsupported claims. - [x] Current-head real-provider verification and CI complete; actionable reviews addressed and unavailable review explicitly recorded. --- <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:01 +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#5731
No description provided.