Repository navigation
test(onboard): serialize dashboard port fixture - #11598
Conversation
|
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe sandbox-reuse messaging-provider test now runs sequentially to prevent concurrent execution. ChangesOnboarding messaging test
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The test scheduling change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit cb41cdc in the TypeScript / code-coverage/cliThe overall line coverage in commit cb41cdc in the Show a line coverage summary of the most impacted files.
Updated |
rsliter
left a comment
There was a problem hiding this comment.
Reviewed exact commit cb41cdc against the two observed shard-9 dashboard-port collisions. The one-line it.sequential change isolates only the fixture that exercises the real shared dashboard-port allocator while preserving concurrency for the remaining cases. Exact-head required CI passes, including shard 9; CodeRabbit found no actionable issue; DCO and commit verification pass. Approval applies to the implementation. Merge remains separately gated on the repository review lifecycle.
## Outcome Configuration export can read a NemoClaw-managed gateway from the canonical owner-private default state directory even when that directory predates explicit ownership markers. The selected inference-routing E2E also accepts OpenShell's current scope-bound credential placeholder and continues to verify delegated bearer resolution. ## Reason Exact-candidate run 34649953836 and exact-base replay 34651044220 reproduced the same two failures: default-gateway SDK reads stopped before the sandbox inventory RPC, and TC-INF-12 rejected the valid OpenShell 0.0.116 scope-bound placeholder. These inherited failures block deterministic qualification of #11587. ### Related issues Refs #11421 ## Changes - Preserve strict ownership-marker requirements for explicit gateway state overrides while recognizing the canonical owner-private default state used by installations created before markers. - Cover both the legacy-default connection path and rejection of an unmarked explicit override. - Share the bounded OpenShell placeholder grammar for unscoped, generation-scoped, and scope-bound credentials between TC-INF-12 and its mapped fast test. - Integrate current main so trusted E2E compares the candidate against the exact PR base instead of treating intervening main changes as candidate-managed-image inputs. ## Verification - `npx vitest run --project cli src/lib/adapters/openshell/sandbox-command-sdk.test.ts src/lib/adapters/config/live-export-source.test.ts` — 93 tests passed. - `npx vitest run --project e2e-support test/e2e/support/hosted-inference.test.ts` — 19 tests passed. - `npx tsx scripts/checks/e2e-mock-parity.mts --base origin/main --head HEAD` — passed. - `NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli` — passed. - `npm run test:changed` — the growth-guardrail preflight passed; no additional source tests were selected after base integration. - `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` — passed at `1f5269c49138fea461d3351f5d5c39c73f5d1ba1` against canonical main `37261efb99c0dcbfcef6551efa0c59357e96fcbe`. - The pre-repair exact-head hosted CI run [34666334600](https://github.com/NVIDIA/NemoClaw/actions/runs/34666334600) passed every selected job, including all 12 CLI shards. Current-head run [34668234877](https://github.com/NVIDIA/NemoClaw/actions/runs/34668234877) is qualifying the one-line E2E repair. - Trusted manual PR E2E run [34667270786](https://github.com/NVIDIA/NemoClaw/actions/runs/34667270786) ran `inference-routing,network-policy` in mock mode against head `092fdefc472882cd135a4f839d2285da4969b467`, with correlation `57e03ed4-c1ad-4a14-9f45-112ad6c8d10a`. Network policy passed. TC-INF-12 failed after credential rotation because its second assertion still required only the generation-scoped placeholder. Cleanup and artifact upload passed. Commit `1f5269c49138fea461d3351f5d5c39c73f5d1ba1` reuses the bounded credential-reference matcher for the rotated placeholder. - The diff contains no secrets, API keys, or credentials. ## Review notes Alternative review completed for `1f5269c49138fea461d3351f5d5c39c73f5d1ba1`. Local Advisor failed before specialist analysis because its OpenShell sandbox never passed supervisor-relay readiness (`sandbox is not ready`, SSH status 255); cleanup succeeded, but no specialist artifacts were produced. Manual review of the full diff and the one-line E2E repair found no remaining actionable issue. The repair reuses the bounded matcher already exercised by the fast support test. Focused tests and canonical validation passed. The residual limitation is the absence of Advisor specialist artifacts; current-head CodeRabbit and trusted E2E evidence remain pending. ## Dependency - [#11598](#11598) merged as `37261efb99c0dcbfcef6551efa0c59357e96fcbe`; that fix is integrated into the current head, so qualification has resumed. --- Signed-off-by: Julie Yaunches <[email protected]> --------- Signed-off-by: Julie Yaunches <[email protected]>
## Outcome Main's platform workflow now retains and serializes results for every tested commit instead of canceling older evidence. The macOS and WSL non-live shards get explicit platform prerequisites and hermetic fixture behavior, while live E2E setup happens only after the non-live suite. ## Reason #11208 requires all four macOS shards and all four WSL shards to pass on at least two consecutive distinct main commits. The current workflow cancels older runs and relies on undeclared platform behavior, so it cannot produce that acceptance evidence reliably. This is a narrow competing fix to #11212 and does not include its production gateway, dashboard, TLS, or runtime redesign. ### Related issues Fixes #11208 Refs #11212 ## Changes - Serialize platform runs per ref with a retained pending queue and `cancel-in-progress: false`, without adding a retry. - Restrict the workflow to pushes to `main`; grant package read access only to the three trusted jobs that install reviewed dependencies. - Separate macOS live E2E from the four 30-minute non-live shards and expose GNU `tar` only through a private Vitest shim. - Run WSL from a hardened ext4 worktree with explicit tools, a traverse-only shared root, and a private candidate checkout. Stop and verify Docker unavailable before non-live tests, then start it only for the main-only live path. - Scope WSL live E2E environment variables to the live step and run live commands as the test user. - Make platform fixture behavior explicit where frozen main failures proved a macOS or WSL mismatch. - Keep synthetic WSL admission from probing ambient PowerShell, and atomically publish the process-group PID fixture so readers cannot observe partial JSON. - Preserve Brev readiness diagnostics and cleanup when the initial logging step consumes the readiness budget. - Add source-shape workflow contracts and update the owning test documentation. ## Verification - `npx vitest run --changed origin/main --project cli --project plugin --project e2e-support --maxWorkers=4` - 36 files passed; 593 tests passed and 36 intentionally skipped. - `npx vitest run --changed origin/main --project installer-integration --project package-contract --maxWorkers=2` - 3 files and 137 tests passed. - `npx vitest run --project integration test/automation/e2e/platform-vitest-main-workflow.test.ts` - 16 tests passed. - Focused platform and Brev integration contracts - 16 tests passed and 59 unrelated tests skipped before the final test-only contract split. - `npx vitest run --project integration test/e2e-runtime/brev-launchable-e2e.test.ts` - all 75 tests passed on the latest repair. - `npx vitest run --project e2e-support test/e2e/support/cli-artifact-workflow-boundary.test.ts test/e2e/support/lifecycle-user-service.test.ts` - all 60 tests passed on current main, including the now-hermetic Linux lifecycle cases on macOS. - `npx vitest run --project integration test/onboarding/onboard-messaging.test.ts --maxWorkers=4` - all 14 concurrent cases passed with localhost fixture permissions enabled. - `npx vitest run --project cli src/lib/onboard/extra-provider-reconciliation-diagnostics.test.ts` - all 27 tests passed. - `npx vitest run --project cli src/lib/onboard/fatal-runtime-preflight.test.ts src/lib/sandbox/create-stream-process-group.test.ts` - both files and all 38 tests passed. - `npx vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts` - all 7 tests passed. - `npm run checks:repository` - all 19 repository checks passed. - `npm run source-shape:check` - passed with zero invalid contract exceptions. - After the protected-branch refresh, the affected onboarding and guardrail suite passed all 21 tests; the broader affected suite passed 139 tests with 16 intentional platform skips. - After the first main merge, the exact overlap tests for the Launchable gateway resolver and expired-readiness-budget fixture passed in 6.6 seconds; the independently reviewed merge retained both contracts. - `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` - pre-commit, commit-msg, build, publication, pre-push, plugin TypeScript, and CLI TypeScript validation passed on intermediate candidate `8862905203eff348bba5a2c3780d482161582de2` against merged main `bb6800b8fbb15b962822a1ef92a460dd1eab0229`. - The final main refresh at `deecd2c026dd6cd51f08b76d6c775d6ee2953f75` retained main `2d1a495762f67ed07e0a7915bd5df841086ce552`; its two resolved test files passed 72 CLI tests and 34 E2E-support tests, and all commit hooks passed. - The exact CodeRabbit repair at `306c9064abd80d99fbe10459d86bcf2ad1d27796` passed the full 75-test Brev integration file, its direct multiline fixture regression, formatting, commit hooks, and `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` including publication, plugin TypeScript, and CLI TypeScript checks. - The final refresh at `81f719ca978482bbf5dc0c758d6f3c57da178013` contains current main `02d9198fde7e012257c65b6529a9e05f02a2fb1a` and merged package-pin repair #11634. The six overlap paths passed 16 workflow tests, 60 E2E-support tests, and 53 Station installer tests; the full Brev file passed all 75 tests. - The six local package-pin contract files passed all 202 tests. Four sandbox-provisioning cases first hit a macOS file-policy `chmod` denial; the exact unchanged 58-test file passed outside that restriction. - `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` - all repository, build, publication, plugin TypeScript, and CLI TypeScript checks passed at refreshed head `81f719ca978482bbf5dc0c758d6f3c57da178013`. - The exact credential-order repair at final head `2486681d314eb40253de51fcae9d98db6f5f3b04` passed all 16 platform workflow contracts and the full `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` gate. - Exact-head CI run `34782389481` passed all 12 test shards, the `cli-tests` aggregate, and the real final checks gate. Exact-head managed-image run `34782389430` also passed staging, both Pi architectures, all direct startups, all-agent activation, and both MCP discovery passes. - Exact-head CodeRabbit run `2caaccce-7e32-42a9-a1e0-9da60974b84f` completed with no actionable comments, low merge risk, and zero unresolved threads. - Exact-head PR Review Advisor run `34783267705` completed all nine specialists. Every structured finding ledger is clear; the only required E2E selector was `staging-brev-launchable`. - Trusted E2E run `34792538948` passed `staging-brev-launchable` and the real `Relevant E2E` aggregate for exact candidate `2486681d314eb40253de51fcae9d98db6f5f3b04`. It verified image and runtime provenance, passed the full E2E suite, deleted the Brev workspace exactly once, and confirmed it absent. - `git diff --check` - passed. - Secret scanning passed and the diff contains no secrets, API keys, or credentials. ## Review notes The platform workflow, WSL helper, and E2E shell paths received independent pre-publication review. The first review found three blockers: package permission exposed to manual candidate runs, an unbound off-main SDK artifact input, and no proof that package installation left Docker stopped before WSL non-live tests. This revision removes manual and artifact execution, narrows permissions exactly, and adds a stop plus negative `docker info` assertion. Final re-review found no blockers. The first PR CI run and its one authorized rerun both reproduced the same unchanged fixed-port onboarding fixture failure. The identical file, line, and message also appeared on unrelated PRs. Main then merged #11598, which serializes that exact fixture. A protected update-branch refresh brought in the fix, and this candidate removed its temporary test seam so the final diff does not duplicate main's ownership. CodeRabbit identified three initial valid gaps: a skipped Brev refresh was initialized as a numeric failure, the WSL candidate checkout ended world-readable, and an adversarial diagnostic test no longer exercised reconciliation. The repair commit uses an explicit skipped state, modes `0711` and `0700` for the WSL parent and checkout, and restores the reconciliation assertion outside the parser timing window. Its request to execute generated `chmod` commands was not adopted: the existing test already runs the real PowerShell generator and asserts its output, while executing `chmod` would retest host tooling and would not be portable to this harness. A later exact-head review found that the delayed fake `tee` retained only the first input line. The first repair streamed every line and added a byte-for-byte stdout and lane-log regression. A second review correctly noted that it synthesized a trailing newline for an unterminated final record; `ca0b537cfbd09ba53635088d66d57e8883262181` now preserves each record's actual termination while delaying only the readiness message. The same review's shared rebuild-harness cursor suggestion concerns lines unchanged from the base and is outside #11208. On refreshed head `81f719ca978482bbf5dc0c758d6f3c57da178013`, CodeRabbit correctly found that the WSL credential test asserted only the presence of `unset NODE_AUTH_TOKEN`, not that removal happened before the candidate build. Final head `2486681d314eb40253de51fcae9d98db6f5f3b04` now asserts both commands and their strict order. Final independent review found two more fixture leaks. A synthetic WSL admission test still reached the ambient N1x PowerShell probe after its assertion had been weakened; it now injects the existing collector seam and restores the `n1xWslProduct: null` assertion. Frozen macOS run `34233380481` also showed that the process-group fixture could observe its PID marker after file creation but before the JSON write completed; the child now writes a same-directory pending file and atomically renames it. A full reconciliation of all frozen-run failures found no other uncovered root cause. The exact-head GitHub PR Review Advisor run `34718814124` on `deecd2c026dd6cd51f08b76d6c775d6ee2953f75` completed all nine specialists. Eight were clear. The delivery specialist claimed `queue: max` was unsupported, but [current GitHub Actions documentation](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency#example-queueing-multiple-pending-runs) explicitly supports that setting with up to 100 pending runs and FIFO processing. Removing concurrency or grouping by commit would increase simultaneous macOS, WSL, and credentialed live-E2E work without improving retention, so the documented serialized queue remains. The reduction specialist's first artifact upload ended in a transient `ECONNRESET`; its authorized job-only retry completed successfully with a clear report. The later exact-head Advisor run `34721055992` on `306c9064abd80d99fbe10459d86bcf2ad1d27796` also completed all nine specialists. Seven were clear. Architecture and customer behavior repeated the same disproven `queue: max` claim and had no other finding. Final run `34783267705` reviewed exact head `2486681d314eb40253de51fcae9d98db6f5f3b04`; all nine finding ledgers were clear, delivery explicitly accepted the one-item queue, and operability's required `staging-brev-launchable` selector passed in run `34792538948`. Repeated `npm run review:local` attempts could not produce a report because the local OpenShell gateway refused connections while the advisor configured its specialist sandbox. The dependency bootstrap completed, and each failure occurred before any specialist review ran. `npm run check` also reports pre-existing Hadolint findings in unchanged Dockerfiles; the candidate's path-scoped `validate:pr` gate passes. The managed-image checks at `306c9064abd80d99fbe10459d86bcf2ad1d27796` had three inherited Debian Trixie `curl=8.14.1-2+deb13u4` pin failures and one shared gateway-recovery timeout reproduced on three independent PRs. This PR changes neither affected Dockerfile nor the managed-image workflow. #11634 owned the coupled pin repair and merged as `a0cc79bfe4a25a7039ba61dbbb65c15864b12be4`; the final refresh contains that commit and its local pin contracts pass. The unchanged gateway failure was not rerun. Fresh exact-head run `34782389430` passed the complete managed-image workflow. The first focused Launchable dispatch started before that exact-head managed-image workflow completed and was rejected before candidate execution. The next dispatch reached the external image producer but reproduced the same missing `src/lib/providerless-inference.ts` build-context failure as an untouched-base run; this PR changes neither that file nor the Dockerfile. `brevdev/nemoclaw-image` then merged its owning context repair in `e9001710f3d37b4f3891bc18b43c57b1a4da5abc`. Final dispatch `34792538948` used that producer revision, passed full E2E for the exact candidate, verified cleanup, and retained no high-risk credential literal in the reviewed logs. The protected branch rejects force pushes, and GitHub's rebase update failed without changing state. The successful update-branch operation therefore recorded one merge commit. A patch-identical local rebase had already verified that both candidate commits replayed cleanly; the post-refresh cleanup removed only the now-redundant port seam. Main later added #11494 while the final fixture repairs were being validated. Its gateway ownership and command-evidence changes overlapped five files but produced one additive fixture-option conflict. The resolution retains main's declared gateway-port lookup and command evidence together with this candidate's bounded readiness diagnostics. Two broad local fixture runs crossed host suspension and produced invalid deadline evidence; the two exact conflict-path tests passed after wake, and GitHub CI is the authoritative unsuspended full-lane result. Main advanced again during that validation. Six files overlapped, with conflicts only in two test fixtures. The resolution keeps main's pinned Docker context and supervised artifact process while preserving the candidate's safe macOS trust root and explicit BSD tar for the GNU-tar-shadowed platform lane. Independent review found the other four auto-merges disjoint, and the exact resolved files passed all 106 tests. After #11634 merged, the required final refresh to main `02d9198fde7e012257c65b6529a9e05f02a2fb1a` produced six overlaps and one textual conflict in the platform workflow test. The resolution retains main's removal of unused declarations and all candidate workflow assertions. Main also made the lifecycle user-service fixture hermetic on macOS, so the refresh removes this candidate's obsolete Linux-only skip instead of weakening the new coverage. Two independent reviews found no other superseded behavior or unresolved overlap. The validation-surface change is limited to three exact entries in `ci/source-shape-test-budget.json`, each paired with an adjacent compatibility or security contract annotation. Validator implementations, hook configuration, manifests, dependency lockfiles, and executable permissions match the base. Publication is authorized by the maintainer's request for this competing PR. The issue's final acceptance evidence can exist only after merge: this workflow must pass on two consecutive distinct main commits. The retained queue makes that evidence observable without manufacturing an unrelated commit. --- Signed-off-by: Rebecca Sliter <[email protected]> --------- Signed-off-by: Rebecca Sliter <[email protected]> Co-authored-by: Rebecca Sliter <[email protected]>
Outcome
Keeps the dashboard-port-owning onboard-messaging fixture out of sibling overlap, preventing the repeated port collision seen in sharded CI. The other 13 fixtures remain concurrent, preserving nearly all of the suite speedup from #11581.
Reason
The merged parallelization made all 14 child-process fixtures concurrent, but this one case still exercises the real shared dashboard-port allocator. It failed twice on clean GitHub runners because a sibling fixture held the same default port.
Changes
reuses sandbox without refreshing unselected ambient messaging providersas sequential inside the concurrent suite.Verification
npx vitest run --project integration test/onboarding/onboard-messaging.test.ts --sequence.shuffle --sequence.seed=11598— 14/14 passed in 28.52s test time.npx vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts— 7/7 passed.npm run build:cli— passed.npm --prefix nemoclaw run build— passed.NODE_OPTIONS=--max-old-space-size=8192 npm run check:diff— passed, including formatting, lint, secret scan, source-shape budget, repository checks, and CLI type-check.cb41cdcb40ab77ddd084bf371366012cc175adf1— all 12 CLI shards and all aggregate checks passed; shard 9 passed in 8m46s.cb41cdcb40ab77ddd084bf371366012cc175adf1is Verified.Review notes
Primary evidence: the same untouched fixture failed on the original shard and its clean retry. Both failures were default dashboard-port collisions after #11581 made the suite concurrent.
Signed-off-by: Charan Jagwani [email protected]
Summary by CodeRabbit