[PR #7165] [CLOSED] fix(tests): align setup and doctor regressions with explicit runtime registration #7688

Closed
opened 2026-11-03 13:39:40 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7165
Author: @devreddy1015
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: fix/main-ci-stale-setup-tests


📝 Commits (1)

  • d34bc94 fix(tests): align setup and doctor regressions with explicit runtime registration

📊 Changes

3 files changed (+46 additions, -9 deletions)

View changed files

📝 tests/acceptance/setup/launcherAliasesCli.test.ts (+39 -5)
📝 tests/boundary/filesystem/clientConfigurationBom.test.ts (+3 -1)
📝 tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts (+4 -3)

📄 Description

Summary

CI on main has failed since db4d3ab (run 40222081394): test shards 4/8 and 5/8 report 10 failing assertions across three files. The production changes in d69a54d and 37a7c2d are intentional; three regressions still encoded the earlier behavior. This PR only updates those tests.

Problem and expected behavior

Test Failure on main Cause
tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts expected sw_vers, received /usr/bin/sw_vers 37a7c2d probes macOS with the absolute /usr/bin/sw_vers
tests/boundary/filesystem/clientConfigurationBom.test.ts (8 cases) state stale instead of aligned d69a54d reports a direct [launcher, "mcp"] registration as stale so setup can migrate it to an explicit runtime
tests/acceptance/setup/launcherAliasesCli.test.ts doctor returns capability_unavailable: "Linux process ownership inspection requires a procps-compatible ps on REA's PATH before launching a child: spawn ps ENOENT" the case runs REA with PATH=""; Linux process ownership needs ps on REA's own PATH, macOS does not

Change and scope

  • doctorSystemHostFilesystem: match /usr/bin/sw_vers in the stub and the expected call list. The stub previously threw for the new command, the probe swallowed it and returned undefined, and nothing noticed. The case now asserts the probed version is 15.0, so a drifted stub fails.
  • clientConfigurationBom: register [process.execPath, launcher, "mcp"], the form setup now writes (the same migration d69a54d applied to duplicateJsonMemberSetup and packageClientBackup). The BOM, CRLF and backup-byte assertions are unchanged.
  • launcherAliasesCli: on Linux only, create a directory containing just a ps symlink (found on the runner's PATH) and use it as REA's PATH and the retained registration PATH. The case still proves the generated [node, script, "mcp"] command starts without node or rea on PATH. macOS keeps PATH="". The binary_session assertion now prints the tool result on failure.

Not included: no production change. With PATH lacking ps on Linux, binary_session fails as a whole because the apktool availability probe rethrows the ownership-preparation error instead of reporting apktool unavailable. That is a separate product question, filed as #7164, so this PR does not change behavior.

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: tests only. Owners are unchanged: readMacosVersion in src/application/Doctor.ts, registrationAligned in src/application/ClientRegistrationStatus.ts, and Linux prepare in src/process/ProcessOwnershipObservation.ts.
  • Contribution scope fit and linked maintainer decision: not applicable (test repair).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: 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.

Evidence and regression coverage

  • Tests added or updated: the three files above.
  • Base reproduction or other evidence: on db4d3ab (Linux x64, Node 26.12.1), the same three files fail locally with the CI messages above (9 boundary failures, 1 acceptance failure).
  • User-visible CLI/MCP output (if applicable): not applicable.
  • Remaining proof gaps: macOS was not run. The macOS branch of launcherAliasesCli is unchanged (PATH="").

Validation performed

  • npx vitest run tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts tests/boundary/filesystem/clientConfigurationBom.test.ts on db4d3ab: 9 failed, 11 passed. With this change: 20 passed.
  • npm run build:cached then npx vitest run tests/acceptance/setup/launcherAliasesCli.test.ts on db4d3ab: 1 failed, 7 passed. With this change: 8 passed.
  • All three files together with this change: 28 passed.
  • npm run check:fast (typecheck and lint): passed.
  • npx oxfmt --check on the changed files: passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux x64 only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: test-only. The Linux case symlinks the runner's existing ps into its own temporary directory.

Author readiness

Human owner:

  • 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/7165 **Author:** [@devreddy1015](https://github.com/devreddy1015) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/main-ci-stale-setup-tests` --- ### 📝 Commits (1) - [`d34bc94`](https://github.com/morluto/rea/commit/d34bc9452153efdea60f6e24664a78fbab0ceed3) fix(tests): align setup and doctor regressions with explicit runtime registration ### 📊 Changes **3 files changed** (+46 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tests/acceptance/setup/launcherAliasesCli.test.ts` (+39 -5) 📝 `tests/boundary/filesystem/clientConfigurationBom.test.ts` (+3 -1) 📝 `tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts` (+4 -3) </details> ### 📄 Description ## Summary CI on `main` has failed since db4d3ab ([run 40222081394](https://github.com/morluto/rea/actions/runs/40222081394)): test shards 4/8 and 5/8 report 10 failing assertions across three files. The production changes in d69a54d and 37a7c2d are intentional; three regressions still encoded the earlier behavior. This PR only updates those tests. ## Problem and expected behavior | Test | Failure on main | Cause | |---|---|---| | `tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts` | expected `sw_vers`, received `/usr/bin/sw_vers` | 37a7c2d probes macOS with the absolute `/usr/bin/sw_vers` | | `tests/boundary/filesystem/clientConfigurationBom.test.ts` (8 cases) | state `stale` instead of `aligned` | d69a54d reports a direct `[launcher, "mcp"]` registration as stale so setup can migrate it to an explicit runtime | | `tests/acceptance/setup/launcherAliasesCli.test.ts` | doctor returns `capability_unavailable`: "Linux process ownership inspection requires a procps-compatible ps on REA's PATH before launching a child: spawn ps ENOENT" | the case runs REA with `PATH=""`; Linux process ownership needs `ps` on REA's own PATH, macOS does not | ## Change and scope - **doctorSystemHostFilesystem**: match `/usr/bin/sw_vers` in the stub and the expected call list. The stub previously threw for the new command, the probe swallowed it and returned `undefined`, and nothing noticed. The case now asserts the probed version is `15.0`, so a drifted stub fails. - **clientConfigurationBom**: register `[process.execPath, launcher, "mcp"]`, the form setup now writes (the same migration d69a54d applied to `duplicateJsonMemberSetup` and `packageClientBackup`). The BOM, CRLF and backup-byte assertions are unchanged. - **launcherAliasesCli**: on Linux only, create a directory containing just a `ps` symlink (found on the runner's PATH) and use it as REA's PATH and the retained registration `PATH`. The case still proves the generated `[node, script, "mcp"]` command starts without `node` or `rea` on PATH. macOS keeps `PATH=""`. The `binary_session` assertion now prints the tool result on failure. Not included: no production change. With `PATH` lacking `ps` on Linux, `binary_session` fails as a whole because the apktool availability probe rethrows the ownership-preparation error instead of reporting apktool unavailable. That is a separate product question, filed as #7164, so this PR does not change behavior. 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: tests only. Owners are unchanged: `readMacosVersion` in `src/application/Doctor.ts`, `registrationAligned` in `src/application/ClientRegistrationStatus.ts`, and Linux `prepare` in `src/process/ProcessOwnershipObservation.ts`. - Contribution scope fit and linked maintainer decision: not applicable (test repair). - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: 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. ## Evidence and regression coverage - Tests added or updated: the three files above. - Base reproduction or other evidence: on db4d3ab (Linux x64, Node 26.12.1), the same three files fail locally with the CI messages above (9 boundary failures, 1 acceptance failure). - User-visible CLI/MCP output (if applicable): not applicable. - Remaining proof gaps: macOS was not run. The macOS branch of `launcherAliasesCli` is unchanged (`PATH=""`). ## Validation performed - `npx vitest run tests/boundary/filesystem/doctorSystemHostFilesystem.test.ts tests/boundary/filesystem/clientConfigurationBom.test.ts` on db4d3ab: 9 failed, 11 passed. With this change: 20 passed. - `npm run build:cached` then `npx vitest run tests/acceptance/setup/launcherAliasesCli.test.ts` on db4d3ab: 1 failed, 7 passed. With this change: 8 passed. - All three files together with this change: 28 passed. - `npm run check:fast` (typecheck and lint): passed. - `npx oxfmt --check` on the changed files: passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Linux x64 only. - Package or release metadata impact: none. - Security, privacy, process, or containment review: test-only. The Linux case symlinks the runner's existing `ps` into its own temporary directory. ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: <!-- @GitHub-handle --> - [ ] 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 <!-- Draft PRs may leave pending items unchecked. Resolve material scope and authority questions before integration. --> - [ ] 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-03 13:39:40 +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#7688
No description provided.