Skip to content

fix(installer): scope agent process conflicts by user - #10689

Draft
prekshivyas wants to merge 2 commits into
mainfrom
codex/fix-10649-user-scoped-agent-check-v2
Draft

fix(installer): scope agent process conflicts by user#10689
prekshivyas wants to merge 2 commits into
mainfrom
codex/fix-10649-user-scoped-agent-check-v2

Conversation

@prekshivyas

Copy link
Copy Markdown
Collaborator

Outcome

Station Express now ignores NemoClaw and OpenShell process signatures owned by another effective user. It still blocks the invoking user's agent processes and host-wide vLLM conflicts.

Reason

The host-preparation process scan did not include ownership. On a shared host, another account's unrelated NemoClaw or OpenShell process could therefore block installation.

Related issues

Fixes #10649

Changes

  • Include effective UID in the existing host process snapshot.
  • Filter agent process conflicts by the invoking shell's effective UID.
  • Preserve host-wide vLLM process and Docker conflict checks.
  • Extend the existing installer regression to prove that the current user's agent blocks while another user's matching process does not appear in the error.

Verification

  • npm run validate:pr - passed against 67d6abeb811296f22cf5c00df5c0fd5536f27bf1 for candidate 65b78f3a1961028ff0556d6fe168f59d62c91b98.
  • Focused installer integration test - 2 passed; 51 skipped.
  • Spark same-user live-process check - exited 1 and reported the expected agent conflict.
  • Spark synthetic cross-user check - exited 0 with agent_inference_workloads=none.
  • Baseline reproduction - exited 1 and reported the unrelated process as an active agent workload.
  • The diff contains no secrets, API keys, or credentials.

Review notes

  • Sensitive path: DGX Station host preparation. The change preserves host-wide vLLM and Docker safety checks; only agent-signature matches gain user ownership filtering.
  • Tested commit: 65b78f3a1961028ff0556d6fe168f59d62c91b98.
  • Tested scenario: DGX Spark GB10, Linux aarch64, direct process-parser and installer-integration boundaries.
  • Result: same-user agent signatures remain blocked; cross-user agent signatures are ignored; cross-user vLLM signatures remain blocked.
  • Supporting evidence: [DGX Station][Onboard] Express install host-prep "Agent workload is active" check is not scoped by user, blocks on unrelated processes #10649 contains the DGX Station GB300 baseline report. Candidate-specific GB300 validation is pending.
  • Maintainer exception: Prekshi Vyas authorized draft publication without candidate-specific GB300 evidence on August 31, 2026. The draft must not become ready for review or merge until maintainers accept this exception or add GB300 evidence.

Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@prekshivyas prekshivyas self-assigned this Aug 31, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 31, 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 Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@github-code-quality

github-code-quality Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 9bed1d7 in the codex/fix-10649-user... branch remains at 96%, unchanged from commit 5fe43c5 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 9bed1d7 in the codex/fix-10649-user... branch remains at 84%, unchanged from commit 5fe43c5 in the main branch.

Show a line coverage summary of the most impacted files.
File main 5fe43c5 codex/fix-10649-user... 9bed1d7 +/-
src/lib/runner.ts 76% 75% -1%
src/lib/onboard...uild-context.ts 74% 74% 0%
src/lib/sandbox...rce-identity.ts 82% 82% 0%

Updated September 01, 2026 01:56 UTC

@prekshivyas
prekshivyas requested a review from cjagwani August 31, 2026 19:48
vllm_port="$((10#$vllm_port))"
processes="$(ps -eo pid=,ppid=,comm=,args=)"
agent_matches="$(awk -v self="$$" -v parent="$PPID" '
processes="$(ps -eo euid=,pid=,ppid=,comm=,args=)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1][Test migration] This changes the mocked ps contract to euid pid ppid comm args, but test/install/install-station-container-coexistence.test.ts:209 and :361 still emit the old pid ppid comm args rows; three other local ps fixtures in that file use the same stale shape. Impact: the tests now interpret the helper PID as owner_uid and skip the row for the wrong reason, so Docker mutation quiescence coverage can stay green without exercising the self/parent exclusion or current parser layout. Smallest safe fix: prefix the affected rows with $EUID and shift the remaining fields to match this five-column schema. Regression: run the coexistence suite and retain its Docker-boundary assertions with correctly shaped current-user process data.

`
MODE=--check
ps() { printf '999 1 openshell openshell gateway\n'; }
ps() { printf '%s 999 1 openshell openshell gateway\n%s 1000 1 node node /home/other/.nemoclaw/openshell gateway\n' "$EUID" "$((EUID + 1))"; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1][Security regression coverage] This fixture combines same-user PID 999 with cross-user PID 1000, then expects the same-user fatal path. Impact: it never proves the changed allow case; a separate cross-user blocking path or state could remain and this test would still pass as long as PID 1000 is omitted from the first error. Smallest safe fix: add a separate behavior test with only a different-EUID openshell or nemoclaw row, an empty ss, and a direct check_agent_and_inference_conflicts call; assert exit 0, agent_inference_workloads=none, and no agent-workload error. Regression: keep this same-user denial case and make the cross-user-only success path a checked-in test.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes at exact head 65b78f3. The effective-UID production filter is direct and preserves host-wide vLLM and Docker checks, but two current-head P1 test blockers leave the safety contract unproven: (1) the changed test combines same-user and cross-user agents and therefore never proves that a cross-user-only agent permits progress; (2) Docker-mutation coexistence fixtures still emit the old four-column process rows, so they skip helper rows for the wrong reason under the new five-column parser. Add the separate successful cross-user-only regression and migrate the affected process fixtures. Exact-head evidence: 72 focused installer and coexistence tests pass, a direct synthetic cross-user-only probe exits 0 with agent_inference_workloads=none, diff hygiene is clean, the commit is GitHub Verified, and DCO, required CI, CodeQL, all nine Advisor specialists, and the full automated matrix are green. CodeRabbit is paused because this is a draft. Candidate-specific GB300 validation or explicit maintainer acceptance of the recorded exception is also still required before the draft becomes ready for review or merge.

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewing exact head 9bed1d74c17ade9108874d997aedab9e77c52ace. This is a merge-from-main head; the two PR files are byte-for-byte unchanged from the previously reviewed head, so both P1 blockers remain:

  • [P1] The current test combines a same-user agent with a cross-user agent, then exits on the same-user blocker. It never proves the accepted #10649 behavior that a cross-user agent by itself permits preparation. Please add a separate cross-user-only success regression. Existing thread: #10689 (comment)
  • [P1] Five coexistence fixtures still emit the old four-column ps rows while the production parser now requires euid,pid,ppid,comm,args. Those fixtures bypass check_agent_and_inference_conflicts and can let Docker-mutation tests pass for the wrong reason. Update every affected row and assert the intended mutation/baseline gate is reached. Existing thread: #10689 (comment)

Exact-head local evidence: build:cli passed; 53 host-preparation tests passed; 19 container-coexistence tests passed; Vitest project membership is exact; diff hygiene passed. DCO is green and both commits are GitHub Verified. All nine current-head Advisor specialists failed before analysis because the shared inference endpoint returned HTTP 429; I safely reran only those infrastructure failures. CodeRabbit is paused while this is draft. Candidate-specific GB300 validation, or explicit maintainer acceptance of that validation exception, also remains required before this can leave draft or merge.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 9bed1d7. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DGX Station][Onboard] Express install host-prep "Agent workload is active" check is not scoped by user, blocks on unrelated processes

2 participants