Skip to content

ci: finish executable workflow extraction - #7737

Merged
cv merged 2 commits into
codex/issue-6958-trusted-helperfrom
codex/issue-6952-completion-v2
Jul 28, 2026
Merged

ci: finish executable workflow extraction#7737
cv merged 2 commits into
codex/issue-6958-trusted-helperfrom
codex/issue-6952-completion-v2

Conversation

@cv

@cv cv commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

This replacement stacked PR completes #6952 by extracting the remaining repeated Windows and WSL setup and command construction. It uses the trusted helper from #7719 and restores the reviewed #7709 diff after #7709 merged into its staging branch.

Related Issue

Fixes #6952
Fixes #6958
Replaces staged PR #7709
Depends on #7719

Changes

Type of Change

  • Code
  • Documentation
  • Tests only
  • Other

Quality Gates

  • Tests added or updated for changed behavior
  • Documentation is not applicable because this changes internal CI only
  • Sensitive paths changed
  • Sensitive-path review completed: the exact c1f34675d1025b7f189938977cf6158efdc66b4c patch is byte-for-byte identical to reviewed ci: finish executable workflow extraction #7709 commit df3bcdcdd; targeted boundary review covers trusted provenance, fail-closed loading, bidirectional overlap, quoting, encoding, needs interpolation, and root/non-root separation
  • Non-success behavior changed

Documentation Writer Review

  • Documentation writer review completed

Result: no-docs-needed

Evidence: Reviewed exact head c1f34675d1025b7f189938977cf6158efdc66b4c against base e69d9c3d94623a0cd499fb2c84f33f88c863c631. The expected nine files match the binary patch SHA-256 for reviewed #7709 commit df3bcdcdd; no user-facing documentation changes are required. Focused tests passed 50 cases with 12 PowerShell cases skipped because PowerShell is unavailable locally. CLI type-check and exact-base diff checks passed.

Agent surface: Codex Desktop

DGX Station Test Evidence

Not applicable.

Verification

  • DCO declaration is included and every commit is GitHub Verified
  • Normal commit and pre-push hooks passed
  • Targeted tests passed: 50 passed; 12 PowerShell cases skipped locally because PowerShell is unavailable
  • CLI type-check and exact-base diff checks passed
  • Broad test suite passed
  • Quality gates above are complete
  • No secrets, API keys, or credentials are committed
  • User-facing documentation was updated
  • Documentation build passed

Signed-off-by: Carlos Villela cvillela@nvidia.com

<!-- markdownlint-disable MD041 -->
## Summary

This stacked PR completes #6952 by extracting the remaining repeated
Windows/WSL setup and command construction. It uses the trusted
PowerShell helper bootstrapped by #7719, switches both workflow
consumers to that trusted boundary, and fails closed if the helper is
absent. It also passes the `needs` context through environment data
instead of interpolating it into GitHub Script source.

## Related Issue

Fixes #6952
Fixes #6958

## Changes

- Use `tools/wsl/ci-helper.ps1`, bootstrapped by #7719, for the WSL E2E
and platform Vitest workflows. Both consumers require the same distro
setup, script transfer, Node.js installation, and ext4 checkout
synchronization. Keeping this logic inline duplicated the
security-sensitive command boundary; the helper and workflow regression
tests protect the shared behavior and connection.
- Load the helper through mandatory sparse checkouts at the PR base SHA
or workflow SHA before the candidate checkout. Both workflows fail
closed if the trusted helper is missing; the workflow boundary tests
protect the trusted-source requirement.
- Pass `needs` JSON through `NEEDS_JSON` and parse it inside GitHub
Script. The E2E operations boundary rejects direct expression
interpolation.
- Reduce nonblank executable lines from 191 to 80 in `wsl-e2e.yaml` and
from 228 to 129 in `platform-vitest-main.yaml`. Keep the root-only test
selection inline with an adjacent rationale.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This changes internal CI
workflows and their tests. It does not change a CLI, configuration,
supported integration, or end-user contract.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: At stacked PR SHA
`d6662d367`, targeted boundary review and tests verify trusted helper
provenance, fail-closed loading, bidirectional checkout/workdir overlap
rejection, command quoting, script encoding, credential-data
interpolation, and root/non-root separation.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: At exact head `d6662d367`, the exact-base diff against
helper head `3a5ebeb2f` contains the expected nine internal workflow,
validator, trigger, and regression-test files. The reviewed overlap
guard is present in both head and base, so helper files do not appear in
this PR diff. No documentation sources changed; focused tests, CLI
type-checking, and the exact-base diff check passed.
- Agent: Codex Desktop
<!-- docs-review-head-sha: d6662d3 -->
<!-- docs-review-agents-blob-sha:
be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: The
combined focused run passed 50 tests across the platform workflow,
watch-trigger, and E2E boundary suites. It also discovered twelve
PowerShell helper tests and skipped them locally because PowerShell is
unavailable. `npm run typecheck:cli`, the exact-base diff check, normal
commit hooks, and the pre-push TypeScript check passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved reliability and orchestration of WSL-based test runs with
clearer conditional execution and safer setup/sync.
* **Security**
* Strengthened workflow-boundary enforcement so `needs` is provided via
`env` and parsed as JSON (no inline interpolation).
  * Routed WSL provisioning/execution through a trusted helper path.
* **Tests**
* Expanded CI, boundary, and trusted-helper suite coverage for script
generation, path handling, and failure propagation.
  * Updated workflow trigger mappings to include the trusted helper.
* **Chores**
  * Consolidated WSL workflow logic into the shared trusted helper flow.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 042cb532-ae7b-4c23-8dc3-20f60c693c7f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-6952-completion-v2

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

@github-code-quality

github-code-quality Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit d9c98be in the codex/issue-6952-com... branch remains at 96%, unchanged from commit bb90f3a in the codex/issue-6958-tru... branch.


Updated July 28, 2026 15:33 UTC

@cv cv mentioned this pull request Jul 28, 2026
23 tasks
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-inference, cloud-onboard, security-posture

Workflow run details

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

@cv cv added the v0.0.97 label Jul 28, 2026
@cv
cv merged commit 614268d into codex/issue-6958-trusted-helper Jul 28, 2026
46 of 48 checks passed
@cv
cv deleted the codex/issue-6952-completion-v2 branch July 28, 2026 15:38
cv added a commit that referenced this pull request Jul 28, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the tested WSL provisioning helper to a trusted `main` revision
before consumer workflows adopt it. This helper-only PR is the first
stage of #6958 so root-capable WSL execution can fail closed until the
helper is present on `main`.

## Related Issue

Part of #6958
Parent: #6952
Previous staged extraction: #7709 (merged into this branch and reverted)
Previous replacement extraction: #7737 (merged into this branch and
reverted)
Next step: recreate the extraction directly from `main` after this PR
lands

## Changes

- Add `tools/wsl/ci-helper.ps1` for WSL path conversion, LF-safe script
transfer, command construction, distro provisioning, Node.js
installation, and ext4 checkout synchronization.
- Add direct PowerShell batch tests for quoting, spaces, drive-letter
conversion, LF encoding, optional-argument binding, deletion-path
restrictions, install retry behavior, exit propagation, and
temporary-script cleanup on success and failure.
- Bootstrap the helper separately because #6958 requires the helper to
be trusted before root-capable WSL execution. A combined first change
cannot satisfy that requirement because its pull-request base does not
yet contain the helper.
- Preserve the audit trail with signed, non-force reverts after #7709
and #7737 were merged into this staging branch. The resulting PR diff is
helper-only again.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This adds an internal CI
helper and direct tests. Consumer workflow adoption will be recreated in
a separate PR after this helper lands, so no user-facing or
contributor-facing contract changes here.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: Codex security review
at `3a5ebeb2f` passed all nine categories, and the helper files at
`92507d621` are byte-for-byte unchanged. The helper keeps WSL arguments
separate and quotes shell values. Sync deletion is limited to one
positive run-ID/attempt child under the two workflow-owned roots and
fails closed for symlinked roots, bidirectional checkout overlap,
traversal, and unrelated paths. Package and owner inputs are validated,
pinned Node.js archives are verified, transferred scripts are deleted in
`finally`, and direct tests protect these boundaries.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`; writing review passed with no findings
- Evidence: At exact head `92507d621762bb77ac7e76baf50d9a7c6ee87f28` and
base `bbdd85008c34503ea47d4a80d57e90074ff3c79e`, the exact-base diff
adds only `tools/wsl/ci-helper.ps1` and `test/wsl-ci-helper.test.ts`.
Both match the previously reviewed helper tree. No documentation sources
or user-facing contracts changed. Twelve PowerShell cases were
discovered and skipped because PowerShell is unavailable locally; source
architecture checks, CLI type-check, normal hooks, and diff check
passed.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 92507d6 -->
<!-- docs-review-agents-blob-sha:
be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: The
focused integration command collected all twelve direct PowerShell cases
and skipped them because PowerShell is unavailable locally; PR CI runs
them on a PowerShell-capable shard. `npm run checks`, `npm run
typecheck:cli`, normal hooks, and the diff check passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a Windows-to-WSL CI helper that generates Ubuntu provisioning
and checkout-sync scripts, provisions apt dependencies, and installs a
pinned Node.js version in the target distro.
* Added strict Windows path conversion to `/mnt/...`, safe bash literal
escaping, and LF-only UTF-8 script writing without a byte-order mark.
* Improved WSL distro install robustness with bounded retries and safe
checkout workdir validation.
* **Tests**
* Added Vitest coverage for conversions, WSL argument construction,
generated scripts, distro retry recovery, workdir rejection, exit
propagation, and temporary-script cleanup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv mentioned this pull request Jul 28, 2026
23 tasks
cv added a commit that referenced this pull request Jul 28, 2026
<!-- markdownlint-disable MD041 -->
## Summary

This PR completes #6952 and #6958 by moving repeated Windows and WSL
executable logic into the trusted helper from #7719. It recreates the
#7737 extraction directly on `main` after the helper landed.

## Related Issue

Fixes #6952
Fixes #6958

## Changes

- Use `tools/wsl/ci-helper.ps1` for WSL E2E and platform Vitest setup,
script transfer, Node.js installation, and ext4 checkout
synchronization. The workflow regression tests protect both consumers.
- Load the helper from the PR base SHA or workflow SHA before candidate
checkout. Both workflows fail if the trusted helper is missing.
- Pass `needs` through `NEEDS_JSON` instead of interpolating GitHub
expressions into executable source. The E2E operations boundary test
rejects direct interpolation.
- Validate through the TypeScript AST that `needs` receives the parsed
environment value. Isolated tests reject comments, unrelated
assignments, and malformed wiring.
- Update watch triggers and the source-shape budget for the extracted
logic.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This PR changes internal CI
workflows and tests. It does not change a CLI, configuration, supported
integration, or user-facing contract.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: The trusted helper is
loaded from the base or workflow SHA before candidate checkout. Focused
tests verify trusted provenance, failure when the helper is missing,
path overlap rejection, quoting, encoding, `needs` assignment and
interpolation, and root separation.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Reviewed head `b56897529e166385464c7e8ec051174f3af4f2aa`
against base `c3ab0526eba41d1c681e92bbad3d174925aeaa6a`. The AST
validator and its regressions change internal CI security enforcement
only. No documentation source or user-facing contract changed. The
review-fix suite passed 45 tests. Biome, repository checks, CLI
type-checking, the diff check, source-shape budget, title check,
gitleaks, and commitlint passed.
- Agent: Codex Desktop
<!-- docs-review-head-sha: b568975 -->
<!-- docs-review-agents-blob-sha:
be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: The
original focused suite passed 50 tests and skipped 12 PowerShell-only
tests. After the review fix, the E2E operations boundary suite passed 45
tests. `npx biome check` for the changed files, `npm run checks`, `npm
run typecheck:cli`, and `git diff --check` passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cjagwani cjagwani added v0.0.98 and removed v0.0.97 labels Jul 28, 2026
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance labels Jul 29, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants