Skip to content

perf(test): parallelize protected runtime readiness - #11642

Merged
cv merged 1 commit into
mainfrom
codex/parallel-managed-runtime-readiness
Sep 13, 2026
Merged

cv merged 1 commit into
mainfrom
codex/parallel-managed-runtime-readiness

Conversation

@cjagwani

@cjagwani cjagwani commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The protected managed-image readiness support suite drops from 18.55s to 12.48s test time (33% faster) while preserving all 34 cases. This changes test execution only; production behavior is unchanged.

Reason

Every command case already owns a private temporary root, command directory, environment, progress tracker, and artifact sink, but module-global teardown forced the suite to run serially.

Changes

  • Attach fixture cleanup to the test that created it.
  • Run independent cases concurrently with a two-test cap.
  • Keep existing commands, assertions, timeouts, redaction, and artifact checks unchanged.

Verification

  • Focused baseline — 34/34 passed in 18.55s test time.
  • Focused candidate — 34/34 passed in 12.48s test time (33% faster).
  • Shuffled replay (--sequence.seed=11642) — 34/34 passed.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run check:diff — passed.
  • Normal pre-commit hooks — passed, including formatting, growth guardrails, and secret scanning.
  • Normal pre-push hooks — passed, including publication validation and CLI TypeScript.
  • GitHub commit verification — aa92afc539af8f2f85a058e77ea1f3c0d8fd1d12 is Verified.
  • Diff inspection — no secrets, API keys, or credentials.
  • Documentation impact review — no user-facing docs or changelog update is needed.
  • Hosted CI — all 12 test shards and every required check passed on the exact head. A retry-only stale artifact made an earlier rollup fail despite its shard passing; ci(test): replace stale CLI shard artifacts #11644 fixes that underlying artifact replacement issue.
  • Automated review — CodeRabbit and eight Advisor specialists are clear. The remaining Advisor specialist failed its publishing protocol without reporting a candidate-code failure.

Review notes

Ready for independent review. No production files are changed.


Signed-off-by: Charan Jagwani [email protected]

@copy-pr-bot

copy-pr-bot Bot commented Sep 13, 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 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

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: ec713612-949d-4997-9432-26d9e531f257

📥 Commits

Reviewing files that changed from the base of the PR and between e9cf242 and aa92afc.

📒 Files selected for processing (1)
  • test/e2e/support/managed-image-protected-runtime-readiness.test.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The test fixture now performs per-test cleanup through onTestFinished. Protected runtime command tests run concurrently with a limit of two.

Changes

Runtime readiness test updates

Layer / File(s) Summary
Fixture-scoped cleanup and concurrent execution
test/e2e/support/managed-image-protected-runtime-readiness.test.ts
Each fixture stops its progress instance and removes its temporary root through onTestFinished. The protected runtime command tests use concurrency limited to two.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: prekshivyas

Merge Risk: ⚪ Minimal · up to aa92a

This test-only change preserves isolated fixture state while reducing runtime, with no merge-blocking risk indicated.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. 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: parallelizing the protected runtime readiness tests for improved performance.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/parallel-managed-runtime-readiness

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

@github-code-quality

github-code-quality Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit aa92afc in the codex/parallel-manag... branch remains at 96%, unchanged from commit e9cf242 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit aa92afc in the codex/parallel-manag... branch remains at 83%, unchanged from commit e9cf242 in the main branch.

Show a line coverage summary of the most impacted files.
File main e9cf242 codex/parallel-manag... aa92afc +/-
src/lib/messagi...onfig-prompt.ts 97% 95% -2%
src/lib/state/registry-mcp.ts 98% 96% -2%
src/lib/state/registry.ts 94% 93% -1%
src/lib/onboard...eway-process.ts 90% 89% -1%
src/lib/state/registry/lock.ts 99% 99% 0%
src/lib/onboard...uild-context.ts 74% 75% +1%
src/lib/actions...-add-restart.ts 30% 31% +1%
src/lib/messaging/hydration.ts 95% 97% +2%
src/lib/actions...dbox/destroy.ts 89% 92% +3%
src/lib/actions...oy-execution.ts 91% 94% +3%

Updated September 13, 2026 04:02 UTC

@cjagwani
cjagwani marked this pull request as ready for review September 13, 2026 04:04
@cjagwani
cjagwani requested review from cv and prekshivyas September 13, 2026 04:04
@cv
cv merged commit 48acf4a into main Sep 13, 2026
210 of 220 checks passed
@cv
cv deleted the codex/parallel-managed-runtime-readiness branch September 13, 2026 07:28
jyaunches added a commit that referenced this pull request Sep 13, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

A successful CLI shard retry now replaces that shard's failed report
instead of leaving both artifacts for the coverage merge to choose from.
This prevents stale failed results from turning a successful retry into
another failed rollup; production behavior is unchanged.

## Reason

PR #11642 exposed the gap: shard 6 passed on retry, but the merge job
selected its earlier failed artifact on two consecutive rollup attempts.
Rerunning the rollup could not recover because both same-name artifacts
remained attached to the workflow run.

## Changes

- Set the existing CLI shard upload to overwrite its same-name artifact
on reruns.
- Protect that retry contract in the PR workflow test.
- Register the exact workflow assertion as a compatibility boundary in
the source-shape budget.

## Verification

- `npx --no-install vitest run --project integration
test/automation/pull-requests/pr-workflow-contract.test.ts` — 45/45
passed.
- `npm run source-shape:check` — passed with no unbudgeted source-shape
tests.
- `npm --prefix nemoclaw run build` — passed.
- Normal pre-commit hooks — passed, including YAML validation,
repository checks, secret scanning, source-shape budget, and growth
guardrails.
- Normal pre-push hooks — passed, including publication validation and
CLI TypeScript.
- Hosted CI — all 12 CLI shards, coverage merge, static checks, type
checks, audits, and security scans passed.
- GitHub commit verification —
`6f698307fae4b9b97210cf837c999618ec92c56e` is Verified.
- Diff inspection — no secrets, API keys, or credentials.
- Documentation impact review — no user-facing docs or changelog update
is needed.

## Review notes

Sensitive workflow path:
`.github/actions/ci-cli-coverage-shard/action.yaml`. The exact
three-file diff at `6f698307fae4b9b97210cf837c999618ec92c56e` received
contributor self-review and a documentation-impact review; no maintainer
pre-publication review exists. Ready for independent workflow review.

---
Signed-off-by: Charan Jagwani <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Failed pull-request workflow reruns now replace outdated CLI shard
reports instead of retaining conflicting artifacts.
* CLI coverage results are stored under the correct shard-specific
report name, improving reliability when workflows are rerun.

* **Tests**
* Added automated coverage to verify that refreshed shard reports
overwrite existing reports as expected.
* Updated workflow compatibility checks to cover replacement of stale
reports after failed-job reruns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Charan Jagwani <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
Co-authored-by: Julie Yaunches <[email protected]>
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: performance Latency, throughput, resource use, benchmarks, or scaling chore Build, CI, dependency, or tooling maintenance labels Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure area: performance Latency, throughput, resource use, benchmarks, or scaling chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants