Skip to content

test(onboard): avoid host PID collisions in gateway fixture - #11934

Merged
jyaunches merged 1 commit into
mainfrom
codex/isolate-host-gateway-process-fixture
Sep 16, 2026
Merged

jyaunches merged 1 commit into
mainfrom
codex/isolate-host-gateway-process-fixture

Conversation

@jyaunches

@jyaunches jyaunches commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

The gateway-absence test uses a fixture PID that cannot be occupied by a normal Linux process. Its command-line assertion now consistently observes the mocked gateway.

Reason

PR #11876 CI shard 1 returned null where the test expected a live gateway. The test mocked ps for PID 4343, but the implementation reads /proc/<pid>/cmdline first. A real process with that PID can override the mock. The source and test were unchanged from base 2fd6903328a66de8256f4b5b300c2ec639e1fa01.

Changes

Use PID 9999434, following the high-PID convention already used by neighboring tests. Keep the PID consistent across discovery, process status, ownership, command-line responses, and the assertion. Production behavior is unchanged.

Verification

  • Reviewed commit: eea6f9565d94c53bd7caa262197d6f3ecc938ec5.

  • Normal pre-push publication validation and all three TypeScript hooks passed.

  • Normal signed-commit hooks passed, including formatting, lint, repository checks, secret scanning, source-shape and growth guards.

  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli — passed after the default heap was exhausted.

  • Reproduced the failure mechanism: the original fixture reports a live gateway normally, but returns null when an unrelated /proc/4343/cmdline is present.

  • npx --no-install vitest run --project cli src/lib/onboard/host-gateway-process.test.ts — all 23 tests passed.

  • Inspected neighboring process fixtures; they already use the high-PID convention.

  • git diff --check — passed. The diff contains no secrets, API keys, or credentials.

  • CI run 35130323227: all 12 CLI shards passed, including all 23 gateway process tests; plugin tests, installer integration, static checks and type checks passed. Aggregate coverage failed on unchanged MCP lock-storage code: 54.45% branch coverage against 60%. PR #11921 contains the existing coverage repair; this PR remains draft pending that dependency.

  • Image workflow 35130323159 — passed, including exact published-image activation for OpenClaw, Hermes, and Deep Agents. All nine recorded cleanup actions passed with no cleanup failures.

Review notes

Sensitive path in NVIDIA/NemoClaw: src/lib/onboard/host-gateway-process.test.ts. Self-review covers the complete test-only diff, the command-line lookup order, and neighboring fixtures. All nine hosted Advisor specialists are clear for this commit in run 35132304913. Their findings and E2E recommendations were read in full; the deterministic plan and every specialist select no additional live E2E for this fixture-only change. CodeRabbit skipped the draft; no CodeRabbit review or merge approval is claimed.


Signed-off-by: Julie Yaunches jyaunches@nvidia.com

Summary by CodeRabbit

  • Tests
    • Improved process validation test reliability by using a high synthetic process ID and matching assertions dynamically.

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1d80f25e-1d55-441a-89eb-94cda57dbcd7

📥 Commits

Reviewing files that changed from the base of the PR and between fc8a179 and eea6f95.

📒 Files selected for processing (1)
  • src/lib/onboard/host-gateway-process.test.ts

📝 Walkthrough

Walkthrough

Changes

Process test updates

Layer / File(s) Summary
Synthetic PID test checkpoint
src/lib/onboard/host-gateway-process.test.ts
The live-process rejection test uses PID 9999434 in mocked process responses and the rejection assertion.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: ericksoa

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/isolate-host-gateway-process-fixture

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit eea6f95 in the codex/isolate-host-g... branch remains at 96%, unchanged from commit 2fd6903 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit eea6f95 in the codex/isolate-host-g... branch remains at 83%, unchanged from commit 5ed0887 in the main branch.

Show a line coverage summary of the most impacted files.
File main 5ed0887 codex/isolate-host-g... eea6f95 +/-
src/lib/onboard.../application.ts 72% 55% -17%
src/lib/actions...oy-execution.ts 93% 78% -15%
src/lib/readine...y-production.ts 90% 76% -14%
src/lib/onboard...able-receipt.ts 84% 72% -12%
src/lib/state/p...l-retirement.ts 86% 78% -8%
src/lib/onboard...al-inference.ts 86% 80% -6%
src/lib/actions...dbox/connect.ts 88% 85% -3%
src/lib/inferen...er-lifecycle.ts 70% 77% +7%
src/lib/onboard...uild-context.ts 74% 87% +13%
src/lib/adapter...ifecycle-cli.ts 0% 100% +100%

Updated September 16, 2026 18:03 UTC

@jyaunches
jyaunches marked this pull request as ready for review September 16, 2026 18:21
@jyaunches
jyaunches merged commit a47703e into main Sep 16, 2026
98 of 102 checks passed
@jyaunches
jyaunches deleted the codex/isolate-host-gateway-process-fixture branch September 16, 2026 18:21
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance platform: linux Affects non-Ubuntu Linux environments labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance platform: linux Affects non-Ubuntu Linux environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants