Skip to content

perf(nemotron): reduce sandbox tool-catalog latency#3808

Merged
ericksoa merged 8 commits into
mainfrom
fix/2600-compact-tool-catalog
May 20, 2026
Merged

perf(nemotron): reduce sandbox tool-catalog latency#3808
ericksoa merged 8 commits into
mainfrom
fix/2600-compact-tool-catalog

Conversation

@ericksoa

@ericksoa ericksoa commented May 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #2600.

Summary

  • keep OpenClaw at the repo's current 2026.4.24 pin for this PR and avoid changing model, context, token, tool-profile, deny-list, or lean-mode defaults
  • patch compatible compiled OpenClaw selection runtimes during the sandbox image build; the patch is gated by runtime shape, not by package version
  • expose only compact provider-visible controls: tool_search, tool_describe, and tool_call
  • preserve the full resolved OpenClaw tool catalog behind tool_call, including policy filtering, hooks, approvals, MCP/client tools, logging, and existing execution behavior
  • add NEMOCLAW_TOOL_CATALOG=0 as a runtime emergency rollback path for patched runtimes

Reviewer notes

  • This is a targeted backport, not an OpenClaw upgrade. The patch is applied after OpenClaw has already resolved the effective tool list, so NemoClaw does not need to duplicate OpenClaw policy, plugin, MCP, hook, or client-tool selection logic.
  • The patch is now forward-compatible across OpenClaw version bumps as long as the compiled selection runtime keeps the same compatible shape. OpenClaw package version is logged for traceability, but it is not a build blocker.
  • Shape checks are still strict on purpose. The script must find exactly one compatible selection-*.js target and exactly one of each patch point. If a future OpenClaw release rewrites the selection path, the build fails closed instead of silently shipping an unpatched or partially patched runtime.
  • tool_call delegates to the real underlying OpenClaw tool definition stored in the closure-backed catalog. The provider sees compact controls, but execution still goes through OpenClaw's existing wrapped tool definitions.
  • The Dockerfile COPY path depends on the optimized sandbox build context. This PR stages scripts/patch-openclaw-tool-catalog.js through src/lib/sandbox/build-context.ts; an earlier head failed selective E2E Docker builds until this was added.
  • Schema compaction is limited to catalog descriptions returned through tool_describe: nested title and nested schema description metadata are stripped, while tool names, root descriptions, properties, required fields, enum values, and execution semantics are preserved.

Performance evidence

OpenClaw upgrade behavior

  • Future OpenClaw upgrades should keep working automatically when the compiled selection runtime remains compatible. The unit fixture now proves a synthetic future package version patches successfully.
  • NEMOCLAW_TOOL_CATALOG=0 remains a runtime rollback switch for any patched runtime. It disables the compact wrapper and exposes direct tools again; it is not needed just because the OpenClaw package version changed.
  • If an OpenClaw upgrade changes the selection runtime enough that the patch cannot prove its insertion points, the sandbox image build fails. That is the desired review signal to either retarget the shape-aware patch or remove it if upstream has landed the native fix.
  • If a future OpenClaw release includes equivalent native compact tool-catalog behavior, the right follow-up is to retire this NemoClaw backport: delete the patch script, Dockerfile COPY/RUN, build-context staging, and replace or retire the backport-specific tests after validating upstream behavior and latency.
  • In short: this is a temporary shape-gated backport that survives ordinary version bumps, but still fails closed on runtime rewrites or once upstream behavior needs a clean retirement path.

Validation

  • node --check scripts/patch-openclaw-tool-catalog.js
  • npx vitest run test/openclaw-tool-catalog-patch.test.ts
  • npx vitest run test/sandbox-build-context.test.ts test/openclaw-tool-catalog-patch.test.ts
  • isolated retries for broad-hook failures:
    • npx vitest run test/docker-abstraction-guard.test.ts
    • npx vitest run test/cli.test.ts -t "enables OpenShell audit events before reading logs"
    • npx vitest run test/cli.test.ts -t "doctor treats a live non-cloudflared PID as stale"
    • npx vitest run test/cli.test.ts -t "connect --probe-only falls back to SSH when sandbox exec times out after starting"
  • targeted test/onboard.test.ts build-context staging assertion
  • npm run build:cli
  • npm run source-shape:check
  • npm run lint passed with an existing unrelated warning about an unused Biome suppression in src/lib/onboard/child-exit-tracker.test.ts
  • git diff --check
  • applied the patch successfully to the actual packed openclaw@2026.4.24 artifact
  • targeted OpenClaw startup/config/sandbox Vitest slice passed
  • full local CLI coverage/pre-push hook was attempted multiple times; it failed on different unrelated 5s timing flakes, and each reported failing test passed in isolation

Summary by CodeRabbit

  • New Features

    • Compact, searchable tool catalog with standardized search/describe/call interfaces so the runtime can discover and invoke tools while keeping full tool implementations hidden.
  • Tests

    • Comprehensive tests for patch application, idempotency, structure/version compatibility, and end-to-end catalog search/describe/call workflows.
  • Chores

    • Added a build-time image step that applies the catalog transformation during staging; it fails closed on unexpected bundle shape and includes the transformer in the staged build context.

Review Change Stack

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

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: f4331ff2-b7b4-416f-b2d4-17b606b5b90b

📥 Commits

Reviewing files that changed from the base of the PR and between 3c378be and b1878c5.

📒 Files selected for processing (1)
  • test/onboard.test.ts
✅ Files skipped from review due to trivial changes (1)
  • test/onboard.test.ts

📝 Walkthrough

Walkthrough

Adds a build-time Node.js patch script that injects a compact tool catalog (tool_search, tool_describe, tool_call) into OpenClaw’s compiled selection bundle, stages the script into sandbox build contexts, integrates it into the Docker build to run against pinned dist/, and adds tests validating idempotency, pinned-shape checks, and end-to-end behavior.

Changes

OpenClaw compact tool catalog patch

Layer / File(s) Summary
Patching constants & marker
scripts/patch-openclaw-tool-catalog.js
Defines the patching MARKER, exact-match target/replacement fragments, and initial patching constants.
Injected catalog helpers & tools
scripts/patch-openclaw-tool-catalog.js
Injects helper code for schema compaction, standardized result payloads, argument coercion/validation, and defines tool_search, tool_describe, and tool_call.
CLI helpers, version & listing
scripts/patch-openclaw-tool-catalog.js
Adds usage(), countOccurrences(), readOpenClawVersion(distDir), and listSelectionFiles(distDir) for discovery and validation.
Patch application & idempotency
scripts/patch-openclaw-tool-catalog.js
Implements patchSelectionText with idempotency checks, ordered string replacements, post-condition verification, and fail-closed behavior on unexpected bundle shape.
Patch orchestrator & exports
scripts/patch-openclaw-tool-catalog.js
Implements patchOpenClawToolCatalog(distDir), main(argv) CLI entry, require.main hook, file-write logic, and exports MARKER, patchOpenClawToolCatalog, patchSelectionText.
Docker build integration & staging
Dockerfile, src/lib/sandbox/build-context.ts
Copies the patch script into the runtime image with executable permissions, runs it at build time against OpenClaw's dist/ (fail-closed on unexpected bundle shape), and stages the script into the optimized sandbox build context.
Patch validation tests & build-context assertions
test/openclaw-tool-catalog-patch.test.ts, test/onboard.test.ts, test/sandbox-build-context.test.ts
Vitest fixtures validate one-time patching and idempotency, fail-closed behavior on shape/version drift, transformed provider requests (catalog-only tools) and rollback, end-to-end search/describe/call execution, and assert the script is included in staged build contexts.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

Sandbox

Suggested reviewers

  • cv
  • cjagwani

Poem

🐰 I hopped inside the bundle, soft and small,
I stitched three helpers by the old code wall.
Search, describe, and call — compact and neat,
I hide the schemas, keep the real tools sweet.
A tiny rabbit patch to make requests light and fleet.

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'perf(nemotron): reduce sandbox tool-catalog latency' accurately describes the main change: a performance optimization that compacts the OpenClaw tool catalog to reduce latency by ~3.5–4.9×.
Linked Issues check ✅ Passed The PR directly addresses the primary objective from #2600 by reducing tool-catalog latency through compaction, achieving measured ~3.5–4.9× improvement. Secondary objectives (model-fallback overhead, progress indicators, timeouts) are noted as out-of-scope for this PR but documented in PR summary.
Out of Scope Changes check ✅ Passed All changes are in-scope: patch script, Docker integration, build-context staging, and corresponding tests directly support the tool-catalog compaction objective. No unrelated feature additions or refactoring detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/2600-compact-tool-catalog

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard-e2e, kimi-inference-compat-e2e, skill-agent-e2e
Optional E2E: rebuild-openclaw-e2e, cloud-e2e

Dispatch hint: cloud-onboard-e2e,kimi-inference-compat-e2e,skill-agent-e2e

Auto-dispatched E2E: cloud-onboard-e2e, kimi-inference-compat-e2e, skill-agent-e2e via nightly-e2e.yaml at f3cf7ecd36671e79010b3c30e4ed7072085875a9nightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard-e2e (high; live cloud onboarding with NVIDIA_API_KEY, about 45 minutes timeout): Validates the source install/onboard path builds and starts a real OpenClaw sandbox image after the Dockerfile COPY/RUN addition and optimized build-context staging change.
  • kimi-inference-compat-e2e (medium-high; local mock endpoint plus sandbox onboard, about 45 minutes timeout): Hermetic OpenClaw agent/tool-call regression that exercises sandbox image build, OpenClaw config/plugin wiring, streamed tool calls, real exec tool execution, and trajectory validation. This is the closest existing E2E coverage for the patched tool-selection/runtime path.
  • skill-agent-e2e (high; live NVIDIA inference and sandbox, about 30 minutes timeout): Runs a real OpenClaw agent turn against a live model and verifies the assistant can use sandbox skill context. The compact tool catalog changes the prompt-visible tool surface and should be validated against a real assistant flow, not only fixture-level unit tests.

Optional E2E

  • rebuild-openclaw-e2e (high; live NVIDIA inference and rebuild workflow, about 60 minutes timeout): Useful additional confidence for rebuild/upgrade paths because the new patch script must also be present in staged rebuild contexts and must succeed when rebuilding an existing OpenClaw sandbox image.
  • cloud-e2e (high; live cloud E2E, about 45 minutes timeout): Broad full user-journey smoke for install, onboard, sandbox status, inference.local routing, and a simple live OpenClaw agent reply. Useful if maintainers want maximum confidence beyond the targeted jobs.

New E2E recommendations

  • openclaw-compact-tool-catalog (high): Existing E2E coverage exercises OpenClaw tool calls, but no dedicated real-sandbox E2E verifies the new catalog workflow end-to-end: provider sees only tool_search/tool_describe/tool_call, the model searches/describes, tool_call invokes an underlying real tool, trajectories are recorded correctly, and NEMOCLAW_TOOL_CATALOG=0 restores legacy behavior.
    • Suggested test: Add a hermetic OpenClaw compact tool catalog E2E with a fake OpenAI-compatible endpoint that intentionally calls tool_search, tool_describe, then tool_call for exec/read, and asserts provider request tool names plus final sandbox trajectory.

Dispatch hint

  • Workflow: .github/workflows/nightly-e2e.yaml
  • jobs input: cloud-onboard-e2e,kimi-inference-compat-e2e,skill-agent-e2e

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 26119037435
Target ref: b22207adc4a488e28b6fa2c3aa01ebdd2ccbca4b
Workflow ref: main
Requested jobs: brave-search-e2e,kimi-inference-compat-e2e,cloud-inference-e2e
Summary: 1 passed, 2 failed, 0 skipped

Job Result
brave-search-e2e ✅ success
cloud-inference-e2e ❌ failure
kimi-inference-compat-e2e ❌ failure

Failed jobs: cloud-inference-e2e, kimi-inference-compat-e2e. Check run artifacts for logs.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26119939423
Target ref: 61dce4fe4b276f3bc224f13fd601f8a85e837d63
Workflow ref: main
Requested jobs: cloud-e2e,kimi-inference-compat-e2e,skill-agent-e2e
Summary: 3 passed, 0 failed, 0 skipped

Job Result
cloud-e2e ✅ success
kimi-inference-compat-e2e ✅ success
skill-agent-e2e ✅ success

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa added the v0.0.46 Release target label May 19, 2026
@ericksoa ericksoa changed the title fix(openclaw): compact sandbox tool catalog perf(nemotron): reduce sandbox tool-catalog latency May 19, 2026
@ericksoa ericksoa added bug Something fails against expected or documented behavior enhancement: performance provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior integration: openclaw OpenClaw integration behavior UAT Issues flagged for User Acceptance Testing. NV QA Bugs found by the NVIDIA QA Team platform: brev Affects Brev hosted development environments platform: ubuntu Affects Ubuntu Linux environments labels May 19, 2026

@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: 2

🤖 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 `@scripts/patch-openclaw-tool-catalog.js`:
- Around line 207-213: In patchSelectionText, the presence of MARKER is treated
as "already patched" while only ALL_CUSTOM_TOOLS_PATTERN is checked; update
patchSelectionText to, when source.includes(MARKER) is true, also assert that
ALL_CUSTOM_TOOLS_PATTERN and the other three original-substitution pattern
constants used elsewhere in this file (the three other PATTERN constants you use
for the other substitutions) are all absent before returning { patched: false,
text: source }; if any of those patterns are still present, throw the same Error
as now so the build fails and forces re-patching. Ensure you reference the
function patchSelectionText, MARKER, ALL_CUSTOM_TOOLS_PATTERN and the three
other pattern constants when implementing the checks.
- Around line 178-191: The readOpenClawVersion function reads package.json but
doesn't enforce the pinned OpenClaw version; after obtaining payload.version in
readOpenClawVersion, add a strict check that the version === "2026.4.24" and
throw a clear Error if it does not match (e.g., "unexpected OpenClaw version:
<actual>, expected 2026.4.24"), so the script fails closed before any patching
occurs.
🪄 Autofix (Beta)

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: a9563b5a-185c-4546-be6c-a0711514bb58

📥 Commits

Reviewing files that changed from the base of the PR and between 61dce4f and 7cd79b0.

📒 Files selected for processing (2)
  • scripts/patch-openclaw-tool-catalog.js
  • test/openclaw-tool-catalog-patch.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/openclaw-tool-catalog-patch.test.ts

Comment thread scripts/patch-openclaw-tool-catalog.js
Comment thread scripts/patch-openclaw-tool-catalog.js
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26120807823
Target ref: 7cd79b030996cc79db03fae2aac9ccb232b59676
Workflow ref: main
Requested jobs: cloud-e2e,kimi-inference-compat-e2e,rebuild-openclaw-e2e
Summary: 0 passed, 0 failed, 0 skipped

Job Result
cloud-e2e ⚠️ cancelled
kimi-inference-compat-e2e ⚠️ cancelled
rebuild-openclaw-e2e ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26121130118
Target ref: 43208cc4289857fe3ce82ce9b0c254014817ec04
Workflow ref: main
Requested jobs: all (no filter)
Summary: 1 passed, 0 failed, 2 skipped

Job Result
brave-search-e2e ✅ success
channels-stop-start-e2e ⚠️ cancelled
cloud-e2e ⚠️ cancelled
cloud-inference-e2e ⚠️ cancelled
cloud-onboard-e2e ⚠️ cancelled
credential-migration-e2e ⚠️ cancelled
credential-sanitization-e2e ⚠️ cancelled
device-auth-health-e2e ⚠️ cancelled
diagnostics-e2e ⚠️ cancelled
docs-validation-e2e ⚠️ cancelled
double-onboard-e2e ⚠️ cancelled
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped
hermes-discord-e2e ⚠️ cancelled
hermes-e2e ⚠️ cancelled
hermes-inference-switch-e2e ⚠️ cancelled
hermes-slack-e2e ⚠️ cancelled
inference-routing-e2e ⚠️ cancelled
issue-2478-crash-loop-recovery-e2e ⚠️ cancelled
kimi-inference-compat-e2e ⚠️ cancelled
launchable-smoke-e2e ⚠️ cancelled
messaging-compatible-endpoint-e2e ⚠️ cancelled
messaging-providers-e2e ⚠️ cancelled
network-policy-e2e ⚠️ cancelled
onboard-repair-e2e ⚠️ cancelled
onboard-resume-e2e ⚠️ cancelled
openclaw-inference-switch-e2e ⚠️ cancelled
openclaw-slack-pairing-e2e ⚠️ cancelled
openshell-gateway-upgrade-e2e ⚠️ cancelled
overlayfs-autofix-e2e ⚠️ cancelled
rebuild-hermes-e2e ⚠️ cancelled
rebuild-hermes-stale-base-e2e ⚠️ cancelled
rebuild-openclaw-e2e ⚠️ cancelled
runtime-overrides-e2e ⚠️ cancelled
sandbox-operations-e2e ⚠️ cancelled
sandbox-survival-e2e ⚠️ cancelled
shields-config-e2e ⚠️ cancelled
skill-agent-e2e ⚠️ cancelled
snapshot-commands-e2e ⚠️ cancelled
state-backup-restore-e2e ⚠️ cancelled
telegram-injection-e2e ⚠️ cancelled
token-rotation-e2e ⚠️ cancelled
tunnel-lifecycle-e2e ⚠️ cancelled
upgrade-stale-sandbox-e2e ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26121207532
Target ref: 43208cc4289857fe3ce82ce9b0c254014817ec04
Workflow ref: main
Requested jobs: skill-agent-e2e,kimi-inference-compat-e2e
Summary: 2 passed, 0 failed, 0 skipped

Job Result
kimi-inference-compat-e2e ✅ success
skill-agent-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 26121834393
Target ref: fix/2600-compact-tool-catalog
Requested jobs: all (no filter)
Summary: 40 passed, 2 failed, 2 skipped

Job Result
brave-search-e2e ✅ success
channels-stop-start-e2e ❌ failure
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
credential-migration-e2e ✅ success
credential-sanitization-e2e ✅ success
device-auth-health-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
double-onboard-e2e ✅ success
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped
hermes-discord-e2e ✅ success
hermes-e2e ✅ success
hermes-inference-switch-e2e ❌ failure
hermes-slack-e2e ✅ success
inference-routing-e2e ✅ success
issue-2478-crash-loop-recovery-e2e ✅ success
kimi-inference-compat-e2e ✅ success
launchable-smoke-e2e ✅ success
messaging-compatible-endpoint-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
onboard-repair-e2e ✅ success
onboard-resume-e2e ✅ success
openclaw-inference-switch-e2e ✅ success
openclaw-slack-pairing-e2e ✅ success
openshell-gateway-upgrade-e2e ✅ success
overlayfs-autofix-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-hermes-stale-base-e2e ✅ success
rebuild-openclaw-e2e ✅ success
runtime-overrides-e2e ✅ success
sandbox-operations-e2e ✅ success
sandbox-survival-e2e ✅ success
shields-config-e2e ✅ success
skill-agent-e2e ✅ success
snapshot-commands-e2e ✅ success
state-backup-restore-e2e ✅ success
telegram-injection-e2e ✅ success
token-rotation-e2e ✅ success
tunnel-lifecycle-e2e ✅ success
upgrade-stale-sandbox-e2e ✅ success

Failed jobs: channels-stop-start-e2e, hermes-inference-switch-e2e. Check run artifacts for logs.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa requested a review from cv May 19, 2026 21:15

@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.

♻️ Duplicate comments (1)
scripts/patch-openclaw-tool-catalog.js (1)

254-257: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fail closed on OpenClaw version drift.

Line 256 reads the version but never enforces the pinned 2026.4.24, so any future bundle that still matches these string anchors will be patched instead of being rejected.

Suggested fix
 function patchOpenClawToolCatalog(distDir) {
   const resolvedDist = path.resolve(distDir);
   const version = readOpenClawVersion(resolvedDist);
+  if (version !== "2026.4.24") {
+    throw new Error(`Expected openclaw@2026.4.24, found ${version}`);
+  }
 
   const selectionFiles = listSelectionFiles(resolvedDist);
🤖 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 `@scripts/patch-openclaw-tool-catalog.js` around lines 254 - 257, The code in
patchOpenClawToolCatalog calls readOpenClawVersion(resolvedDist) but does not
enforce the pinned version, so bundles with different versions can be patched;
update patchOpenClawToolCatalog to compare the returned version against the
expected pinned string "2026.4.24" (use the exact literal) and throw or exit
with an explicit error if it does not match, referencing readOpenClawVersion and
the pinned version constant so the function fails closed rather than proceeding
to patch an unexpected OpenClaw bundle.
🤖 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.

Duplicate comments:
In `@scripts/patch-openclaw-tool-catalog.js`:
- Around line 254-257: The code in patchOpenClawToolCatalog calls
readOpenClawVersion(resolvedDist) but does not enforce the pinned version, so
bundles with different versions can be patched; update patchOpenClawToolCatalog
to compare the returned version against the expected pinned string "2026.4.24"
(use the exact literal) and throw or exit with an explicit error if it does not
match, referencing readOpenClawVersion and the pinned version constant so the
function fails closed rather than proceeding to patch an unexpected OpenClaw
bundle.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5696ac6b-abe3-445c-b2c1-6ce24d3e4151

📥 Commits

Reviewing files that changed from the base of the PR and between 43208cc and 21dab20.

📒 Files selected for processing (2)
  • scripts/patch-openclaw-tool-catalog.js
  • test/openclaw-tool-catalog-patch.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/openclaw-tool-catalog-patch.test.ts

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26125800599
Target ref: 21dab205760d0cbd3e6a198359e1f4eb3196a64d
Workflow ref: main
Requested jobs: kimi-inference-compat-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
kimi-inference-compat-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26129228669
Target ref: fix/2600-compact-tool-catalog
Requested jobs: channels-stop-start-e2e,hermes-inference-switch-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
channels-stop-start-e2e ⚠️ cancelled
hermes-inference-switch-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26130497107
Target ref: b1878c52ebf44f6a276b91c7c1cbf2f92df73fc2
Workflow ref: main
Requested jobs: skill-agent-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
skill-agent-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 26130733369
Target ref: fix/2600-compact-tool-catalog
Requested jobs: channels-stop-start-e2e,hermes-inference-switch-e2e
Summary: 1 passed, 1 failed, 0 skipped

Job Result
channels-stop-start-e2e ❌ failure
hermes-inference-switch-e2e ✅ success

Failed jobs: channels-stop-start-e2e. Check run artifacts for logs.

"\t\t\tmodelAliasLines: buildModelAliasLines(params.config),",
].join("\n");

const CATALOG_HELPER_AND_ASSIGNMENT = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

wild

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26132641722
Target ref: f3cf7ecd36671e79010b3c30e4ed7072085875a9
Workflow ref: main
Requested jobs: cloud-onboard-e2e,kimi-inference-compat-e2e,skill-agent-e2e
Summary: 3 passed, 0 failed, 0 skipped

Job Result
cloud-onboard-e2e ✅ success
kimi-inference-compat-e2e ✅ success
skill-agent-e2e ✅ success

@ericksoa ericksoa merged commit 6c247d6 into main May 20, 2026
25 checks passed
@ericksoa ericksoa deleted the fix/2600-compact-tool-catalog branch May 20, 2026 00:34
@miyoungc miyoungc mentioned this pull request May 20, 2026
12 tasks
miyoungc added a commit that referenced this pull request May 20, 2026
## Summary
Refreshes the NemoClaw docs for v0.0.46 by updating version metadata,
release notes, and generated user skills. The refresh also keeps public
docs aligned with the docs skip list by removing non-public experimental
references from the generated output.

## Related Issue
None.

## Changes
- #3744 and #3824 -> `docs/about/release-notes.mdx`: Added Windows
bootstrap and WSL express install coverage for v0.0.46.
- #3392 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/reference/network-policies.mdx`,
and policy examples: Refreshed public messaging channel docs around
WhatsApp and matching policy presets.
- #3742, #3767, #3732, #3786, #3777, and #3808 ->
`docs/about/release-notes.mdx`: Added release-note coverage for Hermes
managed tools, Bedrock Runtime endpoint detection, WSL Ollama proxying,
Model Router Python fallback, plugin command registration, and
tool-catalog latency improvements.
- #3124 -> `docs/about/release-notes.mdx`: Added release-note coverage
for hosted uninstall flag guidance.
- Generated `nemoclaw-user-*` skills from the updated MDX docs for the
v0.0.46 release.

## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [ ] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [x] 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)

Verification notes:
- Commit hooks passed, including markdownlint, gitleaks, docs-to-skills
verification, env-var docs, and skills YAML checks.
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx` passed.
- `bash test/e2e/e2e-cloud-experimental/check-docs.sh --only-links
--local-only --with-skills` passed.
- `git diff --check` passed.
- `make docs` was attempted but blocked before MDX validation because
`npx` received HTTP 403 fetching `fern-api` from npm.

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

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

* **New Features**
* Released v0.0.46: improved Windows setup, WhatsApp messaging support,
Hermes sandbox/tool routing, Anthropic endpoint compatibility, Ollama
proxy routing, model-router fallback, OpenClaw plugin/backup
compatibility, sandbox build tooling fixes, and updated uninstall flag
behavior.

* **Documentation**
* Removed WeChat from messaging flows and presets across guides and CLI
docs; clarified onboarding and channel setup for WhatsApp. Clarified
runtime mutability and filesystem (Landlock) behavior — some changes
require sandbox rebuilds; prefer host-side commands for durable config.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/3911?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
latenighthackathon added a commit to latenighthackathon/NemoClaw that referenced this pull request May 27, 2026
…DIA#3059)

Three documentation additions to `docs/reference/commands.mdx` under
`## Environment Variables`:

`### At a Glance` is a new categorized index of every documented
`NEMOCLAW_*` env var. Eight categories (Service Ports, Onboarding
Configuration, Onboarding Behavior Flags, Probe Timeouts, Onboard
Timeouts, Gateway Lifecycle Tunables, Sandbox Runtime, Lifecycle
Behavior Flags) link into the existing detail subsections so readers
can find a variable by category instead of grepping the page.

`### Gateway Lifecycle Tunables` documents seven knobs that tune the
polling and timeout budgets used by gateway-recovery and health-check
paths: `NEMOCLAW_GATEWAY_START_TIMEOUT`,
`NEMOCLAW_GATEWAY_RECOVERY_WAIT_SECONDS`,
`NEMOCLAW_GATEWAY_RECOVERY_POLL_INTERVAL_SECONDS`,
`NEMOCLAW_HEALTH_POLL_COUNT`, `NEMOCLAW_HEALTH_POLL_INTERVAL`,
`NEMOCLAW_LOGS_PROBE_TIMEOUT_MS`, and
`NEMOCLAW_DOCKER_GPU_SUPERVISOR_RECONNECT_TIMEOUT`. Defaults target
typical local development; the section explains when to raise them.

`### Sandbox Runtime (v0.0.50)` documents four new user-tunable env
vars introduced in v0.0.49 and v0.0.50: `NEMOCLAW_TOOL_CATALOG`
(OpenClaw compact tool-catalog rollback per NVIDIA#3808),
`NEMOCLAW_OPENCLAW_MANAGED_PROXY` (top-level proxy block emission per
NVIDIA#4005), `NEMOCLAW_SANDBOX_BASE_VERSION_TAG` (versioned base-image
pin per NVIDIA#4082), and `NEMOCLAW_HERMES_TOOL_GATEWAY_REFRESH_TOKEN`
(Nous OAuth refresh token for the Hermes managed-tool gateway broker
per NVIDIA#3742). Test seams and internal-only timeouts (including
`NEMOCLAW_BEDROCK_RUNTIME_ADAPTER_PORT`, which the allowlist marks
as internal-only) are intentionally excluded.

Four new entries are added to the Onboarding Behavior Flags table for
the existing-but-undocumented macOS VM-driver and Docker-driver GPU
patch knobs: `NEMOCLAW_DISABLE_VM_DNS_MONKEYPATCH`,
`NEMOCLAW_FORCE_VM_DNS_MONKEYPATCH`, `NEMOCLAW_DARWIN_VM_COMPAT`,
`NEMOCLAW_DOCKER_GPU_PATCH_NETWORK`.

The mirror at
`.agents/skills/nemoclaw-user-reference/references/commands.md` is
regenerated by `scripts/docs-to-skills.py`.

Fresh recreation of the closed NVIDIA#3652 rebuilt on top of current
upstream/main with the v0.0.49/v0.0.50 env-var additions folded
into the categorized index.

Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: inference Inference routing, serving, model selection, or outputs bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality needs: review PR is conflict-free and awaiting maintainer review area: performance Latency, throughput, resource use, benchmarks, or scaling and removed enhancement: inference bug Something fails against expected or documented behavior needs: review PR is conflict-free and awaiting maintainer review labels Jun 3, 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: inference Inference routing, serving, model selection, or outputs area: performance Latency, throughput, resource use, benchmarks, or scaling bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality integration: openclaw OpenClaw integration behavior NV QA Bugs found by the NVIDIA QA Team platform: brev Affects Brev hosted development environments platform: ubuntu Affects Ubuntu Linux environments provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior UAT Issues flagged for User Acceptance Testing. v0.0.46 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Brev][Inference] Trivial agent turn occasionally hangs ~2 min on shared nvidia-prod NIM (P50 9s, P99 128s, 10% outliers)

3 participants