Skip to content

fix(ci): clarify selective E2E scorecards#3735

Merged
jyaunches merged 1 commit into
NVIDIA:mainfrom
jyaunches:fix/nightly-scorecard-selective-context
May 19, 2026
Merged

fix(ci): clarify selective E2E scorecards#3735
jyaunches merged 1 commit into
NVIDIA:mainfrom
jyaunches:fix/nightly-scorecard-selective-context

Conversation

@jyaunches

@jyaunches jyaunches commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • label nightly scorecards as scheduled full nightly, manual full run, or selective dispatch
  • include requested job names for selective E2E advisor/manual dispatches
  • suppress prior-day trend wording for selective dispatches where it is misleading

Validation

  • git diff --check
  • npm test -- test/validate-e2e-coverage.test.ts (fails locally: vitest not installed after pnpm attempted install and hit ERR_PNPM_IGNORED_BUILDS)

Summary by CodeRabbit

  • Improvements

    • Nightly E2E reporting enhanced: scorecards now show run mode, include requested-jobs for selective dispatch, and adjust trend reporting for selective/manual vs scheduled runs.
  • Chores

    • Streamlined guidance for maintaining E2E coverage and updating aggregate reporting lists.
  • Tests

    • Validation tests refocused to check selective-dispatch guards and that aggregate reporting jobs depend on all nightly E2E jobs.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR makes the nightly-e2e scorecard dispatch-aware (parses workflow_dispatch inputs, identifies selective dispatch, conditionally omits trend fetching, and annotates run mode/requested jobs), refocuses the validation test to internal workflow consistency, and shortens .coderabbit.yaml path guidance to note updating aggregate job needs when jobs change.

Changes

Selective E2E Dispatch Support

Layer / File(s) Summary
Scorecard selective dispatch logic
.github/workflows/nightly-e2e.yaml
Added dispatch detection and conditional trend reporting. The scorecard parses inputs.jobs when github.event_name === 'workflow_dispatch', determines selective vs full runs, skips prior-run API calls for selective dispatch, and updates scorecard output to prepend run mode and requested jobs. Trend is shown only for full runs.
Workflow validation test refocus
test/validate-e2e-coverage.test.ts
Removed CodeRabbit coverage cross-checks and filesystem glob logic; now asserts nightly-e2e.yaml internal consistency: each nightly job has the selective dispatch if guard and aggregate jobs (notify-on-failure, report-to-pr, scorecard) list all nightly jobs in needs.
CodeRabbit path instructions
.coderabbit.yaml
Simplified path guidance for nightly-e2e.yaml by removing prior coverage verification steps and emphasizing that renaming/removing E2E jobs requires updating aggregate job needs lists.

Sequence Diagram

sequenceDiagram
  participant GitHubEvent as GitHub Event
  participant Scorecard as Scorecard Script
  participant GitHubAPI as GitHub API
  participant Output as Scorecard Output

  GitHubEvent->>Scorecard: github.event_name, inputs.jobs
  alt github.event_name == 'workflow_dispatch'
    Scorecard->>Scorecard: parse inputs.jobs -> requestedJobs
    Scorecard->>Scorecard: isSelectiveDispatch = requestedJobs < allNightlyJobs
    alt isSelectiveDispatch
      Scorecard->>Output: prepend "Run mode: selective dispatch"
      Scorecard->>Output: include requestedJobs list
      Scorecard->>Output: "trend not shown"
    else manual full run
      Scorecard->>Output: prepend "Run mode: manual full run"
      Scorecard->>GitHubAPI: fetch recent scheduled completed runs (trend)
      GitHubAPI->>Scorecard: recent run data
      Scorecard->>Output: add trend label (stable/improving/degrading)
    end
  else scheduled run
    Scorecard->>Output: prepend "Run mode: scheduled full nightly"
    Scorecard->>GitHubAPI: fetch recent scheduled completed runs (trend)
    GitHubAPI->>Scorecard: recent run data
    Scorecard->>Output: add trend label (stable/improving/degrading)
  end
  Scorecard->>Output: add job counters (run/pass/fail/cancel/skipped)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#3426: Related selective dispatch support and job-selection behavior in the nightly E2E workflow.
  • NVIDIA/NemoClaw#3401: Related updates to nightly pipeline aggregate job dependencies and selectable E2E runs.
  • NVIDIA/NemoClaw#3411: Overlaps on removal of a nightly job and corresponding updates to aggregate needs: lists.

Suggested reviewers

  • cv
  • ericksoa

Poem

🐰 I parsed the jobs the night before dawn,
Selective runs skip trends and carry on,
Tests tightened to check the workflow's frame,
Aggregate needs list every job by name,
Hooray — the nightly scorecard sings again!

🚥 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 'fix(ci): clarify selective E2E scorecards' directly relates to the main change: updating nightly E2E scorecard behavior to clarify run modes (scheduled/manual/selective) and suppress misleading trend messaging.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In @.github/workflows/nightly-e2e.yaml:
- Line 2319: The embedded workflow input is not escaped and may break JS
parsing; change the interpolation that sets requestedJobsRaw (variable
requestedJobsRaw) to serialize the input safely before embedding by replacing
the direct '${{ inputs.jobs }}' insertion with a JSON-escaped form (use the
existing safe pattern `${{ toJSON(inputs.jobs) }}`) so the resulting
single-quoted JS string cannot be broken by quotes or backslashes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f814b290-e5ee-46fe-8970-2e8778121357

📥 Commits

Reviewing files that changed from the base of the PR and between d7bae57 and 772e8e9.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/workflows/nightly-e2e.yaml
  • test/validate-e2e-coverage.test.ts

Comment thread .github/workflows/nightly-e2e.yaml
@jyaunches jyaunches force-pushed the fix/nightly-scorecard-selective-context branch from 772e8e9 to c85bf37 Compare May 18, 2026 15:20
@jyaunches jyaunches added the v0.0.46 Release target label May 18, 2026
@jyaunches jyaunches force-pushed the fix/nightly-scorecard-selective-context branch from c85bf37 to 020ca85 Compare May 18, 2026 22:20

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

♻️ Duplicate comments (1)
.github/workflows/nightly-e2e.yaml (1)

2334-2334: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Escape inputs.jobs before embedding into JavaScript.

Line 2334 directly injects workflow input into a JS single-quoted string. A quote/backslash in dispatch input can break script parsing and fail the scorecard step.

🔧 Proposed fix
-            const requestedJobsRaw = isDispatch ? '${{ inputs.jobs }}'.trim() : '';
+            const requestedJobsRaw = isDispatch ? (${{ toJSON(inputs.jobs) }} || '').trim() : '';
#!/bin/bash
set -euo pipefail

# Verify unsafe direct interpolation and safe toJSON pattern usage.
rg -n -C2 "\\$\\{\\{\\s*inputs\\.jobs\\s*\\}\\}" .github/workflows/nightly-e2e.yaml
rg -n -C2 "toJSON\\(inputs\\.jobs\\)" .github/workflows/nightly-e2e.yaml
🤖 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 @.github/workflows/nightly-e2e.yaml at line 2334, The injected workflow input
in the assignment to requestedJobsRaw uses a raw single-quoted interpolation and
can be broken by quotes/backslashes in inputs.jobs; update the expression that
sets requestedJobsRaw (the isDispatch ? '${{ inputs.jobs }}'.trim() : '' branch)
to use GitHub Actions' toJSON escaping (e.g., ${{ toJSON(inputs.jobs) }}) so the
value is safely escaped for embedding in JavaScript and remove the surrounding
literal quotes so .trim() operates on the properly escaped string.
🤖 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.

Duplicate comments:
In @.github/workflows/nightly-e2e.yaml:
- Line 2334: The injected workflow input in the assignment to requestedJobsRaw
uses a raw single-quoted interpolation and can be broken by quotes/backslashes
in inputs.jobs; update the expression that sets requestedJobsRaw (the isDispatch
? '${{ inputs.jobs }}'.trim() : '' branch) to use GitHub Actions' toJSON
escaping (e.g., ${{ toJSON(inputs.jobs) }}) so the value is safely escaped for
embedding in JavaScript and remove the surrounding literal quotes so .trim()
operates on the properly escaped string.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 700bebf9-c96e-43c8-af16-355072fe7f3e

📥 Commits

Reviewing files that changed from the base of the PR and between c85bf37 and 020ca85.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/workflows/nightly-e2e.yaml
  • test/validate-e2e-coverage.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .coderabbit.yaml
  • test/validate-e2e-coverage.test.ts

@jyaunches jyaunches force-pushed the fix/nightly-scorecard-selective-context branch 5 times, most recently from 06a2aa7 to 271bacd Compare May 19, 2026 04:30
@jyaunches jyaunches force-pushed the fix/nightly-scorecard-selective-context branch from 271bacd to c9c2371 Compare May 19, 2026 06:05
@jyaunches jyaunches merged commit c9479ea into NVIDIA:main May 19, 2026
14 checks passed
@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 chore Build, CI, dependency, or tooling maintenance and removed CI/CD labels Jun 3, 2026
@wscurran wscurran removed the chore Build, CI, dependency, or tooling maintenance label Jun 9, 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 v0.0.46 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants