[PR #7366] [CLOSED] test: align fixtures with admitted sources, inventory rows and Java property framing #7835

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7366
Author: @chordpli
Created: 10/27/2026
Status: ❌ Closed

Base: main ← Head: test/align-fixtures-with-main-contracts


📝 Commits (2)

  • cc3c734 test: align fixtures with admitted sources, inventory rows and Java property framing
  • 0093883 test: isolate the doctor PATH fixture and bind the bundle-root case to a real bundle

📊 Changes

7 files changed (+142 additions, -39 deletions)

View changed files

📝 scripts/ci/pr-ci-health.mjs (+5 -0)
📝 tests/boundary/cli/ghidraJavaDoctor.test.ts (+8 -2)
📝 tests/boundary/filesystem/ciPrHealth.test.ts (+1 -0)
📝 tests/boundary/filesystem/ghidraJavaProbe.test.ts (+8 -1)
📝 tests/boundary/filesystem/safeOutputTreeCloseFailures.test.ts (+3 -2)
📝 tests/boundary/mcp/enhancedTools.limitations.test.ts (+49 -10)
📝 tests/composition/analysis-sessions/providerBinding.test.ts (+68 -24)

📄 Description

Summary

Fixes #7363.

main CI has not passed since a7f50e338. Six test files assert contracts that later main commits replaced, and one fixture depends on the wall clock. This PR updates those tests and gives the CI health CLI an explicit observation-time input; no analysis code changes.

Test Superseded by Change here
tests/composition/analysis-sessions/providerBinding.test.ts 2dd2ffcd4 (isArtifactBundleSubject requires bundleInfoPlist; subject digests must match the admitted file) The bundle-root case opens a real .app bundle (Mach-O executable), so a bundle-root subject with a different digest is retained through the branch 2dd2ffcd4 added; a sibling case asserts that the same subject on a plain file is refused with ProviderAdapterError inventory_artifact:subject.
tests/boundary/filesystem/safeOutputTreeCloseFailures.test.ts 2dd2ffcd4 (expectedRootSha256 → assertAdmittedRootDigest) The client is created with the zip's real SHA-256 instead of "0".repeat(64).
tests/boundary/mcp/enhancedTools.limitations.test.ts 8706068b5 (parseNativeInventoryCount accepts only [{address, value}] rows) Counts canonical rows; a second case asserts a dictionary-shaped inventory is reported as unreadable_output.
tests/boundary/filesystem/ghidraJavaProbe.test.ts 4803c4f9c (javaProperty requires LauncherHelper framing name = value) The empty-value fixture keeps the separator space (sun.arch.data.model = ), as LauncherHelper prints it; a new case documents that a bare = is nonstandard framing and stays "not reported".
tests/boundary/cli/ghidraJavaDoctor.test.ts 81adb8977 added the test with PATH: ""; on Linux the owned-process host needs ps (LinuxOwnedProcessPrerequisiteError) PATH keeps the empty leading component (current directory first) followed by a fixture directory that exposes only a ps symlink on Linux, the pattern launcherAliasesCli.test.ts already uses.
tests/boundary/filesystem/ciPrHealth.test.ts none; the CLI scans from Date.now() with a 14-day lookback and the fixture PR was created 2026-10-13 scripts/ci/pr-ci-health.mjs reads an optional CI_PR_HEALTH_NOW and passes it as now (validated as a finite timestamp like the API input); the CLI test passes the fixed observedAt the other cases already use.

Problem and expected behavior

  • Trigger: npm run test:fast on main (any commit after a7f50e338); the Linux CI job Source tests, Portable tests and the shards.
  • Expected: the tests assert the current producer contracts and main CI is green. Each change above was verified to make its file pass at 15a8f6847 without touching production code (details in #7363).

Change and scope

Each fixture change is the smallest one that expresses the current contract:

  • Admitted-source digests (2dd2ffcd4): real digests instead of placeholder ones, plus one explicit refusal case so the guard that made the old fixtures fail is covered rather than bypassed.
  • Inventory rows (8706068b5): canonical rows; the dictionary shape that motivated the old test (prototype-key handling) is now covered by a value-level case and a negative case.
  • Java property framing (4803c4f9c): fixture matches the real LauncherHelper output; nonstandard framing has its own case.
  • Linux ps prerequisite: the doctor test keeps the behavior it checks (empty PATH component selects the current directory) without hiding the process-ownership prerequisite.
  • Clock: the CLI entry accepts CI_PR_HEALTH_NOW (optional) so a report is reproducible and the test uses one fixed observation time instead of two clock reads.

Not included: tests/boundary/browser/sazWebCapture.test.ts (#7364, contract decision pending) and the bundle classification regression (#7362, separate fix PR).

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: scripts/ci/pr-ci-health.mjs CLI entry gains the now input its API already had; tests follow the owners named above.
  • Contribution scope fit and linked maintainer decision: not applicable; test maintenance.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: the doctor test now depends on ps being on the host PATH (true on macOS and the Linux runners).
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

The checked box stands for tests and the CI reporting script; no analysis behavior changes.

Evidence and regression coverage

  • Tests added or updated: the six files above (new cases: forged inventory digest refused on a plain file; dictionary inventory is unreadable_output; nonstandard Java property framing).
  • Base reproduction or other evidence: all six fail on main 15a8f6847 locally (macOS) and in CI (ghidraJavaDoctor on Linux CI only, e.g. run 40425916879); root causes bisected per file in #7363.
  • User-visible CLI/MCP output (if applicable): not applicable.
  • Remaining proof gaps: ghidraJavaDoctor was not run on Linux locally; its fix is source-derived from the CI log and cliFixture.ts. The Windows lane is not run.

Boundary regressions covered: not applicable (no parser, inventory, snapshot or projection change). Lifecycle regressions: not applicable.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

At 009388349 (main a905a71e3, macOS 26.5.2, Node 24.22.1):

  • npm run test:local -- tests/composition/analysis-sessions/providerBinding.test.ts — 6 passed (bundle-root case on a real bundle, forged-digest case on a plain file)
  • npm run test:focused -- the other five files — 43 passed (safeOutputTree 6, enhancedTools 3, ghidraJavaProbe incl. the new framing case, ciPrHealth, ghidraJavaDoctor)
  • npm run check:fast — passed
  • npm run docs:check — passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none needed; fixtures only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner: @chordpli

  • 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.
  • 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/7366 **Author:** [@chordpli](https://github.com/chordpli) **Created:** 10/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `test/align-fixtures-with-main-contracts` --- ### 📝 Commits (2) - [`cc3c734`](https://github.com/morluto/rea/commit/cc3c734452964f1c501897f5f98e6e37cdac37c9) test: align fixtures with admitted sources, inventory rows and Java property framing - [`0093883`](https://github.com/morluto/rea/commit/0093883495063b18baaab1bd8724aa016335f669) test: isolate the doctor PATH fixture and bind the bundle-root case to a real bundle ### 📊 Changes **7 files changed** (+142 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `scripts/ci/pr-ci-health.mjs` (+5 -0) 📝 `tests/boundary/cli/ghidraJavaDoctor.test.ts` (+8 -2) 📝 `tests/boundary/filesystem/ciPrHealth.test.ts` (+1 -0) 📝 `tests/boundary/filesystem/ghidraJavaProbe.test.ts` (+8 -1) 📝 `tests/boundary/filesystem/safeOutputTreeCloseFailures.test.ts` (+3 -2) 📝 `tests/boundary/mcp/enhancedTools.limitations.test.ts` (+49 -10) 📝 `tests/composition/analysis-sessions/providerBinding.test.ts` (+68 -24) </details> ### 📄 Description ## Summary Fixes #7363. `main` CI has not passed since a7f50e338. Six test files assert contracts that later `main` commits replaced, and one fixture depends on the wall clock. This PR updates those tests and gives the CI health CLI an explicit observation-time input; no analysis code changes. | Test | Superseded by | Change here | |---|---|---| | `tests/composition/analysis-sessions/providerBinding.test.ts` | 2dd2ffcd4 (`isArtifactBundleSubject` requires `bundleInfoPlist`; subject digests must match the admitted file) | The bundle-root case opens a real `.app` bundle (Mach-O executable), so a bundle-root subject with a different digest is retained through the branch 2dd2ffcd4 added; a sibling case asserts that the same subject on a plain file is refused with `ProviderAdapterError` `inventory_artifact:subject`. | | `tests/boundary/filesystem/safeOutputTreeCloseFailures.test.ts` | 2dd2ffcd4 (`expectedRootSha256` → `assertAdmittedRootDigest`) | The client is created with the zip's real SHA-256 instead of `"0".repeat(64)`. | | `tests/boundary/mcp/enhancedTools.limitations.test.ts` | 8706068b5 (`parseNativeInventoryCount` accepts only `[{address, value}]` rows) | Counts canonical rows; a second case asserts a dictionary-shaped inventory is reported as `unreadable_output`. | | `tests/boundary/filesystem/ghidraJavaProbe.test.ts` | 4803c4f9c (`javaProperty` requires LauncherHelper framing `name = value`) | The empty-value fixture keeps the separator space (`sun.arch.data.model = `), as LauncherHelper prints it; a new case documents that a bare `=` is nonstandard framing and stays "not reported". | | `tests/boundary/cli/ghidraJavaDoctor.test.ts` | 81adb8977 added the test with `PATH: ""`; on Linux the owned-process host needs `ps` (`LinuxOwnedProcessPrerequisiteError`) | `PATH` keeps the empty leading component (current directory first) followed by a fixture directory that exposes only a `ps` symlink on Linux, the pattern `launcherAliasesCli.test.ts` already uses. | | `tests/boundary/filesystem/ciPrHealth.test.ts` | none; the CLI scans from `Date.now()` with a 14-day lookback and the fixture PR was created `2026-10-13` | `scripts/ci/pr-ci-health.mjs` reads an optional `CI_PR_HEALTH_NOW` and passes it as `now` (validated as a finite timestamp like the API input); the CLI test passes the fixed `observedAt` the other cases already use. | ## Problem and expected behavior - Trigger: `npm run test:fast` on `main` (any commit after a7f50e338); the Linux CI job `Source tests`, `Portable tests` and the shards. - Expected: the tests assert the current producer contracts and `main` CI is green. Each change above was verified to make its file pass at 15a8f6847 without touching production code (details in #7363). ## Change and scope Each fixture change is the smallest one that expresses the current contract: - Admitted-source digests (2dd2ffcd4): real digests instead of placeholder ones, plus one explicit refusal case so the guard that made the old fixtures fail is covered rather than bypassed. - Inventory rows (8706068b5): canonical rows; the dictionary shape that motivated the old test (prototype-key handling) is now covered by a value-level case and a negative case. - Java property framing (4803c4f9c): fixture matches the real LauncherHelper output; nonstandard framing has its own case. - Linux `ps` prerequisite: the doctor test keeps the behavior it checks (empty PATH component selects the current directory) without hiding the process-ownership prerequisite. - Clock: the CLI entry accepts `CI_PR_HEALTH_NOW` (optional) so a report is reproducible and the test uses one fixed observation time instead of two clock reads. Not included: `tests/boundary/browser/sazWebCapture.test.ts` (#7364, contract decision pending) and the bundle classification regression (#7362, separate fix PR). Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). Unresolved scope, authority, side effects, or required verification block integration. Link the required maintainer scope decision for new providers or capabilities involving target execution, injection, mutation, or protection recovery; ordinary fixes within existing boundaries may state "not applicable". Draft PRs may leave the scope decision pending and the readiness and merge checklists unchecked. Maintainers can help resolve open questions. ## Contract and boundary impact - Semantic owner and earliest changed stage: `scripts/ci/pr-ci-health.mjs` CLI entry gains the `now` input its API already had; tests follow the owners named above. - Contribution scope fit and linked maintainer decision: not applicable; test maintenance. - CLI and MCP/tool-catalog contract: unchanged. - Provider, bridge, target-format, or platform compatibility: the doctor test now depends on `ps` being on the host `PATH` (true on macOS and the Linux runners). - Evidence, artifact, provenance, or reconstruction contract: unchanged. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): none. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. The checked box stands for tests and the CI reporting script; no analysis behavior changes. ## Evidence and regression coverage - Tests added or updated: the six files above (new cases: forged inventory digest refused on a plain file; dictionary inventory is `unreadable_output`; nonstandard Java property framing). - Base reproduction or other evidence: all six fail on `main` 15a8f6847 locally (macOS) and in CI (`ghidraJavaDoctor` on Linux CI only, e.g. run 40425916879); root causes bisected per file in #7363. - User-visible CLI/MCP output (if applicable): not applicable. - Remaining proof gaps: `ghidraJavaDoctor` was not run on Linux locally; its fix is source-derived from the CI log and `cliFixture.ts`. The Windows lane is not run. Boundary regressions covered: not applicable (no parser, inventory, snapshot or projection change). Lifecycle regressions: not applicable. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [ ] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed At `009388349` (`main` `a905a71e3`, macOS 26.5.2, Node 24.22.1): - `npm run test:local -- tests/composition/analysis-sessions/providerBinding.test.ts` — 6 passed (bundle-root case on a real bundle, forged-digest case on a plain file) - `npm run test:focused --` the other five files — 43 passed (safeOutputTree 6, enhancedTools 3, ghidraJavaProbe incl. the new framing case, ciPrHealth, ghidraJavaDoctor) - `npm run check:fast` — passed - `npm run docs:check` — passed ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: none needed; fixtures only. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none. ## Author readiness Human owner: @chordpli - [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 - [ ] 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. - [ ] 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:00 +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#7835
No description provided.