Skip to content

fix(maintainer): verify final E2E coordinator evidence - #8258

Open
cv wants to merge 23 commits into
mainfrom
codex/e2e-gate-observation-evidence-v2
Open

fix(maintainer): verify final E2E coordinator evidence#8258
cv wants to merge 23 commits into
mainfrom
codex/e2e-gate-observation-evidence-v2

Conversation

@cv

@cv cv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make the maintainer merge check verify the complete E2E coordinator history and the final pull request state. This prevents a passing result when coordinator evidence is ambiguous or another repository check changes before the merge decision.

This PR supersedes #8241. It preserves #8241's authored commits and attribution. It starts from that PR's effective change and adds focused gate and fixture corrections required by GitHub CI. The new branch avoids a force-push to #8241's published branch. #8241 was closed only after this successor was confirmed open.

Changes

  • Authenticate and uniquely bind the initial E2E seed, its retries, and the final coordinator result.
  • Page through a compact projection of workflow evidence and reject incomplete, duplicated, malformed, queued, failed, or ambiguous history.
  • Bind the coordinator workflow run to the current trusted main workflow SHA and the exact pull request head, base, repository, and immutable title.
  • Re-read the pull request identity and authoritative base SHA atomically after all CI evidence so a late change fails closed.
  • Classify the merge checker as a risky path and add regression coverage for pagination, forks, retries, workflow provenance, final-state races, and histories longer than 31 records.

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 maintainer merge check and does not change a supported surface.
  • 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: Independent Codex Desktop nine-category review at a07ee89de438a555685bf83bbffde578b64cd2e2 against 5fe23192a6fe378537fc2730c081730bc3ff72b9: PASS with no findings. The stable effective patch ID is unchanged from prior reviewed head a388b32739237226cac49d866c1e1caa5378542d, and all eight effective file blobs are identical. The review covers trusted workflow provenance; exact pull request, head, base, repository, and title binding; fork authorization lineage; complete bounded pagination; duplicate and timestamp rejection; retry history; required-check and E2E snapshot revalidation; and the terminal atomic pull request and base read. It adds no secret, credential, dependency, cryptography, permission, or user-facing surface. All nine security categories pass.
  • 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: Exact-head review of the eight-file effective diff at a07ee89de438a555685bf83bbffde578b64cd2e2 against base 5fe23192a6fe378537fc2730c081730bc3ff72b9 confirmed that the change affects only the internal maintainer merge checker, its risky-file classification, and regression fixtures. It changes no supported product or user-facing documentation surface. The reviewer inspected all changed diagnostics, comments, fixture labels, test titles, and manually authored pull request text against the repository writing and documentation rules. All eight effective pull request file blobs are byte-identical to prior reviewed head a388b32739237226cac49d866c1e1caa5378542d, and both base revisions contain identical blobs for those paths.
  • Agent: Codex Desktop documentation writer subagent

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 — all eight effective file blobs at a388b32739237226cac49d866c1e1caa5378542d are byte-identical to the focused-test revision ffe14d072c33383c6dcf97c6145eacc1af9d32db, where the complete merge-gate suite passed 247/247 tests and npm run checks:repository, npm run build:cli, and npm run typecheck:cli passed. Intervening main changes do not alter those paths, and exact-head git diff --check passed.
  • Applicable broad gate passed — exact-head GitHub CI at a07ee89de438a555685bf83bbffde578b64cd2e2 is running against main after test(cli): isolate Shields and tunnel tests under coverage #8293 landed the shared Shields and tunnel test isolation repairs. No non-success check is accepted or waived.
  • 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 merge-gate validation for end-to-end workflow evidence.
    • Detects stale, incomplete, duplicated, failed, or ambiguously associated workflow results.
    • Verifies workflow lineage, job timing, pagination, required checks, and final status consistency.
    • Revalidates CI and pull request state to detect changes during evaluation.
    • Reports incomplete evidence consistently across related checks and fails closed when state changes.
  • Tests

    • Expanded coverage for retries, forks, pagination, missing timestamps, evolving results, and invalid evidence scenarios.

cv added 7 commits August 4, 2026 12:15
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv 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 Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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 gate checker validates paginated coordinator workflow evidence, E2E lineage, job timing, cached CI evidence, required-check snapshots, and PR revision stability through staged evaluation. Fixtures and tests cover valid, invalid, stale, incomplete, and changing evidence.

Changes

E2E merge-gate validation

Layer / File(s) Summary
Coordinator evidence inventory and selection
.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts
The checker inventories coordinator runs and checks across pages. It validates identity, repository and branch bindings, timing, jobs, completion, and authorized lineage.
CI evidence and E2E seed classification
.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts
CI evaluation uses cached action evidence and job timestamps. E2E runs are classified as initial seeds, reused runs, or unknown evidence.
Staged CI and revision revalidation
.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts
The main flow captures intermediate and final snapshots. It rechecks CI, E2E histories, required checks, and PR revision stability.
Evidence fixtures and existing E2E updates
test/skills/check-gates-test-fixtures.ts, test/skills/check-gates-evidence.test.ts, test/skills/check-gates-fork-evidence.test.ts, test/skills/check-gates-retry-history.test.ts
Fixtures model coordinator partitions, seeded runs, timed jobs, status rollups, changing responses, and staged observations. Related tests expect incomplete E2E / PR Gate and initialize evidence.
Coordinator evidence test coverage
test/skills/check-gates-coordinator-evidence.test.ts, .agents/skills/nemoclaw-maintainer-day/scripts/shared.ts, test/skills/check-gates-compliance.test.ts
Tests cover valid lifecycles and rejection of duplicate, malformed, stale, incomplete, failed, pending, ambiguous, or changed evidence. Compliance tests classify the gate checker as risky code.

Estimated code review effort: 5 (Critical) | ~120 minutes

Suggested reviewers: aasthajh

🚥 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 summarizes the main change: validating final E2E coordinator evidence in the maintainer merge check.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/e2e-gate-observation-evidence-v2

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

@github-code-quality

github-code-quality Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit a07ee89 in the codex/e2e-gate-obser... branch remains at 96%, unchanged from commit 5fe2319 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit a07ee89 in the codex/e2e-gate-obser... branch remains at 81%, unchanged from commit 5fe2319 in the main branch.

Show a code coverage summary of the most impacted files.
File main 5fe2319 codex/e2e-gate-obser... a07ee89 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/platform.ts 89% 84% -5%
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/private-networks.ts 90% 93% +3%
src/lib/policy/...ne-exclusion.ts 92% 96% +4%
src/lib/onboard...e-patch-flow.ts 71% 76% +5%

Updated August 05, 2026 04:08 UTC

@github-actions

github-actions Bot commented Aug 4, 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 · low confidence · 0 blockers · 6 warnings · 2 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections match; Nemotron reported the same number of blockers, 6 more warnings, 2 more suggestions.
7 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • retryable failure at test/skills/check-gates-coordinator-evidence.test.ts:73: selected only by the second-opinion lane as justified.
  • enclosing coordinator at test/skills/check-gates-coordinator-evidence.test.ts:550: selected only by the second-opinion lane as define.
  • initialize job at test/skills/check-gates-coordinator-evidence.test.ts:658: selected only by the second-opinion lane as define.
  • seed run at test/skills/check-gates-coordinator-evidence.test.ts:355: selected only by the second-opinion lane as define.
  • E2E coordinator at test/skills/check-gates-coordinator-evidence.test.ts:354: selected only by the second-opinion lane as define.
  • authorization predecessor at .agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts:576: selected only by the second-opinion lane as define.
  • coordinate job at test/skills/check-gates-coordinator-evidence.test.ts:1277: selected only by the second-opinion lane as define.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — initial E2E seed at test/skills/check-gates-coordinator-evidence.test.ts:439: Keep the term. Its modifier distinguishes initial lineage creation from reuse.
  • justified — coordinator evidence at test/skills/check-gates-coordinator-evidence.test.ts:354: Keep the term. The coordinator modifier identifies the evidence source and role.

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.

@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 (8)
test/skills/check-gates-test-fixtures.ts (4)

196-219: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse one seed-job helper across the suites.

initialE2eSeedJobs() duplicates seedJobs() in test/skills/check-gates-coordinator-evidence.test.ts (ids 471/472/473, identical timestamps). Two copies can drift, and the run 407 fixture at Lines 517-523 depends on those ids matching. Export initialE2eSeedJobs and use it in the coordinator suite instead of the local copy. The guideline also asks for one name per concept.

🤖 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/skills/check-gates-test-fixtures.ts` around lines 196 - 219, Export
initialE2eSeedJobs from check-gates-test-fixtures.ts and replace the duplicate
seedJobs helper in check-gates-coordinator-evidence.test.ts with this shared
helper. Preserve the existing job IDs and timestamps so the run 407 fixture
continues matching, and use only the initialE2eSeedJobs name for this concept.

Source: Coding guidelines


376-381: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Validate createdRange in one place. Both sites split createdRange on ".." and use the result with no validation. A range without .. returns undefined from the split, and each site then degrades silently instead of failing: the clock becomes Date.now = () => NaN, and an unrelated run loses its created_at field. Add one helper that parses a range into a validated start and end, and throw on a malformed value.

  • test/skills/check-gates-test-fixtures.ts#L376-L381: derive the observation time from the validated range end, and assert the parsed epoch is finite before writing the clock module. Select the latest range end rather than .at(-1) of the array, because the coordinator suite appends workflow_dispatch partitions last.
  • test/skills/check-gates-test-fixtures.ts#L639-L642: derive fallbackCreatedAt from the validated range start, so a synthetic unrelated run always carries a created_at value.
🤖 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/skills/check-gates-test-fixtures.ts` around lines 376 - 381, In
test/skills/check-gates-test-fixtures.ts lines 376-381 and 639-642, add one
shared helper to parse createdRange into validated start and end values,
throwing for malformed ranges without "..". Update the observation-time setup at
lines 376-381 to select the latest range end by timestamp rather than using
coordinatorRunPartitions.at(-1), validate that Date.parse produces a finite
epoch before writing clock.mjs, and update fallbackCreatedAt at lines 639-642 to
use the validated range start.

530-539: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Name the shared default timestamps.

The values "2026-01-01T00:01:00Z" and "2026-01-01T00:03:00Z" now appear as literals in actionRunData, the job serializer, initialE2eSeedJobs, initialE2eSeedCheck, the run 407 entry, and the default observation time. The gate script compares run, job, and observation times against each other, so these literals form one coupled timeline. Extract constants such as DEFAULT_STARTED_AT and DEFAULT_COMPLETED_AT so a timeline change stays in one place.

Also applies to: 567-580

🤖 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/skills/check-gates-test-fixtures.ts` around lines 530 - 539, Extract
shared constants for the default timeline timestamps, such as DEFAULT_STARTED_AT
and DEFAULT_COMPLETED_AT, and replace the repeated literals throughout
actionRunData, the job serializer, initialE2eSeedJobs, initialE2eSeedCheck, the
run 407 entry, and the default observation time. Ensure all run, job, and
observation defaults reference these constants so timeline changes remain
centralized.

53-56: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove untested final-response knobs.

finalTotalCount, finalPageTotalCounts, and finalRunOverrides have no test consumers. Remove them and their serializer branches, or add tests that use them.

🤖 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/skills/check-gates-test-fixtures.ts` around lines 53 - 56, Remove the
unused final-response knobs finalTotalCount, finalPageTotalCounts, and
finalRunOverrides from the fixture configuration and delete their corresponding
serializer branches. Update related types or references as needed, without
adding new behavior or tests.

Source: Coding guidelines

test/skills/check-gates-coordinator-evidence.test.ts (2)

296-296: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Rename the local coordinatorJobs binding.

Line 296 declares const coordinatorJobs inside runGateWithCoordinator. That binding shadows the module-level coordinatorJobs helper declared at Line 44 for the whole function body. The destructured parameter at Line 264 is already renamed to configuredJobs to avoid this collision, so the clash is known.

Nothing breaks today, because runGateWithCoordinator never calls the helper. If a later edit calls coordinatorJobs(...) anywhere in this function, the call resolves to the const in its temporal dead zone and throws ReferenceError instead of reaching the helper. Rename the local binding.

♻️ Proposed rename
-  const coordinatorJobs = configuredJobs ?? coordinator.jobs ?? defaultCoordinator.jobs;
+  const resolvedCoordinatorJobs = configuredJobs ?? coordinator.jobs ?? defaultCoordinator.jobs;

Update the three references at Lines 311, 337, and any other use inside this function:

-            jobs: coordinatorJobs,
+            jobs: resolvedCoordinatorJobs,
🤖 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/skills/check-gates-coordinator-evidence.test.ts` at line 296, Rename the
local const binding `coordinatorJobs` inside `runGateWithCoordinator` to a
distinct name, and update all references to that local value within the
function, including the uses around lines 311 and 337. Preserve the module-level
`coordinatorJobs` helper name unchanged.

1291-1310: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add table cases for the coordinator head-branch and head-sha rules.

The table perturbs one field per entry from a passing baseline, which proves each production rule is necessary. Three rules in parseE2eCoordinatorRun have no entry:

  • record.head_branch !== "main" (check-gates.ts Line 512).
  • The 40-hex head_sha format test (check-gates.ts Line 513).
  • event === "workflow_run" && headSha !== exactDiff.baseSha (check-gates.ts Line 514).

The third rule binds an automatic coordinator to the pull request's base commit, so it carries the authorization weight for the same-repository path. No entry sets headSha on the coordinator. The fork fixture does set headSha: "d".repeat(40) at Line 137, but only on the manual dispatch coordinator, where the production code skips this binding. The rule is therefore unexercised, and a later refactor can remove it without failing any test.

♻️ Suggested table entries
     {
       condition: "the coordinator uses another attempt",
       coordinator: { attempt: 2 },
     },
+    {
+      condition: "the automatic coordinator does not run on the base commit",
+      coordinator: { headSha: "c".repeat(40) },
+    },
+    {
+      condition: "the coordinator head sha is malformed",
+      coordinator: { headSha: "not-a-sha" },
+    },
+    {
+      condition: "the coordinator runs on another branch",
+      coordinator: { headBranch: "release" },
+    },

The third entry needs headBranch on ActionRunFixture if the fixture does not already model it.

🤖 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/skills/check-gates-coordinator-evidence.test.ts` around lines 1291 -
1310, Extend the coordinator evidence table in the check-gates coordinator tests
with cases that independently violate headBranch, the 40-character hexadecimal
headSha format, and the workflow_run headSha mismatch against exactDiff.baseSha.
Add headBranch to ActionRunFixture if needed, and ensure the headSha binding
case uses an automatic workflow_run coordinator with an otherwise passing
baseline so each parseE2eCoordinatorRun rule is exercised.

Source: Path instructions

.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts (2)

2965-2967: 📐 Maintainability & Code Quality | 🔵 Trivial

Consider logging progress for the second coordinator inventory pass.

main now calls fetchE2eCoordinationEvidence twice. Each call walks two events across up to E2E_COORDINATOR_MAX_PARTITIONS (28) partitions, and each partition issues at least one paginated gh api invocation. Each candidate then costs three more reads. For a 14-day history window the gate can issue well over one hundred separate gh processes, and each one carries the 120 s timeout from run in .agents/skills/nemoclaw-maintainer-day/scripts/shared.ts.

The checker prints nothing until it finishes, so a maintainer cannot distinguish a slow inventory from a hang. Write a short progress line to stderr before each inventory pass.

🤖 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 @.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts around lines
2965 - 2967, Update the two call sites that invoke fetchE2eCoordinationEvidence,
including the conditional call around finalE2eEvidence, to write a concise
progress message to stderr immediately before each inventory pass. Keep the
existing evidence evaluation and return behavior unchanged.

1014-1060: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the repeated claimed-check derivation into one helper.

Three functions now build the same values independently: the checkNames list, the externalId template, and the claimedCheckscurrentNameChecksexactChecks sequence. selectE2eCoordinationCheck (Lines 1014-1041), selectedE2eLineageTiming (Lines 1048-1060), and e2eCoordinationHistoryStartedAt (Lines 1086-1092) each repeat part of it. The name-preference rule is duplicated verbatim in two of them. A change to the check-name list or the external-id format must be applied in three places.

Extract one helper that returns { claimedChecks, exactChecks } and call it from all three functions.

♻️ Suggested shape
const E2E_COORDINATION_CHECK_NAMES = ["E2E / PR Gate", "E2E / PR Gate Coordination"] as const;

function e2eCoordinationExternalId(exactDiff: ExactDiffIdentity): string {
  return `nemoclaw-pr-e2e:v2:${exactDiff.number}:${exactDiff.headSha}:${exactDiff.baseSha}`;
}

function claimedE2eCoordinationChecks(
  snapshot: E2eCoordinationCheckSnapshot,
  exactDiff: ExactDiffIdentity,
): { claimedChecks: Array<Record<string, unknown>>; exactChecks: Array<Record<string, unknown>> } {
  const externalId = e2eCoordinationExternalId(exactDiff);
  const claimedChecks = snapshot.checkRuns.filter((check) => check.external_id === externalId);
  const currentNameChecks = claimedChecks.filter((check) => check.name === "E2E / PR Gate");
  const exactChecks =
    currentNameChecks.length > 0
      ? currentNameChecks
      : claimedChecks.filter((check) => check.name === "E2E / PR Gate Coordination");
  return { claimedChecks, exactChecks };
}
🤖 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 @.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts around lines
1014 - 1060, Extract the duplicated E2E check derivation into shared symbols
near selectE2eCoordinationCheck: centralize the check-name list, external-ID
construction, and claimedChecks-to-exactChecks name-preference logic in one
helper returning both arrays. Update selectE2eCoordinationCheck,
selectedE2eLineageTiming, and e2eCoordinationHistoryStartedAt to reuse that
helper while preserving existing validation and selection behavior.
🤖 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 @.agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts:
- Around line 2965-2967: Update the two call sites that invoke
fetchE2eCoordinationEvidence, including the conditional call around
finalE2eEvidence, to write a concise progress message to stderr immediately
before each inventory pass. Keep the existing evidence evaluation and return
behavior unchanged.
- Around line 1014-1060: Extract the duplicated E2E check derivation into shared
symbols near selectE2eCoordinationCheck: centralize the check-name list,
external-ID construction, and claimedChecks-to-exactChecks name-preference logic
in one helper returning both arrays. Update selectE2eCoordinationCheck,
selectedE2eLineageTiming, and e2eCoordinationHistoryStartedAt to reuse that
helper while preserving existing validation and selection behavior.

In `@test/skills/check-gates-coordinator-evidence.test.ts`:
- Line 296: Rename the local const binding `coordinatorJobs` inside
`runGateWithCoordinator` to a distinct name, and update all references to that
local value within the function, including the uses around lines 311 and 337.
Preserve the module-level `coordinatorJobs` helper name unchanged.
- Around line 1291-1310: Extend the coordinator evidence table in the
check-gates coordinator tests with cases that independently violate headBranch,
the 40-character hexadecimal headSha format, and the workflow_run headSha
mismatch against exactDiff.baseSha. Add headBranch to ActionRunFixture if
needed, and ensure the headSha binding case uses an automatic workflow_run
coordinator with an otherwise passing baseline so each parseE2eCoordinatorRun
rule is exercised.

In `@test/skills/check-gates-test-fixtures.ts`:
- Around line 196-219: Export initialE2eSeedJobs from
check-gates-test-fixtures.ts and replace the duplicate seedJobs helper in
check-gates-coordinator-evidence.test.ts with this shared helper. Preserve the
existing job IDs and timestamps so the run 407 fixture continues matching, and
use only the initialE2eSeedJobs name for this concept.
- Around line 376-381: In test/skills/check-gates-test-fixtures.ts lines 376-381
and 639-642, add one shared helper to parse createdRange into validated start
and end values, throwing for malformed ranges without "..". Update the
observation-time setup at lines 376-381 to select the latest range end by
timestamp rather than using coordinatorRunPartitions.at(-1), validate that
Date.parse produces a finite epoch before writing clock.mjs, and update
fallbackCreatedAt at lines 639-642 to use the validated range start.
- Around line 530-539: Extract shared constants for the default timeline
timestamps, such as DEFAULT_STARTED_AT and DEFAULT_COMPLETED_AT, and replace the
repeated literals throughout actionRunData, the job serializer,
initialE2eSeedJobs, initialE2eSeedCheck, the run 407 entry, and the default
observation time. Ensure all run, job, and observation defaults reference these
constants so timeline changes remain centralized.
- Around line 53-56: Remove the unused final-response knobs finalTotalCount,
finalPageTotalCounts, and finalRunOverrides from the fixture configuration and
delete their corresponding serializer branches. Update related types or
references as needed, without adding new behavior or tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 635ffe0a-71cc-4b06-a446-d23f28db6916

📥 Commits

Reviewing files that changed from the base of the PR and between dd7db61 and 8edc1d8.

📒 Files selected for processing (4)
  • .agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts
  • test/skills/check-gates-coordinator-evidence.test.ts
  • test/skills/check-gates-evidence.test.ts
  • test/skills/check-gates-test-fixtures.ts

cv added 3 commits August 4, 2026 13:52
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

@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 `@test/skills/check-gates-retry-history.test.ts`:
- Around line 25-46: Update the checkRunsWithTiming fixture generation to use
Date arithmetic that evenly divides a fixed valid time window across every
record, ensuring started_at always precedes completed_at and timestamps remain
valid for any history size. Preserve current first/last record semantics and add
a regression case covering more than 31 check runs.
🪄 Autofix

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: 420aa637-172a-4a4e-a5bc-0f52ce90100f

📥 Commits

Reviewing files that changed from the base of the PR and between 8edc1d8 and 2ec09f1.

📒 Files selected for processing (5)
  • .agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts
  • test/skills/check-gates-coordinator-evidence.test.ts
  • test/skills/check-gates-evidence.test.ts
  • test/skills/check-gates-fork-evidence.test.ts
  • test/skills/check-gates-retry-history.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .agents/skills/nemoclaw-maintainer-day/scripts/check-gates.ts

Comment thread test/skills/check-gates-retry-history.test.ts
@prekshivyas prekshivyas self-assigned this Aug 5, 2026
cv added 4 commits August 4, 2026 17:54
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
(cherry picked from commit 5c3e773e5f6e5b51bb0474f09d6107a08005666b)
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
(cherry picked from commit 3f6a4b67be3bc9d083626dcb989a431ed36ee9cb)
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.

2 participants