[PR #7479] [MERGED] fix(windows): restore native verification fixture coverage #7863

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7479
Author: @gensokyo-dev
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/7474-windows-native-fixtures


📝 Commits (1)

  • a1346c7 fix(windows): restore native verification fixture coverage

📊 Changes

7 files changed (+165 additions, -97 deletions)

View changed files

📝 .github/workflows/ci.yml (+18 -16)
📝 native/windows/README.md (+6 -0)
📝 src/domain/windowsNativeArtifact.test.ts (+8 -27)
📝 src/windows/WindowsNativeLoader.test.ts (+2 -15)
📝 tests/boundary/process/windowsNativeArtifactVerifier.test.ts (+70 -39)
➕ tests/fixtures/windowsNativeArtifact.ts (+26 -0)
📝 tests/process-global/curatedWindowsLane.test.ts (+35 -0)

📄 Description

Summary

Fixes #7474. Restore meaningful Windows native regression coverage while retaining the native implementation.

Problem and expected behavior

Valid loader fixtures declared a zero-length PE optional header, so eight tests failed at artifact admission before exercising their intended branches. The standalone verifier's manual dependency lists also omitted the current optional-header reader. Broad curated-suite failures then skipped the real Windows behavior and inspection-recovery proofs.

Change and scope

  • Share one independent, inert PE32+ fixture across domain, loader and verifier tests; preserve malformed-header, digest and capability rejection cases.
  • Copy only the selected verifier owner's relative static ESM dependency graph. Exercise preinstall/source and packed/source-free workspaces without installed packages, and assert the packed workspace contains no source loader.
  • Run the existing native behavior and inspection-recovery proofs after artifact/build prerequisites, before broad curated tests; add an ordering regression and document that distinction.

Contract and boundary impact

  • Semantic owner: test-only fixture construction and standalone verifier workspace preparation; remove duplicate byte/manifest producers and stale copy lists.
  • Contribution scope: ordinary test/CI maintenance within existing authority; maintainer scope decision not applicable.
  • CLI/MCP, Evidence, provider authority, installation and release contracts: unchanged. No production C++ or runtime source changes.
  • CI still executes the existing Windows control fixtures and preserves all assertions and failure gates.

Evidence and regression coverage

Executed on pinned main d6f88becd531cabafca1d968b89cf7fc77a80041, Node 24.22.1/npm 11.16.0:

  • Same eight focused files: base 90 pass / 10 fail (8 loader admission failures, 2 verifier dependency failures); candidate 101 pass. Existing handle-close, ownership, private-runtime cleanup and malformed artifact coverage remains.
  • Negative ordering control: restore the exact base workflow, run the curated-lane test, observe only the new ordering guard fail (11 pass / 1 fail), then restore the candidate byte-for-byte.
  • Public artifact verifier against the real CI addon, 929,696 bytes, SHA-256 6a015bfefee7fafb6cbafab659f040170848a45425bbcef6caf962fd39b6ff7b: valid/restored pass; modified digest, invalid declared header with matching digest, and wrong package version each fail as intended. This Linux check validates real image identity, not Windows addon execution.
  • Real Windows CI: artifact identity, native behavior with the compiled process-boundary fixture, and inspection failure ownership/recovery steps all passed, before the broad curated suite. The broad suite reports 7 fail / 839 pass / 56 skip, all 7 matching the exact-base Windows CI names and error headlines (base: 15 fail; all 8 loader failures fixed). Later Node Inspector, Windows package, Node 24 directory identity and Node 22 path-boundary steps were skipped, not passed; no real Ghidra/Hopper claim.

Validation performed

  • npm run test:focused -- the loader, private-runtime, owned-process, handle-close, artifact-domain, artifact-verifier, inspection-workspace and curated-lane test files — 101 pass.
  • npm run typecheck -- --checkers 1 --maxMemory 2G — pass.
  • Scoped lint on all five modified/new TypeScript files — 0 errors, 0 warnings.
  • npm run verify:module-boundaries, npm run verify:test-discovery, explicit seven-file format check, git diff --check — pass.
  • npm run docs:check — pass, including 9 README conformance tests.

Local resource observations: single CPU, 3 GiB early-stop / 4 GiB hard cap, no OOM or guard abort. Focused base: 16.734 s wall / 15.376 s CPU / 444.4 MiB process-family peak; candidate: 11.012 s / 9.582 s / 439.0 MiB. These are observed runs, not an equivalent-task speedup: the base failed early and cache state was uncontrolled. Full typecheck peaked at 1,017.1 MiB. Real-image checks: 1.638 s / 1.426 s / 64.8 MiB across fresh Node processes with compile cache disabled; OS page cache uncontrolled. Measurements are cgroup observations at payload exit, not final whole-scope counters. No agent-token or runtime-analysis performance change is claimed; cold/warm and token costs were not measured.

Final CI is not green. Attribution against the exact-base main run:

  • Source: 9 Apple/provider-routing failures, also reproduced on clean base (35 pass), identical names/error headlines; none of those source/test files changed.
  • Windows curated: remaining 7 failures match base names/error headlines; base had 15, with all 8 loader failures repaired. Native proof steps passed; later Windows package/Node 22/24 checks were skipped.
  • Built shard 4: the same 7 base failures, same error content after normalizing only the randomized TOML test workspace prefix. Other 7 shards were cancelled by fail-fast, not passed.
  • Portable/required summaries fail on those reported failures and incomplete shards. Static/build/docs, three native package baselines, author readiness and Greptile pass. No actionable review findings; Codex quota failure is not a completed review.

Main was fetched again before merge and remains d6f88bec. The requester explicitly authorized bypassing established pre-existing main failures. No CI assertion or gate was weakened.

Compatibility, safety, and release

No breaking changes, target authority changes, runtime changes, release metadata changes, or committed binaries. The real Windows native proof steps passed; later Windows package and Node 22/24 checks were skipped after pre-existing curated failures. All three native package baselines (Linux x64/arm64, macOS arm64) passed. Greptile reviewed head a1346c7 with no actionable findings (5/5, source-only; its supersession check lacked GitHub authentication). Codex review did not complete because repository review quota is exhausted; it is not counted as passed.

Author readiness

Human owner: @gensokyo-dev

The requester explicitly directed entry of these declarations and authorized ready-for-review submission and merge. Technical diff review and validation were performed by Codex; no independently observed human review is claimed.

  • 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

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output. (Not applicable: no contract change.)
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/7479 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/7474-windows-native-fixtures` --- ### 📝 Commits (1) - [`a1346c7`](https://github.com/morluto/rea/commit/a1346c7268689b3eb8088898d60730e1fc8e3cee) fix(windows): restore native verification fixture coverage ### 📊 Changes **7 files changed** (+165 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+18 -16) 📝 `native/windows/README.md` (+6 -0) 📝 `src/domain/windowsNativeArtifact.test.ts` (+8 -27) 📝 `src/windows/WindowsNativeLoader.test.ts` (+2 -15) 📝 `tests/boundary/process/windowsNativeArtifactVerifier.test.ts` (+70 -39) ➕ `tests/fixtures/windowsNativeArtifact.ts` (+26 -0) 📝 `tests/process-global/curatedWindowsLane.test.ts` (+35 -0) </details> ### 📄 Description ## Summary Fixes #7474. Restore meaningful Windows native regression coverage while retaining the native implementation. ## Problem and expected behavior Valid loader fixtures declared a zero-length PE optional header, so eight tests failed at artifact admission before exercising their intended branches. The standalone verifier's manual dependency lists also omitted the current optional-header reader. Broad curated-suite failures then skipped the real Windows behavior and inspection-recovery proofs. ## Change and scope - Share one independent, inert PE32+ fixture across domain, loader and verifier tests; preserve malformed-header, digest and capability rejection cases. - Copy only the selected verifier owner's relative static ESM dependency graph. Exercise preinstall/source and packed/source-free workspaces without installed packages, and assert the packed workspace contains no source loader. - Run the existing native behavior and inspection-recovery proofs after artifact/build prerequisites, before broad curated tests; add an ordering regression and document that distinction. ## Contract and boundary impact - Semantic owner: test-only fixture construction and standalone verifier workspace preparation; remove duplicate byte/manifest producers and stale copy lists. - Contribution scope: ordinary test/CI maintenance within existing authority; maintainer scope decision not applicable. - CLI/MCP, Evidence, provider authority, installation and release contracts: unchanged. No production C++ or runtime source changes. - CI still executes the existing Windows control fixtures and preserves all assertions and failure gates. ## Evidence and regression coverage Executed on pinned main `d6f88becd531cabafca1d968b89cf7fc77a80041`, Node 24.22.1/npm 11.16.0: - Same eight focused files: base **90 pass / 10 fail** (8 loader admission failures, 2 verifier dependency failures); candidate **101 pass**. Existing handle-close, ownership, private-runtime cleanup and malformed artifact coverage remains. - Negative ordering control: restore the exact base workflow, run the curated-lane test, observe only the new ordering guard fail (11 pass / 1 fail), then restore the candidate byte-for-byte. - Public artifact verifier against the [real CI addon](https://github.com/morluto/rea/actions/runs/40462475909/artifacts/12714369964), 929,696 bytes, SHA-256 `6a015bfefee7fafb6cbafab659f040170848a45425bbcef6caf962fd39b6ff7b`: valid/restored pass; modified digest, invalid declared header with matching digest, and wrong package version each fail as intended. This Linux check validates real image identity, **not Windows addon execution**. - [Real Windows CI](https://github.com/morluto/rea/actions/runs/40489669777/job/122141244407): artifact identity, native behavior with the compiled process-boundary fixture, and inspection failure ownership/recovery steps all **passed**, before the broad curated suite. The broad suite reports **7 fail / 839 pass / 56 skip**, all 7 matching the exact-base Windows CI names and error headlines (base: 15 fail; all 8 loader failures fixed). Later Node Inspector, Windows package, Node 24 directory identity and Node 22 path-boundary steps were **skipped**, not passed; no real Ghidra/Hopper claim. ## Validation performed - `npm run test:focused --` the loader, private-runtime, owned-process, handle-close, artifact-domain, artifact-verifier, inspection-workspace and curated-lane test files — **101 pass**. - `npm run typecheck -- --checkers 1 --maxMemory 2G` — pass. - Scoped lint on all five modified/new TypeScript files — 0 errors, 0 warnings. - `npm run verify:module-boundaries`, `npm run verify:test-discovery`, explicit seven-file format check, `git diff --check` — pass. - `npm run docs:check` — pass, including 9 README conformance tests. Local resource observations: single CPU, 3 GiB early-stop / 4 GiB hard cap, no OOM or guard abort. Focused base: 16.734 s wall / 15.376 s CPU / 444.4 MiB process-family peak; candidate: 11.012 s / 9.582 s / 439.0 MiB. These are observed runs, **not an equivalent-task speedup**: the base failed early and cache state was uncontrolled. Full typecheck peaked at 1,017.1 MiB. Real-image checks: 1.638 s / 1.426 s / 64.8 MiB across fresh Node processes with compile cache disabled; OS page cache uncontrolled. Measurements are cgroup observations at payload exit, not final whole-scope counters. No agent-token or runtime-analysis performance change is claimed; cold/warm and token costs were not measured. Final [CI](https://github.com/morluto/rea/actions/runs/40489669777) is **not green**. Attribution against the [exact-base main run](https://github.com/morluto/rea/actions/runs/40478642712): - Source: 9 Apple/provider-routing failures, also reproduced on clean base (35 pass), identical names/error headlines; none of those source/test files changed. - Windows curated: remaining 7 failures match base names/error headlines; base had 15, with all 8 loader failures repaired. Native proof steps passed; later Windows package/Node 22/24 checks were skipped. - Built shard 4: the same 7 base failures, same error content after normalizing only the randomized TOML test workspace prefix. Other **7 shards were cancelled by fail-fast**, not passed. - Portable/required summaries fail on those reported failures and incomplete shards. Static/build/docs, three native package baselines, author readiness and Greptile pass. No actionable review findings; Codex quota failure is not a completed review. Main was fetched again before merge and remains `d6f88bec`. The requester explicitly authorized bypassing established pre-existing main failures. No CI assertion or gate was weakened. ## Compatibility, safety, and release No breaking changes, target authority changes, runtime changes, release metadata changes, or committed binaries. The real Windows native proof steps passed; later Windows package and Node 22/24 checks were skipped after pre-existing curated failures. All three native package baselines (Linux x64/arm64, macOS arm64) passed. Greptile reviewed head `a1346c7` with no actionable findings (5/5, source-only; its supersession check lacked GitHub authentication). Codex review did not complete because repository review quota is exhausted; it is not counted as passed. ## Author readiness Human owner: @gensokyo-dev The requester explicitly directed entry of these declarations and authorized ready-for-review submission and merge. Technical diff review and validation were performed by Codex; no independently observed human review is claimed. - [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] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. (Not applicable: no contract change.) - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-05 01:48:14 +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#7863
No description provided.