Skip to content

fix(plugin): declare OpenClaw compatibility metadata#3367

Merged
ericksoa merged 1 commit into
mainfrom
fix/issue-2845-crabpot-compat
May 12, 2026
Merged

fix(plugin): declare OpenClaw compatibility metadata#3367
ericksoa merged 1 commit into
mainfrom
fix/issue-2845-crabpot-compat

Conversation

@ericksoa

@ericksoa ericksoa commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • declare the OpenClaw plugin compatibility/build metadata Crabpot expects for the NemoClaw plugin package
  • move runtime context injection from deprecated before_agent_start to current before_prompt_build without changing the injected context behavior
  • add package-local Vitest config and metadata coverage so cd nemoclaw && npm test works directly

Closes #2845

Validation

  • cd nemoclaw && npm ci
  • npm run build
  • npm test
  • npm run check
  • rg "before_agent_start|BeforeAgentStart" nemoclaw/src nemoclaw/package.json
  • Crabpot isolated NemoClaw lane: build/capture/synthetic-probe succeeded after seeding fixture deps; with Crabpot fixture expectation updated from before_agent_start to before_prompt_build, the one-fixture report passes with 0 breakages, 0 warnings, 0 deprecation warnings, and 0 upstream metadata issues. Remaining items are the known inspector follow-ups tracked in Address Crabpot OpenClaw plugin compatibility findings #2845.

Summary by CodeRabbit

  • Chores

    • Added OpenClaw extension configuration with plugin API compatibility requirements and build metadata (version 2026.5.10-beta.1)
    • Configured Vitest testing framework with test scripts and configuration files
    • Established test suite for package metadata and hook registration validation
  • New Features

    • Updated plugin hook system to trigger at prompt-build stage instead of agent-start stage with new result type interfaces

Review Change Stack

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

coderabbitai Bot commented May 11, 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: c2952938-3432-4216-bd7b-59cc3b72c2c4

📥 Commits

Reviewing files that changed from the base of the PR and between 32cab9d and 53f4397.

📒 Files selected for processing (7)
  • nemoclaw/package.json
  • nemoclaw/src/index.ts
  • nemoclaw/src/package-metadata.test.ts
  • nemoclaw/src/register.test.ts
  • nemoclaw/src/runtime-context.test.ts
  • nemoclaw/src/runtime-context.ts
  • nemoclaw/vitest.config.ts

📝 Walkthrough

Walkthrough

This PR migrates the NemoClaw OpenClaw plugin's runtime-context injection from the deprecated before_agent_start hook to before_prompt_build, declares OpenClaw plugin compatibility metadata, introduces Vitest test infrastructure, and updates all tests to validate the new hook behavior and metadata correctness.

Changes

OpenClaw Plugin Hook Migration and Metadata Setup

Layer / File(s) Summary
Hook Result Type Definition
nemoclaw/src/index.ts
Exported HookResult union type is updated to use BeforePromptBuildResult interface instead of BeforeAgentStartResult.
OpenClaw Plugin Metadata Configuration
nemoclaw/package.json
Package metadata declares the OpenClaw extension entrypoint (./dist/index.js), plugin API compatibility range (pluginApi and minGatewayVersion at 2026.5.10-beta.1), build version (openclawVersion), and adds a test npm script to run Vitest.
Test Infrastructure Setup
nemoclaw/vitest.config.ts
Vitest configuration is created with node environment and test file discovery limited to src/**/*.test.ts.
Hook Registration Implementation
nemoclaw/src/runtime-context.ts
registerRuntimeContext function changes its event listener from before_agent_start to before_prompt_build to inject runtime context during prompt construction instead of agent startup.
Hook Registration and Runtime Context Tests
nemoclaw/src/runtime-context.test.ts, nemoclaw/src/register.test.ts
Test suites are updated to validate that registerRuntimeContext registers a before_prompt_build hook, that registration continues when the hook is unavailable, and that all runtime-context injection scenarios (full context, caching, delta updates, error fallback, session key isolation) work correctly with the new hook.
Metadata Validation Tests
nemoclaw/src/package-metadata.test.ts
New test file validates that package.json openclaw metadata fields (compat.pluginApi, compat.minGatewayVersion, build.openclawVersion) are correctly set to the expected version string.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🐰 Hop into prompts with newfound grace,
where contexts inject at build-time's place.
From agent-start we gently depart,
before_prompt_build now plays its part.
Metadata declared, tests all pass with cheer—
OpenClaw compat, crystal clear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(plugin): declare OpenClaw compatibility metadata' clearly identifies the main change: adding OpenClaw compatibility metadata to the plugin package.
Linked Issues check ✅ Passed All requirements from issue #2845 are met: OpenClaw metadata added to package.json [#2845], before_agent_start hook replaced with before_prompt_build [#2845], tests updated to cover new hook [#2845], local build/test passes [#2845], and no deprecation warnings remain [#2845].
Out of Scope Changes check ✅ Passed All changes are in scope: package metadata updates, hook migration from before_agent_start to before_prompt_build, test coverage additions, and Vitest configuration setup directly address issue #2845 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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/issue-2845-crabpot-compat

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

@ericksoa ericksoa changed the title Fix Crabpot OpenClaw plugin compatibility findings fix(plugin): declare OpenClaw compatibility metadata May 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 25702369832
Branch: fix/issue-2845-crabpot-compat
Requested jobs: all (no filter)
Summary: 38 passed, 2 failed, 2 skipped

Job Result
brave-search-e2e ✅ success
cloud-e2e ✅ success
cloud-inference-e2e ✅ success
cloud-onboard-e2e ✅ success
credential-migration-e2e ✅ success
credential-sanitization-e2e ✅ success
deployment-services-e2e ✅ success
device-auth-health-e2e ✅ success
diagnostics-e2e ✅ success
docs-validation-e2e ✅ success
double-onboard-e2e ✅ success
gateway-health-honest-e2e ❌ failure
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped
hermes-discord-e2e ✅ success
hermes-e2e ✅ success
hermes-inference-switch-e2e ✅ success
hermes-slack-e2e ✅ success
inference-routing-e2e ✅ success
issue-2478-crash-loop-recovery-e2e ❌ failure
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
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
telegram-injection-e2e ✅ success
token-rotation-e2e ✅ success
upgrade-stale-sandbox-e2e ✅ success

Failed jobs: gateway-health-honest-e2e, issue-2478-crash-loop-recovery-e2e. Check run artifacts for logs.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25703601198
Branch: fix/issue-2845-crabpot-compat
Requested jobs: issue-2478-crash-loop-recovery-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
issue-2478-crash-loop-recovery-e2e ✅ success

@ericksoa ericksoa requested review from cv and jyaunches May 11, 2026 23:57
@wscurran wscurran added fix integration: openclaw OpenClaw integration behavior labels May 12, 2026
@ericksoa ericksoa merged commit c4339f2 into main May 12, 2026
118 of 125 checks passed
@miyoungc miyoungc mentioned this pull request May 12, 2026
4 tasks
ericksoa pushed a commit that referenced this pull request May 13, 2026
## Summary
- Add v0.0.40 release notes and update docs version metadata.
- Document release-prep behavior changes around onboarding, local
inference, policy preset filtering, and config recovery.
- Refresh generated `nemoclaw-user-*` skills from the source docs.

## Source summary
- #3383 -> `docs/about/release-notes.md`, `docs/reference/commands.md`,
`docs/manage-sandboxes/lifecycle.md`: Reflect macOS Docker-driver
OpenShell gateway onboarding and upgrade behavior.
- #3378 -> `docs/about/release-notes.md`: Capture the Docker-driver
gateway TCP readiness fix and clearer startup failures.
- #3338 -> `docs/about/release-notes.md`,
`docs/inference/use-local-inference.md`: Reflect the Ollama auth proxy
token requirement on native API routes.
- #3420 -> `docs/about/release-notes.md`,
`docs/get-started/prerequisites.md`,
`docs/inference/use-local-inference.md`: Document the Linux Ollama
`zstd` preflight and sudo messaging.
- #3417 -> `docs/about/release-notes.md`,
`docs/inference/inference-options.md`,
`docs/inference/use-local-inference.md`: Reflect detected running vLLM
provider selection.
- #3223 -> `docs/about/release-notes.md`, `docs/reference/commands.md`,
`docs/reference/network-policies.md`, `docs/get-started/quickstart.md`:
Document agent-aware policy preset filtering.
- #3385 -> `docs/about/release-notes.md`: Capture the dashboard forward
TCP reachability check.
- #3160 -> `docs/about/release-notes.md`,
`docs/reference/troubleshooting.md`: Document empty `openclaw.json`
baseline recovery.
- #3367 -> `docs/about/release-notes.md`: Capture OpenClaw plugin
compatibility metadata.

## Test plan
- [x] `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user`
- [x] `make docs`
- [x] `git diff --check`
- [x] Skip-term scan for `docs/.docs-skip` terms

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

## Summary by CodeRabbit

# Release Notes v0.0.40

* **New Features**
* Sandbox configuration recovery when inference changes cause data loss
  * Policy presets now intelligently filter based on agent capabilities
  * Enhanced gateway health checks and upgrade reliability

* **Documentation**
* Improved local inference setup instructions with clearer dependency
requirements
  * Clarified vLLM experimental feature availability and prerequisites
  * Reorganized architecture documentation for enhanced clarity
  * Refined security and hardening guidance

[![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/3427)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@wscurran wscurran added bug-fix PR fixes a bug or regression and removed fix labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address Crabpot OpenClaw plugin compatibility findings

4 participants