Skip to content

fix(sandbox): keep rlimit shell hooks quiet - #5865

Merged
jyaunches merged 7 commits into
mainfrom
hotfix/rlimit-shell-hooks-quiet
Jun 26, 2026
Merged

fix(sandbox): keep rlimit shell hooks quiet#5865
jyaunches merged 7 commits into
mainfrom
hotfix/rlimit-shell-hooks-quiet

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep connect/login shell rlimit hooks quiet and best-effort so startup diagnostics do not pollute command, agent, or inference response streams
  • preserve loud PID 1 entrypoint rlimit enforcement while shell hooks use verify_resource_limits --quiet || true
  • add regression coverage proving shell hooks remain silent when verification fails

Root cause

PR #5682 added verify_resource_limits to /etc/profile.d and /etc/bash.bashrc hooks. When a shell cannot report/enforce a limit, that non-quiet verification emits [SECURITY] ... diagnostics on stderr before user commands run. Nightly E2E jobs then captured those diagnostics in API/model probes and failed assertions expecting clean responses.

Test plan

  • ./node_modules/.bin/vitest run test/sandbox-rlimit-hooks.test.ts test/sandbox-provisioning.test.ts test/sandbox-build-context.test.ts test/sandbox-init.test.ts
  • targeted nightly E2E dispatch pending for the rlimit-output-contamination failures

Refs #5682 / #2173.

Summary by CodeRabbit

  • New Features

    • Added a new explicit test job for the rlimit connect scenario, making it selectable on demand in CI.
    • Improved shell startup behavior so resource-limit checks no longer interrupt builds or login shells when verification fails.
  • Bug Fixes

    • Reduced noisy security diagnostics during shell startup.
    • Messaging channel detection now considers built-in channel availability more consistently.
  • Tests

    • Expanded coverage for silent rlimit verification failures and the new workflow/job selection path.

@coderabbitai

coderabbitai Bot commented Jun 26, 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

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: a2f2d5f7-e7a4-44d2-ae44-950a1e7381d3

📥 Commits

Reviewing files that changed from the base of the PR and between 8add3fe and f00a004.

📒 Files selected for processing (1)
  • src/lib/onboard/messaging-channel-setup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/onboard/messaging-channel-setup.ts

📝 Walkthrough

Walkthrough

Shell-init rlimit verification now ignores failures, generated sandbox provisioning shims and shell-hook tests were updated accordingly, a new explicit-only sandbox-rlimits-connect-vitest workflow job and boundary checks were added, and onboarding messaging detection now includes manifest registry channels.

Changes

Sandbox rlimit hook suppression

Layer / File(s) Summary
Shell hook generation
Dockerfile.base, Dockerfile, agents/hermes/Dockerfile, test/sandbox-provisioning.test.ts
System shell-init snippets and generated rlimitShim strings append `
Hook silence assertions
test/sandbox-rlimit-hooks.test.ts
The shared rlimitShim, failing-verification helper, and replay assertions cover silent execution when verification fails.
Connect startup diagnostics
test/e2e-scenario/live/sandbox-rlimits-connect.test.ts
The live connect scenario asserts that shell startup emits no [SECURITY] rlimit diagnostics before user commands.

E2E workflow wiring for sandbox-rlimits connect

Layer / File(s) Summary
Workflow job and PR reporting
.github/workflows/e2e-vitest-scenarios.yaml
The dispatch help text, free-standing sandbox-rlimits-connect-vitest job, artifact upload, and PR reporting entries are added together.
Selector and boundary validation
test/e2e-scenario/support-tests/rlimit-connect-workflow-boundary.test.ts, tools/e2e-scenarios/workflow-boundary.mts
Selector-mapping tests and workflow-boundary rules recognize sandbox-rlimits-connect-vitest as an explicit-only job for sandbox-rlimits-connect, exclude it from full-suite selection, and validate its environment, run step, and report-script entries.

Messaging channel availability

Layer / File(s) Summary
Availability context inputs
src/lib/onboard/messaging-channel-setup.ts
detectMessagingChannelsFromEnv now calls getMessagingManifestAvailabilityContext with the built-in manifest registry list as well as the optional agent.

Sequence Diagram(s)

sequenceDiagram
  participant dispatch as "workflow_dispatch"
  participant workflow as "e2e-vitest-scenarios"
  participant job as "sandbox-rlimits-connect-vitest"
  participant report as "report-to-pr"
  dispatch->>workflow: select sandbox-rlimits-connect-vitest
  workflow->>job: run live Vitest job
  job->>report: provide job result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5840 — Changes the same sandbox-rlimits.sh verification path and shell-init hooks that this PR now makes non-fatal.
  • NVIDIA/NemoClaw#5693 — Adds explicit-only free-standing E2E job handling in tools/e2e-scenarios/workflow-boundary.mts and the Vitest workflow.
  • NVIDIA/NemoClaw#5788 — Uses detectMessagingChannelsFromEnv, the onboarding path whose availability context is expanded here with manifestRegistry.list().

Suggested labels

area: security

Suggested reviewers

  • cv

Poem

A bunny hopped through startup shade,
and every rlimit frown just swayed.
The workflow binkied through the night,
while channel whispers stayed in sight.
🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 is concise and accurately summarizes the main change: making sandbox rlimit shell hooks quiet and best-effort.
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.
✨ 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 hotfix/rlimit-shell-hooks-quiet

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

@github-code-quality

github-code-quality Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the hotfix/rlimit-shell-... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main hotfix/rlimit-shell-... f00a004 +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/li...bprocess-env.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/bl...print/runner.ts 95%
nemoclaw/src/co...ration-state.ts 94%
nemoclaw/src/bl...ate-networks.ts 94%
nemoclaw/src/index.ts 94%

TypeScript / code-coverage/cli

The overall coverage in the hotfix/rlimit-shell-... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main hotfix/rlimit-shell-... f00a004 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/actions...dbox/rebuild.ts 72%
src/lib/sandbox/config.ts 72%
src/lib/onboard/preflight.ts 62%
src/lib/shields/index.ts 62%
src/lib/actions...licy-channel.ts 60%
src/lib/state/sandbox.ts 56%
src/lib/policy/index.ts 48%
src/lib/onboard...er-gpu-patch.ts 47%
src/lib/onboard.ts 19%

Updated June 26, 2026 16:51 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Blocked

Merge posture: Do not merge until addressed
Primary next action: Fix PRA-2: Keep RLIMIT shell-hook failures observable instead of swallowing the whole chain; then add or justify PRA-T1.
Open items: 1 required · 1 warning · 0 suggestions · 7 test follow-ups
Since last review: 0 prior items resolved · 2 still apply · 0 new items found

Action checklist

  • PRA-2 Fix: Keep RLIMIT shell-hook failures observable instead of swallowing the whole chain in Dockerfile.base:169
  • PRA-1 Resolve or justify: Source-of-truth review needed: System-wide RLIMIT profile/bashrc hook suppression
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Acceptance clause
  • PRA-T7 Add or justify test follow-up: System-wide RLIMIT profile/bashrc hook suppression

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Required security Dockerfile.base:169 Narrow the compatibility handling to the specific benign startup-noise case. Keep the source of truth in `scripts/lib/sandbox-rlimits.sh` or a small wrapper that suppresses only known unsupported-limit diagnostics, while preserving an observable non-user-stream or test-visible failure signal for helper source errors, `harden_resource_limits --quiet` failures, and supported `nproc`/`nofile` verification drift. Do not apply `|| true` to the whole source/harden/verify chain.

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-2 Required — Keep RLIMIT shell-hook failures observable instead of swallowing the whole chain

  • Location: Dockerfile.base:169
  • Category: security
  • Problem: The generated profile/bashrc hook now runs `[ -f ... ] && . sandbox-rlimits.sh && harden_resource_limits --quiet && verify_resource_limits --quiet || true`. That broad `|| true` applies to the entire security path: a missing or syntax-broken helper, a failed hardening call, or supported `nproc`/`nofile` verification drift all become silent successful shell startup. The same hook shape is mirrored in `Dockerfile` stale-base replay and `agents/hermes/Dockerfile`, and the changed tests now stub `verify_resource_limits` to return nonzero while asserting status 0 and empty stderr.
  • Impact: Connect/login shells can start without any test-visible or operational signal that fork-process or file-descriptor limits failed to load, failed to apply, or drifted. That weakens sandbox denial-of-service containment and can let future fork-storm or file-descriptor exhaustion regressions pass unnoticed.
  • Required action: Narrow the compatibility handling to the specific benign startup-noise case. Keep the source of truth in `scripts/lib/sandbox-rlimits.sh` or a small wrapper that suppresses only known unsupported-limit diagnostics, while preserving an observable non-user-stream or test-visible failure signal for helper source errors, `harden_resource_limits --quiet` failures, and supported `nproc`/`nofile` verification drift. Do not apply `|| true` to the whole source/harden/verify chain.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Read `Dockerfile.base:169` and `Dockerfile.base:182`, `Dockerfile:955` and `Dockerfile:972`, and `agents/hermes/Dockerfile:129` and `agents/hermes/Dockerfile:135`; then inspect `test/sandbox-rlimit-hooks.test.ts:170-197` and its calls at lines 421, 501, and 552, which assert silent success when `verify_resource_limits` returns 1.
  • Missing regression test: Replace `expectSystemRlimitHookIsSilentWhenVerificationFails` with negative hook tests proving: a supported `nofile` verification failure remains observable, a missing or syntax-broken `sandbox-rlimits.sh` helper remains observable, and `harden_resource_limits --quiet` returning nonzero remains observable. Keep a separate positive test proving unsupported `nproc` under POSIX sh stays quiet while supported `nofile` is still capped and verified.
  • Done when: The required change is committed and verification passes: Read `Dockerfile.base:169` and `Dockerfile.base:182`, `Dockerfile:955` and `Dockerfile:972`, and `agents/hermes/Dockerfile:129` and `agents/hermes/Dockerfile:135`; then inspect `test/sandbox-rlimit-hooks.test.ts:170-197` and its calls at lines 421, 501, and 552, which assert silent success when `verify_resource_limits` returns 1.
  • Evidence: `scripts/lib/sandbox-rlimits.sh` already treats unsupported per-limit checks as compatible but returns nonzero for supported-limit drift. The PR changes the Dockerfile-generated hooks to `verify_resource_limits --quiet || true`, and the changed test helper writes `verify_resource_limits() { ... return 1; }` then expects `result.status` to be 0 and `result.stderr` to be empty.
Review findings by urgency: 1 required fix, 1 item to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Source-of-truth review needed: System-wide RLIMIT profile/bashrc hook suppression

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Current tests prove broad silent success when verification returns 1; they do not prove that only benign unsupported-limit startup noise is tolerated while helper/source/harden/supported-limit failures remain observable.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `Dockerfile.base`, `Dockerfile`, and `agents/hermes/Dockerfile` all generate hooks ending in `verify_resource_limits --quiet || true`, while `scripts/lib/sandbox-rlimits.sh` already distinguishes unsupported flags from supported-limit verification failures.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Simplification opportunities: 1 possible cut

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-2 shrink (Dockerfile.base:169): The duplicated broad hook-level `|| true` suppression in the base, OpenClaw stale-base replay, and Hermes stale-base replay hook strings.
    • Replacement: Centralize a narrow startup-quiet compatibility wrapper in `scripts/lib/sandbox-rlimits.sh` or an adjacent hook helper, and have Dockerfile-generated hooks call that wrapper so only classified benign unsupported-limit startup noise is suppressed.
    • Safety boundary: Do not reintroduce `[SECURITY]` diagnostics into user command/model response streams, but preserve RLIMIT enforcement and keep helper/source/harden/supported-limit verification failures observable to tests or operational diagnostics.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Hook negative: a supported `nofile` verification failure remains observable instead of being swallowed by shell startup.. The PR changes sandbox resource-limit enforcement hooks, Dockerfile-generated runtime configuration, and a secret-bearing manual workflow. Existing changed tests cover quiet startup, selector wiring, and happy-path rlimit enforcement, but they do not cover the security-sensitive negative paths and currently assert that verifier failure is swallowed.
  • PRA-T2 Runtime validation — Hook negative: a missing or syntax-broken `sandbox-rlimits.sh` helper produces a test-visible failure signal rather than silent successful startup.. The PR changes sandbox resource-limit enforcement hooks, Dockerfile-generated runtime configuration, and a secret-bearing manual workflow. Existing changed tests cover quiet startup, selector wiring, and happy-path rlimit enforcement, but they do not cover the security-sensitive negative paths and currently assert that verifier failure is swallowed.
  • PRA-T3 Runtime validation — Hook negative: `harden_resource_limits --quiet` returning nonzero is not treated as a successful protected shell startup.. The PR changes sandbox resource-limit enforcement hooks, Dockerfile-generated runtime configuration, and a secret-bearing manual workflow. Existing changed tests cover quiet startup, selector wiring, and happy-path rlimit enforcement, but they do not cover the security-sensitive negative paths and currently assert that verifier failure is swallowed.
  • PRA-T4 Runtime validation — Hook positive: unsupported `nproc` under POSIX sh remains quiet while supported `nofile` is still set and verified.. The PR changes sandbox resource-limit enforcement hooks, Dockerfile-generated runtime configuration, and a secret-bearing manual workflow. Existing changed tests cover quiet startup, selector wiring, and happy-path rlimit enforcement, but they do not cover the security-sensitive negative paths and currently assert that verifier failure is swallowed.
  • PRA-T5 Runtime validation — Runtime integration: a rebuilt connect/login shell starts without a `[SECURITY]` preamble while still reporting capped `nproc`/`nofile` and rejecting bounded fork and file-descriptor exhaustion probes.. The PR changes sandbox resource-limit enforcement hooks, Dockerfile-generated runtime configuration, and a secret-bearing manual workflow. Existing changed tests cover quiet startup, selector wiring, and happy-path rlimit enforcement, but they do not cover the security-sensitive negative paths and currently assert that verifier failure is swallowed.
  • PRA-T6 Acceptance clause — No deterministic linked issue clauses were available in the review context. — add test evidence or identify existing coverage. `linkedIssues` was empty in the validation context. PR-body references to issues are treated as untrusted evidence and were not used as acceptance clauses.
  • PRA-T7 System-wide RLIMIT profile/bashrc hook suppression — Current tests prove broad silent success when verification returns 1; they do not prove that only benign unsupported-limit startup noise is tolerated while helper/source/harden/supported-limit failures remain observable.. `Dockerfile.base`, `Dockerfile`, and `agents/hermes/Dockerfile` all generate hooks ending in `verify_resource_limits --quiet || true`, while `scripts/lib/sandbox-rlimits.sh` already distinguishes unsupported flags from supported-limit verification failures.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: System-wide RLIMIT profile/bashrc hook suppression

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Current tests prove broad silent success when verification returns 1; they do not prove that only benign unsupported-limit startup noise is tolerated while helper/source/harden/supported-limit failures remain observable.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `Dockerfile.base`, `Dockerfile`, and `agents/hermes/Dockerfile` all generate hooks ending in `verify_resource_limits --quiet || true`, while `scripts/lib/sandbox-rlimits.sh` already distinguishes unsupported flags from supported-limit verification failures.

PRA-2 Required — Keep RLIMIT shell-hook failures observable instead of swallowing the whole chain

  • Location: Dockerfile.base:169
  • Category: security
  • Problem: The generated profile/bashrc hook now runs `[ -f ... ] && . sandbox-rlimits.sh && harden_resource_limits --quiet && verify_resource_limits --quiet || true`. That broad `|| true` applies to the entire security path: a missing or syntax-broken helper, a failed hardening call, or supported `nproc`/`nofile` verification drift all become silent successful shell startup. The same hook shape is mirrored in `Dockerfile` stale-base replay and `agents/hermes/Dockerfile`, and the changed tests now stub `verify_resource_limits` to return nonzero while asserting status 0 and empty stderr.
  • Impact: Connect/login shells can start without any test-visible or operational signal that fork-process or file-descriptor limits failed to load, failed to apply, or drifted. That weakens sandbox denial-of-service containment and can let future fork-storm or file-descriptor exhaustion regressions pass unnoticed.
  • Required action: Narrow the compatibility handling to the specific benign startup-noise case. Keep the source of truth in `scripts/lib/sandbox-rlimits.sh` or a small wrapper that suppresses only known unsupported-limit diagnostics, while preserving an observable non-user-stream or test-visible failure signal for helper source errors, `harden_resource_limits --quiet` failures, and supported `nproc`/`nofile` verification drift. Do not apply `|| true` to the whole source/harden/verify chain.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Read `Dockerfile.base:169` and `Dockerfile.base:182`, `Dockerfile:955` and `Dockerfile:972`, and `agents/hermes/Dockerfile:129` and `agents/hermes/Dockerfile:135`; then inspect `test/sandbox-rlimit-hooks.test.ts:170-197` and its calls at lines 421, 501, and 552, which assert silent success when `verify_resource_limits` returns 1.
  • Missing regression test: Replace `expectSystemRlimitHookIsSilentWhenVerificationFails` with negative hook tests proving: a supported `nofile` verification failure remains observable, a missing or syntax-broken `sandbox-rlimits.sh` helper remains observable, and `harden_resource_limits --quiet` returning nonzero remains observable. Keep a separate positive test proving unsupported `nproc` under POSIX sh stays quiet while supported `nofile` is still capped and verified.
  • Done when: The required change is committed and verification passes: Read `Dockerfile.base:169` and `Dockerfile.base:182`, `Dockerfile:955` and `Dockerfile:972`, and `agents/hermes/Dockerfile:129` and `agents/hermes/Dockerfile:135`; then inspect `test/sandbox-rlimit-hooks.test.ts:170-197` and its calls at lines 421, 501, and 552, which assert silent success when `verify_resource_limits` returns 1.
  • Evidence: `scripts/lib/sandbox-rlimits.sh` already treats unsupported per-limit checks as compatible but returns nonzero for supported-limit drift. The PR changes the Dockerfile-generated hooks to `verify_resource_limits --quiet || true`, and the changed test helper writes `verify_resource_limits() { ... return 1; }` then expects `result.status` to be 0 and `result.stderr` to be empty.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: sandbox-rlimits-connect-vitest, rebuild-openclaw-vitest, rebuild-hermes-vitest, messaging-providers-vitest
Optional E2E: cloud-onboard-vitest, hermes-e2e-vitest

Dispatch hint: sandbox-rlimits-connect-vitest,rebuild-openclaw-vitest,rebuild-hermes-vitest,messaging-providers-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • sandbox-rlimits-connect-vitest (high): Direct live acceptance coverage for the changed rlimit shell hooks: builds/onboards a sandbox, connects through nemoclaw <sandbox> connect, verifies login and interactive shell limits, ensures fork storms are denied, and checks startup diagnostics are silent.
  • rebuild-openclaw-vitest (medium): Required because OpenClaw Dockerfile layers changed. This validates the rebuilt OpenClaw sandbox image path that users exercise after Dockerfile/base changes.
  • rebuild-hermes-vitest (medium): Required because agents/hermes/Dockerfile changes the Hermes stale-base rlimit hook replay. Hermes image rebuild coverage is needed even though the new connect rlimit live test targets the OpenClaw sandbox path.
  • messaging-providers-vitest (medium): Required for the onboarding messaging change: channel availability detection now receives the full manifest list, which can affect provider/channel selection during real messaging setup flows.

Optional E2E

  • cloud-onboard-vitest (high): Useful broader confidence for hosted onboarding because an onboarding module changed, but the touched file is not part of the onboarding resume state-machine slice that mandates resume/repair coverage.
  • hermes-e2e-vitest (high): Useful end-to-end Hermes runtime confidence after a Hermes Dockerfile hook change, beyond rebuild validation.

New E2E recommendations

  • Hermes sandbox rlimit connect coverage (medium): This PR changes Hermes rlimit hook replay, but the live sandbox rlimit connect acceptance test exercises the OpenClaw sandbox path. Existing rebuild coverage verifies image construction, while a Hermes-specific live connect-shell rlimit test would close the runtime behavior gap.
    • Suggested test: Add a Hermes live connect rlimit acceptance scenario analogous to sandbox-rlimits-connect, selected explicitly because it is destructive/costly.

Dispatch hint

  • Workflow: E2E / Vitest Scenarios
  • jobs input: sandbox-rlimits-connect-vitest,rebuild-openclaw-vitest,rebuild-hermes-vitest,messaging-providers-vitest

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: sandbox-rlimits-connect-vitest, channels-stop-start-vitest
Optional Vitest E2E scenarios: messaging-providers-vitest

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-rlimits-connect-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • sandbox-rlimits-connect-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/sandbox-rlimits-connect.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-rlimits-connect-vitest
  • channels-stop-start-vitest: The messaging-channel setup change affects env-detected channel availability for the selected agent; channels-stop-start runs the live messaging channel lifecycle matrix for both OpenClaw and Hermes.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest

Optional Vitest E2E scenarios

  • messaging-providers-vitest: Optional broader coverage for provider placeholder, policy, runtime, and send contracts adjacent to the messaging availability-context change.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=messaging-providers-vitest

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • Dockerfile
  • Dockerfile.base
  • agents/hermes/Dockerfile
  • src/lib/onboard/messaging-channel-setup.ts
  • test/e2e-scenario/live/sandbox-rlimits-connect.test.ts
  • test/e2e-scenario/support-tests/rlimit-connect-workflow-boundary.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28248224270
Target ref: 6a15142d190beae6897dd6e0ba8cd4d61e13e1e8
Workflow ref: main
Requested jobs: hermes-root-entrypoint-smoke-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 28247964531
Target ref: hotfix/rlimit-shell-hooks-quiet
Requested jobs: bedrock-runtime-compatible-anthropic-e2e,messaging-compatible-endpoint-e2e,openclaw-inference-switch-e2e,hermes-inference-switch-e2e,openclaw-anthropic-inference-switch-e2e,hermes-anthropic-inference-switch-e2e,agent-turn-latency-e2e,common-egress-agent-e2e,sessions-agents-cli-e2e,hermes-dashboard-e2e,openclaw-discord-pairing-e2e
Summary: 10 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
agent-turn-latency-e2e ✅ success
bedrock-runtime-compatible-anthropic-e2e ✅ success
common-egress-agent-e2e ✅ success
hermes-anthropic-inference-switch-e2e ✅ success
hermes-dashboard-e2e ✅ success
hermes-inference-switch-e2e ✅ success
messaging-compatible-endpoint-e2e ✅ success
openclaw-anthropic-inference-switch-e2e ✅ success
openclaw-discord-pairing-e2e ✅ success
openclaw-inference-switch-e2e ✅ success
sessions-agents-cli-e2e ❌ failure

Failed jobs: sessions-agents-cli-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28249358493
Target ref: d5fed106bb2bcd2d22157ff670711911838a8ca1
Workflow ref: main
Requested jobs: hermes-root-entrypoint-smoke-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
hermes-root-entrypoint-smoke-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28250464279
Workflow ref: hotfix/rlimit-shell-hooks-quiet
Requested scenarios: (default — all supported)
Requested jobs: sandbox-rlimits-connect-vitest
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
sandbox-rlimits-connect-vitest ❌ failure

Failed jobs: sandbox-rlimits-connect-vitest. Check run artifacts for logs.

@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 (1)
tools/e2e-scenarios/workflow-boundary.mts (1)

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

Validation block is correct; consider extracting it into a dedicated validator for consistency.

The block faithfully mirrors the workflow job (needs, explicit-only if, env opt-ins, artifact dir, run step, secret wiring). Most comparable jobs use a dedicated validateXxxVitestJob(errors, jobs) helper rather than an inline block; extracting this would keep validateE2eVitestScenariosWorkflowBoundary uniform and easier to scan. Optional given the inline jetson precedent just above.

🤖 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 `@tools/e2e-scenarios/workflow-boundary.mts` around lines 7805 - 7849, The
sandbox-rlimits-connect-vitest validation is correct but should be moved out of
the inline block for consistency with the other validators. Extract this logic
from validateE2eVitestScenariosWorkflowBoundary into a dedicated helper such as
validateSandboxRlimitConnectVitestJob(errors, jobs), and keep the same checks
for needs, explicitOnlyFreeStandingJobIf, env opt-ins, artifact dir, Run sandbox
rlimit connect live test, and NVIDIA_INFERENCE_API_KEY wiring.
🤖 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 `@tools/e2e-scenarios/workflow-boundary.mts`:
- Around line 7805-7849: The sandbox-rlimits-connect-vitest validation is
correct but should be moved out of the inline block for consistency with the
other validators. Extract this logic from
validateE2eVitestScenariosWorkflowBoundary into a dedicated helper such as
validateSandboxRlimitConnectVitestJob(errors, jobs), and keep the same checks
for needs, explicitOnlyFreeStandingJobIf, env opt-ins, artifact dir, Run sandbox
rlimit connect live test, and NVIDIA_INFERENCE_API_KEY wiring.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d394fcea-fca4-494e-9a37-9dbbdfce2992

📥 Commits

Reviewing files that changed from the base of the PR and between d5fed10 and 0c47ed5.

📒 Files selected for processing (3)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression labels Jun 26, 2026
@wscurran

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28251663965
Workflow ref: hotfix/rlimit-shell-hooks-quiet
Requested scenarios: (default — all supported)
Requested jobs: sandbox-rlimits-connect-vitest
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
sandbox-rlimits-connect-vitest ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ⚠️ Run cancelled — no signal

Run: 28251942087
Workflow ref: hotfix/rlimit-shell-hooks-quiet
Requested scenarios: (default — all supported)
Requested jobs: sandbox-rlimits-connect-vitest
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
sandbox-rlimits-connect-vitest ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All requested jobs passed

Run: 28252272339
Workflow ref: hotfix/rlimit-shell-hooks-quiet
Requested scenarios: (default — all supported)
Requested jobs: sandbox-rlimits-connect-vitest
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
sandbox-rlimits-connect-vitest ✅ success

@jyaunches
jyaunches merged commit 84ffec1 into main Jun 26, 2026
115 checks passed
@jyaunches
jyaunches deleted the hotfix/rlimit-shell-hooks-quiet branch June 26, 2026 16:54
cv added a commit that referenced this pull request Jun 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Retire the host-local fork-storm test now that the isolated live Vitest
scenario owns the exact 5,000-process acceptance check. This prevents
the ordinary CLI suite from creating hundreds of sleeper processes that
compete with parallel Vitest workers.

## Related Issue
Refs #2173 and follow-up coverage from #5865.

## Changes
- Delete the redundant fork-storm test and its private
process-count/probe helpers from `test/sandbox-rlimit-hooks.test.ts`.
- Keep deterministic local coverage for hook installation and limit
enforcement; keep the destructive fork-denial assertion in
`sandbox-rlimits-connect`.

## Type of Change

- [x] 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification: the live
`sandbox-rlimits-connect` scenario performs the exact 5,000-process
fork-denial acceptance check, while four deterministic local tests
retain hook and limit coverage.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: test ownership changes only;
sandbox behavior is unchanged.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: verified that the
isolated live scenario retains the exact security acceptance assertion
and the local suite retains deterministic enforcement checks.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Tests**
* Updated the sandbox rlimit test suite by removing an obsolete
fork-storm scenario and related helper checks.
  * Kept the remaining replay coverage for rlimit hook behavior intact.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv added the v0.0.69 label Jun 27, 2026
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
- keep connect/login shell rlimit hooks quiet and best-effort so startup
diagnostics do not pollute command, agent, or inference response streams
- preserve loud PID 1 entrypoint rlimit enforcement while shell hooks
use `verify_resource_limits --quiet || true`
- add regression coverage proving shell hooks remain silent when
verification fails

## Root cause
PR NVIDIA#5682 added `verify_resource_limits` to `/etc/profile.d` and
`/etc/bash.bashrc` hooks. When a shell cannot report/enforce a limit,
that non-quiet verification emits `[SECURITY] ...` diagnostics on stderr
before user commands run. Nightly E2E jobs then captured those
diagnostics in API/model probes and failed assertions expecting clean
responses.

## Test plan
- `./node_modules/.bin/vitest run test/sandbox-rlimit-hooks.test.ts
test/sandbox-provisioning.test.ts test/sandbox-build-context.test.ts
test/sandbox-init.test.ts`
- targeted nightly E2E dispatch pending for the
rlimit-output-contamination failures

Refs NVIDIA#5682 / NVIDIA#2173.

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

* **New Features**
* Added a new explicit test job for the rlimit connect scenario, making
it selectable on demand in CI.
* Improved shell startup behavior so resource-limit checks no longer
interrupt builds or login shells when verification fails.

* **Bug Fixes**
  * Reduced noisy security diagnostics during shell startup.
* Messaging channel detection now considers built-in channel
availability more consistently.

* **Tests**
* Expanded coverage for silent rlimit verification failures and the new
workflow/job selection path.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Retire the host-local fork-storm test now that the isolated live Vitest
scenario owns the exact 5,000-process acceptance check. This prevents
the ordinary CLI suite from creating hundreds of sleeper processes that
compete with parallel Vitest workers.

## Related Issue
Refs NVIDIA#2173 and follow-up coverage from NVIDIA#5865.

## Changes
- Delete the redundant fork-storm test and its private
process-count/probe helpers from `test/sandbox-rlimit-hooks.test.ts`.
- Keep deterministic local coverage for hook installation and limit
enforcement; keep the destructive fork-denial assertion in
`sandbox-rlimits-connect`.

## Type of Change

- [x] 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification: the live
`sandbox-rlimits-connect` scenario performs the exact 5,000-process
fork-denial acceptance check, while four deterministic local tests
retain hook and limit coverage.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: test ownership changes only;
sandbox behavior is unchanged.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: verified that the
isolated live scenario retains the exact security acceptance assertion
and the local suite retains deterministic enforcement checks.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Tests**
* Updated the sandbox rlimit test suite by removing an obsolete
fork-storm scenario and related helper checks.
  * Kept the remaining replay coverage for rlimit hook behavior intact.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
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: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants