Skip to content

fix(e2e): link advisor nightly dispatch runs#3538

Merged
cv merged 1 commit into
mainfrom
fix/e2e-advisor-dispatch-links
May 14, 2026
Merged

fix(e2e): link advisor nightly dispatch runs#3538
cv merged 1 commit into
mainfrom
fix/e2e-advisor-dispatch-links

Conversation

@cv

@cv cv commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a lightweight correlation ID to e2e-advisor nightly workflow dispatches so the advisor can find and link the exact dispatched nightly run. The advisor summary and PR comment now include that run link when lookup succeeds.

Changes

  • Add an optional advisor_dispatch_id workflow input and include it in nightly-e2e.yaml run names.
  • Pass a generated advisor dispatch ID through tools/e2e-advisor/dispatch.mts and poll recent nightly runs for the matching run URL after dispatch.
  • Surface the nightly run URL in advisor dispatch summaries and PR comments.
  • Update advisor dispatch tests for the new correlation input validation.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make 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

  • New Features

    • Manual E2E workflow dispatches now support optional dispatch ID tracking for improved run correlation
    • Auto-dispatch result comments now include direct links to triggered nightly test runs
  • Tests

    • Enhanced E2E advisor dispatch test coverage for new dispatch ID validation

Review Change Stack

@cv cv self-assigned this May 14, 2026
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

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: 7b4f756f-a786-474b-89f4-83cf1dec8e82

📥 Commits

Reviewing files that changed from the base of the PR and between e4a2f93 and b805903.

📒 Files selected for processing (4)
  • .github/workflows/nightly-e2e.yaml
  • test/e2e-advisor-dispatch.test.ts
  • tools/e2e-advisor/comment.mts
  • tools/e2e-advisor/dispatch.mts

📝 Walkthrough

Walkthrough

This PR extends the E2E advisor dispatch pipeline to add end-to-end tracing. It generates an advisor_dispatch_id from PR metadata, propagates it through workflow inputs, locates the resulting nightly run via GitHub Actions API, and correlates dispatch commands to workflow executions in comments and summaries.

Changes

E2E Dispatch Trace ID Propagation

Layer / File(s) Summary
Type contracts for trace ID propagation
tools/e2e-advisor/dispatch.mts, tools/e2e-advisor/comment.mts
DispatchInputs now carries optional advisor_dispatch_id; DispatchPlan returns advisorDispatchId, runId, and runUrl; DispatchResult includes optional runUrl for link rendering.
Trace ID generation and dispatch planning
tools/e2e-advisor/dispatch.mts
buildAdvisorDispatchId(prNumber, env) constructs a trace ID from PR number and GitHub run attempt metadata; planAutoDispatch computes and injects the ID into workflow inputs and returns it in the plan output.
Workflow run lookup with retry
tools/e2e-advisor/dispatch.mts
findDispatchedWorkflowRun(...) queries GitHub Actions for workflow_dispatch events and matches display_title containing the trace ID with up to 8 retries and 2-second delay; post-dispatch integration attempts lookup and records run metadata on success, logs warning on failure.
Dispatch input validation
tools/e2e-advisor/dispatch.mts
validateDispatchInputs now accepts optional advisor_dispatch_id and validates it against /^[A-Za-z0-9_-]{1,100}$/, conditionally including it in the returned validated object.
Comment and summary rendering
tools/e2e-advisor/comment.mts, tools/e2e-advisor/dispatch.mts
renderAutoDispatch conditionally appends nightly run link when dispatch.runUrl is present; renderDispatchSummary appends Trace ID and run URL to the summary output.
Workflow run naming and dispatch input
.github/workflows/nightly-e2e.yaml
Adds optional workflow_dispatch input advisor_dispatch_id (default empty string); updates run-name to conditionally append the ID for dispatch correlation when triggered via workflow_dispatch.
Test coverage for trace ID propagation
test/e2e-advisor-dispatch.test.ts
"trusted main-workflow dispatch" test now provides GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT environment variables, expects advisor_dispatch_id in plan inputs, and asserts plan.advisorDispatchId; validateDispatchInputs test updated to include trace ID in input/output shape; unsafe-inputs test adds rejection case for invalid trace ID format (advisor/123).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#3426: Modifies the same E2E advisor dispatch pipeline (tools/e2e-advisor/dispatch.mts, comment.mts, nightly-e2e.yaml), extending dispatcher planning inputs and outputs with coordination metadata.
  • NVIDIA/NemoClaw#3484: Also extends planAutoDispatch and DispatchPlan return types in the same dispatch planning module with additional advisory metadata fields.

Suggested labels

CI/CD, E2E

Suggested reviewers

  • jyaunches
  • cjagwani
  • prekshivyas

🐰 A trace through the night sky,
From advisor to nightly run high,
With dispatch_id's gleam,
Correlation's new dream,
E2E runs now wink as they fly! ✨

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(e2e): link advisor nightly dispatch runs' accurately summarizes the main objective of the PR: enabling the advisor to link nightly dispatch runs through a correlation ID mechanism.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-advisor-dispatch-links

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@cv cv requested a review from jyaunches May 14, 2026 19:12
@github-actions

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No existing product E2E is required. The PR changes CI advisor/dispatch/comment tooling and nightly workflow metadata only; it does not modify NemoClaw runtime code, installer/onboarding paths, sandbox lifecycle, credentials handling in the product, security/network policy enforcement, inference routing, deployment services, or real assistant user flows.

Optional E2E

  • None.

New E2E recommendations

  • CI E2E advisor auto-dispatch tooling (low): There is no existing E2E job that validates the full GitHub workflow_dispatch correlation path from advisor dispatch ID to discovered nightly run URL and PR comment rendering. Current coverage appears to be unit-level tooling tests, which is appropriate for this PR but leaves the live GitHub API integration untested end-to-end.
    • Suggested test: Add a CI-only advisor auto-dispatch integration test that dry-runs or mocks workflow_dispatch, run lookup by advisor_dispatch_id, and PR comment rendering with runUrl.

@cv cv added the v0.0.42 label May 14, 2026
@cv cv enabled auto-merge (squash) May 14, 2026 19:23
@cv cv merged commit f9bc5f1 into main May 14, 2026
29 checks passed
@cv cv deleted the fix/e2e-advisor-dispatch-links branch May 27, 2026 21:16
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants