Skip to content

fix(ci): select migrated E2E parity entrypoint - #7025

Merged
cv merged 4 commits into
mainfrom
codex/fix-trusted-e2e-mock-entrypoint
Jul 16, 2026
Merged

fix(ci): select migrated E2E parity entrypoint#7025
cv merged 4 commits into
mainfrom
codex/fix-trusted-e2e-mock-entrypoint

Conversation

@cv

@cv cv commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

The base-trusted CLI coverage action currently hardcodes the TypeScript E2E parity entrypoint. Select the migrated .mts entrypoint when present, retain the .ts path for merge commits on the earlier layout, and fail clearly when neither trusted path exists.

Related Issue

Unblocks #6940.

Changes

  • Prefer scripts/checks/e2e-mock-parity.mts and fall back to scripts/checks/e2e-mock-parity.ts in the trusted CLI coverage shard.
  • Fail closed with an explicit workflow annotation when neither expected entrypoint exists.
  • Exercise .mts preference, .ts compatibility, and missing-entrypoint rejection at the composite-action boundary, replacing the prior hardcoded command-text assertion.

The compatibility fallback is required because the base-trusted action validates merge commits on both sides of the .ts to .mts migration. test/e2e-mock-parity.test.ts protects that transition contract.

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 an internal trusted CI action and regression tests only; the documentation assessment found no user-facing behavior or workflow change.
  • 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: The action remains base-trusted, selects only two fixed repository paths, quotes the selected path, and fails closed if both are absent; the maintainer authorized publishing this prerequisite on 2026-07-16.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

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 check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run test/e2e-mock-parity.test.ts test/pr-workflow-contract.test.ts (30 passed); npm run test-conditionals:scan -- --top 25 reports no if statements in the changed test; npm run source-shape: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: Not applicable; the focused CI contract is covered by targeted tests and npm run check:diff.
  • 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: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved E2E mock parity validation by automatically preferring the .mts entrypoint and falling back to .ts.
    • Added a clear error when no valid E2E mock parity entrypoint is available.
  • Tests
    • Expanded CI workflow tests to verify correct entrypoint selection, command invocation, and the failure path when the entrypoint is missing.
    • Updated PR workflow contract checks to assert the computed base/head values rather than a single hard-coded command.

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

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CI parity validation step prefers .mts, falls back to .ts, and fails explicitly when neither exists. Tests cover selection, failure handling, and workflow argument setup.

Changes

E2E parity entrypoint selection

Layer / File(s) Summary
Entrypoint selection in CI
.github/actions/ci-cli-coverage-shard/action.yaml
The parity step checks for .mts, falls back to .ts, reports missing entrypoints, and runs the selected script with --base and --head.
Entrypoint selection test coverage
test/e2e-mock-parity.test.ts, test/pr-workflow-contract.test.ts
Tests validate extension preference, fallback, missing-entrypoint failure, command logging, and base/head variable assignments.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI parity step
  participant Filesystem
  participant npx tsx
  CI parity step->>Filesystem: Check .mts entrypoint
  Filesystem-->>CI parity step: Return available path or continue
  CI parity step->>Filesystem: Check .ts fallback
  Filesystem-->>CI parity step: Return available path or missing
  CI parity step->>npx tsx: Run selected parity script with --base and --head
Loading

Possibly related PRs

  • NVIDIA/NemoClaw#6940: Updates the same parity workflow step toward the .mts entrypoint.
  • NVIDIA/NemoClaw#6969: Updates related CI entrypoint selection and workflow contract tests for the .mts migration pattern.

Suggested labels: area: e2e, refactor

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: CI now selects the migrated E2E parity entrypoint with fallback behavior.
✨ 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-trusted-e2e-mock-entrypoint

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

@github-code-quality

github-code-quality Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the codex/fix-trusted-e2... branch remains at 80%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main d034b7f codex/fix-trusted-e2... fecc4dd +/-
src/lib/core/pr...mpt-activity.ts 92% 67% -25%
src/lib/credentials/store.ts 64% 59% -5%
src/lib/state/registry.ts 83% 86% +3%
src/lib/domain/.../connect-env.ts 89% 97% +8%

Updated July 16, 2026 17:41 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/pr-workflow-contract.test.ts (1)

978-980: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the implementation-coupled shell-text assertions.

These checks can pass even if fallback ordering or missing-entrypoint rejection is broken. The process-level suite already verifies those observable outcomes, so rely on it instead.

As per path instructions, “Prefer observable outcomes through the public boundary over source-text assertions.”

Proposed cleanup
-    expect(parityStep.run).toContain("parity_check=scripts/checks/e2e-mock-parity.mts");
-    expect(parityStep.run).toContain("parity_check=scripts/checks/e2e-mock-parity.ts");
-    expect(parityStep.run).toContain('npx tsx "$parity_check" --base "$base" --head "$head"');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/pr-workflow-contract.test.ts` around lines 978 - 980, Remove the three
shell-text assertions from the parity workflow contract test around
parityStep.run, and rely on the existing process-level tests that verify
fallback ordering and missing-entrypoint rejection through observable behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/pr-workflow-contract.test.ts`:
- Around line 978-980: Remove the three shell-text assertions from the parity
workflow contract test around parityStep.run, and rely on the existing
process-level tests that verify fallback ordering and missing-entrypoint
rejection through observable behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e719343f-e155-4d55-99a8-4e129a635feb

📥 Commits

Reviewing files that changed from the base of the PR and between 032d7fa and edc7f45.

📒 Files selected for processing (3)
  • .github/actions/ci-cli-coverage-shard/action.yaml
  • test/e2e-mock-parity.test.ts
  • test/pr-workflow-contract.test.ts

@cv cv added the v0.0.85 label Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

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 match; 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: None

Workflow run details

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

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

@apurvvkumaria apurvvkumaria 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.

Security review clean on exact head fecc4dd. The trusted action selects only fixed, quoted repository paths, prefers the migrated .mts entrypoint, retains the bounded .ts fallback, and fails closed when neither exists. Observable tests cover preference, fallback, and rejection. No secrets, permission expansion, dependency change, unsafe interpolation, or error-handling regression found; exact-head CI, CodeQL, E2E, and both automated advisors are green.

@cv
cv merged commit 41a5885 into main Jul 16, 2026
52 checks passed
@cv
cv deleted the codex/fix-trusted-e2e-mock-entrypoint branch July 16, 2026 19:54
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression 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 area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants