Skip to content

test(windows): select the Windows host through HOST_PLATFORM in the native-control capability test - #11088

Merged
morluto merged 1 commit into
mainfrom
test/host-platform-stub-injection
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
test/host-platform-stub-injection

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

tests/process-global/windowsNativeControlCapability.test.ts fails on main: it selects Windows by redefining process.platform, but since #11038 src/process takes the host from the frozen HOST_PLATFORM, so the owned launcher never takes the Windows native path. The test now mocks HOST_PLATFORM (the pattern src/process/ProcessOwnership.movedProbe.test.ts already uses) and exercises the same refusal again. HostPlatform migration (W8) follow-up.

Problem and expected behavior

Observed on main (29dd58c): the test expects capability_unavailable ("does not support Job Object memory limits") and receives the unclassified execution_failure. Expected: an admitted Windows artifact without the Job Object memory-limit control is refused before any native launch.

Change and scope

  • vi.mock("../../src/platform/HostPlatform.js") selects { platform: "win32", architecture: "x64" }; the process.platform redefinition and its restore are removed.
  • Not included: production changes. The other tests that still redefine process.platform pass on main (their modules still read it) and move with their folders' migrations.
  • Scope: test-only.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/platform/HostPlatform (test seam only).
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged.
  • 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 updated: tests/process-global/windowsNativeControlCapability.test.ts.
  • Base reproduction or other evidence: executed; fails on main as described above, passes with this change.
  • User-visible CLI/MCP output (if applicable): none.
  • Remaining proof gaps: none known.

Validation performed

  • npm run test:focused -- every test file that redefines process.platform/process.arch (23 files) on main — 22 passed, windowsNativeControlCapability.test.ts failed.
  • npm run test:focused -- tests/process-global/windowsNativeControlCapability.test.ts with this change — 1 passed.
  • npx oxfmt --check, npx oxlint on the file — passed; pre-push hook passed.

Compatibility, safety, and release

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

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.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T12:05:08.736022Z
We couldn’t complete this review. Comment @codex review to try again.
c64fa36 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The test-only change appears safe to merge.

Summary

Updates the Windows capability test to select its host through HOST_PLATFORM instead of changing process.platform.

  • The native-control test selects Windows through HOST_PLATFORM.

Reviews (2) · Last reviewed commit: "test(windows): select the Windows host t..." · Reviewed by Greptile

@morluto
morluto merged commit de7d4de into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the test/host-platform-stub-injection branch November 15, 2026 12:20
@morluto morluto added the area: tests Test suite and verification label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant