Skip to content

test(skills): isolate triage subprocess options - #9210

Merged
senthilr-nv merged 1 commit into
mainfrom
codex/fix-triage-runtime-node-options
Aug 15, 2026
Merged

test(skills): isolate triage subprocess options#9210
senthilr-nv merged 1 commit into
mainfrom
codex/fix-triage-runtime-node-options

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

The maintainer triage runtime test now isolates its standalone Node process from Vitest's inherited NODE_OPTIONS. This prevents the test runner's source-require hook from rewriting the script's ./shared.ts import to missing ./shared.js in CLI shard 12.

Affected evidence:

Both jobs failed the same three assertions in test/skills/triage-runtime.test.ts.

Related Issue

No issue. This is a shared required-check blocker for #9199 and #9204.

Changes

  • Clear inherited NODE_OPTIONS only for the spawned standalone triage process, which already receives its required Node arguments explicitly.
  • Include child stderr as assertion context when the spawned process exits unsuccessfully.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: this changes only a test-owned subprocess environment and its failure diagnostics.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: the change is confined to test subprocess isolation and failure context; it changes no supported command, behavior, configuration, API, policy, or documentation contract.
  • Agent: Codex Desktop (/root/openclaw_docs_review)

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — the focused integration file failed 3/3 before the fix with missing ./shared.js and passed 3/3 at commit under review df3c9723
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — full npm run validate:pr passed at commit under review df3c9723
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Senthil Ravichandran senthilr@nvidia.com

Summary by CodeRabbit

  • Tests
    • Improved diagnostics for runtime triage test failures by including captured error output in assertion messages.
    • Ensured test subprocesses run without inherited NODE_OPTIONS while preserving the mocked execution path.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@copy-pr-bot

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

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 899f2278-2bc4-44f9-a468-d7e07709dee1

📥 Commits

Reviewing files that changed from the base of the PR and between 815bdd5 and df3c972.

📒 Files selected for processing (1)
  • test/skills/triage-runtime.test.ts

📝 Walkthrough

Walkthrough

The triage runtime tests now clear NODE_OPTIONS, preserve the mocked PATH, and include subprocess stderr in three exit-status assertion messages.

Changes

Triage runtime test updates

Layer / File(s) Summary
Runtime environment and assertion diagnostics
test/skills/triage-runtime.test.ts
The spawned triage process clears NODE_OPTIONS and retains the mocked gh binary in PATH. Three successful-exit assertions now report subprocess stderr on failure.

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

Merge Risk: ⚪ Minimal · up to df3c9

The change isolates the standalone triage test process from inherited Node options and improves failure context without changing product behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: aasthajh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: isolating options for the triage subprocess test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-triage-runtime-node-options

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

@senthilr-nv senthilr-nv self-assigned this Aug 15, 2026
@senthilr-nv
senthilr-nv marked this pull request as ready for review August 15, 2026 07:40
@senthilr-nv
senthilr-nv requested a review from cv August 15, 2026 07:40
@github-code-quality

github-code-quality Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit df3c972 in the codex/fix-triage-run... branch remains at 96%, unchanged from commit 815bdd5 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit df3c972 in the codex/fix-triage-run... branch remains at 82%, unchanged from commit 5b1cf3a in the main branch.

Show a code coverage summary of the most impacted files.
File main 5b1cf3a codex/fix-triage-run... df3c972 +/-
src/lib/actions...ld-mcp-phase.ts 98% 87% -11%
src/lib/cua/bounded-file.ts 94% 84% -10%
src/lib/actions...er-lifecycle.ts 94% 85% -9%
src/lib/cua/run...ime-manifest.ts 91% 84% -7%
src/lib/onboard...file-builder.ts 95% 91% -4%
src/lib/state/o...d-checkpoint.ts 90% 86% -4%
src/lib/trace.ts 94% 90% -4%
src/lib/onboard...press-resume.ts 79% 82% +3%
src/lib/onboard...ce-lifecycle.ts 89% 93% +4%
src/lib/onboard...der/snapshot.ts 75% 83% +8%

Updated August 15, 2026 07:52 UTC

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Test inherited NODE_OPTIONS isolation

  • Location: test/skills/triage-runtime.test.ts:140
  • Category: tests
  • Problem: The helper clears NODE_OPTIONS for every child process, but no test supplies an inherited Node.js hook and verifies that the child process does not load it.
  • Impact: A future change can remove or reorder the environment override and reintroduce test-runner hook interference without a behavior-specific regression failure.
  • Recommendation: Add one runTriage case that supplies a temporary --require hook through the parent environment, records hook execution, and verifies triage succeeds while the record remains absent.
  • Verification: Read the new case and confirm that its hook would create an observable record if the child inherited NODE_OPTIONS.
  • Test coverage: A runtime test that sets an inherited NODE_OPTIONS --require hook, invokes runTriage, and asserts the hook did not execute in the spawned triage process.
  • Evidence: test/skills/triage-runtime.test.ts:138-142 sets NODE_OPTIONS to an empty string for the spawned process. test/skills/triage-runtime.test.ts:150-202 contains the existing runtime cases; none supplies an inherited NODE_OPTIONS hook.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 15, 2026 07:53
@senthilr-nv
senthilr-nv merged commit 47756fb into main Aug 15, 2026
74 of 78 checks passed
@senthilr-nv
senthilr-nv deleted the codex/fix-triage-runtime-node-options branch August 15, 2026 10:15
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants