Skip to content

ci(workflows): reuse compiled outputs across CI and E2E - #11285

Draft
cv wants to merge 2 commits into
mainfrom
codex/shared-compiled-ci-cache
Draft

ci(workflows): reuse compiled outputs across CI and E2E#11285
cv wants to merge 2 commits into
mainfrom
codex/shared-compiled-ci-cache

Conversation

@cv

@cv cv commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Outcome

Main CI, PR CI, and E2E candidate preparation use one action to restore or build the complete CLI and plugin. A matching compiled cache skips dependency installation and compilation. Manual PR E2E accepts source branches only in NVIDIA/NemoClaw.

Reason

The workflows currently repeat compilation and disagree about the output they prepare. A shared native cache reduces repeated work and gives preparation failures consistent step names. Restricting manual PR E2E to repository branches makes repository writers the explicit trust boundary for default-branch cache producers.

Changes

  • Add restore, compile-on-miss, verification, save, and summary steps to ci-compile-artifacts. Main, PR, and E2E use the same fixed Node version and full output. The key includes the source SHA, trusted recipe revision, action content, Node version, and runner platform. compiled-artifact.test.ts exercises actual shell steps for hits, misses, invalid output, and shared identity.
  • Load the E2E compiler from the trusted workflow checkout. Verify the source repository through the PR API before candidate execution and revalidate it after checkout. Boundary tests cover repository branches, external forks, NVIDIA sibling repositories, base replay, credential authorization, and sparse-checkout dependencies.
  • Use compiled-test-inputs for coverage merging. PRs retain the old upload only while their base action still reads it; pr-workflow-contract.test.ts covers both base-reader versions.
  • Update manual E2E guidance. Existing job dependencies, release gates, E2E artifact handoff, and protected qualification builds remain in place.

Cache expiry, branch scoping, and concurrent misses can cause another build. The cache does not coordinate producers or guarantee one build per SHA.

Verification

  • Focused Vitest integration and E2E-support run under Node 22.23.2: 220 tests passed across eight files, covering compiled output, PR workflow contracts, manual authorization, operations, preparation, CLI artifacts, shared E2E, and PR reporting.
  • Full E2E workflow boundary validation: passed.
  • Strict TypeScript check for the cache helper and action test harness: passed.
  • Plugin and CLI production builds, compiled-output verification, and source-map validation: passed under Node 22.23.2.
  • Changed-file prek pre-commit and pre-push hooks: passed. npm run test:projects:check: passed.
  • npm run validate:pr in a credential-free container: passed (exit 0; no tracked changes).
  • Broader package-contract run: 1,296 passed; three timeout-contract tests could not pass because the approved OpenShell SDK 0.0.106 was unavailable locally.
  • Diff review and secret checks found no secrets, API keys, or credentials.
Focused test command
npm exec --yes --package=node@22.23.2 -- npx vitest run \
  --project integration \
  test/automation/pull-requests/compiled-artifact.test.ts \
  test/automation/pull-requests/pr-workflow-contract.test.ts \
  --project e2e-support \
  test/e2e/support/manual-pr-credential-authorization.test.ts \
  test/e2e/support/e2e-operations-workflow-boundary.test.ts \
  test/e2e/support/prepare-e2e-workflow-boundary.test.ts \
  test/e2e/support/cli-artifact-workflow-boundary.test.ts \
  test/e2e/support/shared-e2e-workflow-boundary.test.ts \
  test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts

Native GitHub cache reuse remains unverified. PR CI loads shared actions from the base, so this PR's required checks alone cannot prove the new action's production cache behavior.

Review notes

Initial CI: the growth guard failed because it compares the candidate snapshot with the newer base snapshot. Dockerfile, ci/e2e-assertion-budget.json, and test/e2e/live/llama-cpp-generic-gpu.test.ts are byte-for-byte unchanged from branch point 5d4ac392c471de5323496a0d1df6d0118851d7d7; main reduced those budgets in #11164 and #11078. This check remains failing, with no waiver requested. Other CI and Advisor evaluation are pending. CodeRabbit skipped this draft.

Self-review of NVIDIA/NemoClaw commit 47279b465c4ded8339107d8a6fc469dfb30a9222 covered the complete diff, API authorization before execution, trusted action loading, cache identity and validation, token exposure, and the coverage-artifact transition. No unresolved implementation findings were identified. The review used source inspection, executable shell-step tests, and workflow boundary tests.

Sensitive paths awaiting independent review: .github/workflows/{main,pr,e2e}.yaml, .github/actions/ci-compile-artifacts/, .github/actions/ci-cli-coverage-merge/action.yaml, tools/e2e/{operations,prepare-e2e}-workflow-boundary.mts, and .agents/skills/nemoclaw-maintainer-e2e/references/manual-pr.md.

The publication container uses canonical npm/prek entrypoints and lockfiles from 38b5e3cabdff3efe71663a2bbeeffb39e89bd942, with recorded executable hashes. The two changed E2E validators run as candidate code, without host credentials or network access; that run is not independent review.

Repository writers are intentionally trusted before merge. Fork contributions require maintainer review and adoption onto a repository branch before manual E2E. This PR is a draft pending independent review and CI; the self-review does not authorize merge.


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

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Sep 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@github-code-quality

github-code-quality Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit bc6ddf9 in the codex/shared-compile... branch remains at 96%, unchanged from commit 38b5e3c in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit bc6ddf9 in the codex/shared-compile... branch remains at 83%, unchanged from commit 38b5e3c in the main branch.

Show a line coverage summary of the most impacted files.
File main 38b5e3c codex/shared-compile... bc6ddf9 +/-
src/lib/onboard...w-auto-apply.ts 86% 73% -13%
src/lib/inferen...ycle-adapter.ts 86% 77% -9%
src/lib/onboard...eate-journal.ts 87% 82% -5%
src/lib/onboard...ed-lifecycle.ts 77% 75% -2%
src/lib/onboard...-transaction.ts 70% 69% -1%
src/lib/inferen...file/cleanup.ts 81% 82% +1%
src/lib/actions...dbox/destroy.ts 89% 91% +2%
src/lib/actions...oy-execution.ts 91% 94% +3%
src/lib/onboard...on-authority.ts 82% 88% +6%
src/lib/inferen...ocal-runtime.ts 87% 97% +10%

Updated September 09, 2026 11:12 UTC

if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
node -e 'for (const p of ["dist", "nemoclaw/dist"]) require("node:fs").rmSync(p, { recursive: true, force: true });'

@cv cv Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Why not rm -rf, since using bash already?

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit bc6ddf9. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant