Skip to content

fix(e2e): verify native plugin tools through agent execution - #14149

Merged
rsliter merged 2 commits into
mainfrom
codex/launchable-tool-evidence
Nov 3, 2026
Merged

rsliter merged 2 commits into
mainfrom
codex/launchable-tool-evidence

Conversation

@rsliter

@rsliter rsliter commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Full E2E verifies that a native plugin tool completes through a normal OpenClaw agent turn, both before and after replacing the plugin. The check no longer depends on weather arguments or response fields.

Reason

The Brev Launchable failure called /tools/invoke directly, without the agent-run admission required by the search guard. That request returned 403 tool_call_blocked. Exercising the normal agent path preserves the guard and tests the supported execution path.

Changes

  • Replace the weather fixture with dependency-free, no-argument local tools. Each plugin version registers a distinct tool so cached v1 code cannot satisfy the v2 check.
  • Correlate a completed gateway run with matched tool-start and successful tool-completion audit records. An assistant reply alone cannot establish execution. Focused support tests reject failed, stale, unrelated, incomplete, or malformed evidence.
  • Poll only the audit read, at most five times, to accommodate asynchronous persistence. Never replay the agent turn.
  • Remove redundant installation/uninstallation exit assertions and weather payload assertions. Execution proves installation and replacement; valid JSON plugin inventory proves removal. Preserve restart, update dry-run, credential, retained-gateway, and cleanup checks.
  • Keep fixture construction in the support module to stay within the existing live test file size limit. Register that fixture and its fast tests in the full-E2E coverage map. Document the shared source-install and Launchable contract.

Verification

  • vitest run --project e2e-support test/e2e/support/native-plugin-evidence.test.ts test/e2e/support/full-e2e-gateway.test.ts --coverage=false: 62 tests passed.
  • vitest run --project integration test/automation/e2e/e2e-mock-parity.test.ts --coverage=false: 55 tests passed. The E2E mock/live parity gate also passes with the registered fixture and fast test.
  • npm run e2e:assertions:check: passed with 1,285 direct assertions across 77 live test files; no budget increase.
  • Installed commit and push hooks: passed, including publication validation, all three TypeScript checks, semantic phase plans, source-shape budget, growth guardrails, and secret scanning.
  • Inspected the retained failing run and the integrity-verified pinned OpenClaw 2026.9.2 agent, audit, and plugin inventory producers. The existing full-E2E admin approval covers audit access.
  • Latest tested commit: c64b2256e402f6bd358c37971b1aca9b042125bd.
  • Required CI: passed.
  • Source-install full E2E and OpenClaw security posture: both passed on that exact commit; retained target and cleanup receipts verified.
  • Staging Brev Launchable: passed on that exact commit. Receipts verify the selected image, clean baked checkout, matching provision SHA, no runtime overrides, full-E2E completion, and workspace cleanup ABSENT.
  • All nine Advisor specialist reports were collected. Eight are clear; the additional old-v1-tool-name absence check was declined as unnecessary scope. The advisory aggregate retains its failed result. No applicable extra specialist E2E selections remain. CodeRabbit skipped the draft.
  • The earlier Launchable attempt timed out waiting for its image producer before deployment or test execution. The producer subsequently succeeded; the authorized focused retry above completed successfully.
  • The diff contains no secrets, API keys, or credentials.

Signed-off-by: Rebecca Sliter [email protected]

Summary by CodeRabbit

  • Tests
    • Expanded end-to-end coverage of native plugin installation, replacement, and removal, including verification through agent interactions and plugin inventory.
    • Added checks for correlating tool activity with completed agent runs and handling incomplete or inconsistent audit data.
  • Documentation
    • Updated end-to-end testing guidance to describe plugin lifecycle checks and audit verification.

@rsliter rsliter self-assigned this Nov 3, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The E2E test now installs a versioned native plugin, invokes its tool through an agent turn, and verifies execution using correlated audit events. It verifies removal through plugin inventory. Shared fixture helpers, tests, mock-parity configuration, and README documentation support these checks.

Changes: Native plugin lifecycle verification

Layer / File(s) Summary
Plugin fixture and evidence validation
test/e2e/fixtures/native-plugin-evidence.ts, test/e2e/support/native-plugin-evidence.test.ts
The fixture generates versioned plugins and validates completed run IDs, plugin inventory, and correlated tool-call audit events. Tests cover successful, pending, failed, and malformed evidence.
Live lifecycle checks and supporting updates
test/e2e/live/full-e2e.test.ts, test/e2e/README.md, test/e2e/mock-parity.json
The live test invokes the plugin through an agent turn, polls audit evidence up to five times without repeating the turn, and checks removal through JSON inventory. The README documents the checks, and mock parity registers the fixture and tests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: prekshivyas

Merge Risk: Minimal · up to c64b2

The plugin lifecycle checks are reported to pass on the reviewed commit, and no concrete merge-blocking issue is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 "fix(e2e): verify native plugin tools through agent execution" matches the main change. The PR moves full E2E native-plugin verification from direct /tools/invoke calls to a normal OpenClaw …
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.
Full details: Title check

Explanation

The title "fix(e2e): verify native plugin tools through agent execution" matches the main change. The PR moves full E2E native-plugin verification from direct /tools/invoke calls to a normal OpenClaw agent turn. The changeset adds a native-plugin evidence fixture, support tests, and audit-based correlation, and removes the old uninstall exit-code checks. The title is short, specific, and uses a conventional commit prefix. It does not cover every detail, such as the audit polling limit or the Launchable postconditions, which is acceptable.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9768c5a and c64b225.

Files selected for processing: 5
  • test/e2e/README.md
  • test/e2e/fixtures/native-plugin-evidence.ts
  • test/e2e/live/full-e2e.test.ts
  • test/e2e/mock-parity.json
  • test/e2e/support/native-plugin-evidence.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@rsliter

rsliter commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Codex Desktop, CLI 0.159.2 Persisted session metadata; repository and branch activity confirm the authoring record.
Skills recorded 8: nemoclaw-contributor-create-pr; nemoclaw-contributor-implement-issue; nemoclaw-contributor-onboard; nemoclaw-contributor-plan-issue; nemoclaw-maintainer-audit-e2e-assertions; nemoclaw-maintainer-classify-ci-failure; nemoclaw-maintainer-e2e; nemoclaw-skills-guide Complete contents in persisted read results through cutoff. Catalog entries and truncated reads excluded.
Instruction files recorded 19: .agents/references/development.md; .agents/references/e2e-authoring.md; .agents/skills/_shared/code-change-considerations.md; .agents/skills/_shared/documentation-writing-review.md; .agents/skills/_shared/git-github-hard-stop.md; .agents/skills/_shared/implementation-discovery.md; .agents/skills/_shared/pr-follow-up.md; .agents/skills/_shared/root-cause-and-state-checks.md; .agents/skills/_shared/security-rubric.md; .agents/skills/nemoclaw-contributor-create-pr/references/publication.md; .agents/skills/nemoclaw-contributor-create-pr/references/validation.md; .agents/skills/nemoclaw-maintainer-day/RISKY-AREAS.md; .agents/skills/nemoclaw-maintainer-e2e/references/manual-pr.md; .agents/skills/nemoclaw-maintainer-e2e/references/staging-launchable.md; .github/PULL_REQUEST_TEMPLATE.md; .github/SESSION_REPORT_TEMPLATE.md; AGENTS.md; CONTRIBUTING.md; WRITING.md Complete injections or read results; includes skill references and guidance templates. Partial test README reads excluded.
Tool calls partial exec: 105 wrapper attempts; at least 141 nested shell-tool invocations with returned chunk IDs Counts include failures and are separate layers, not a sum. Other nested tool attempts lack uniform independent invocation records; no complete nested total is claimed.
Session window recorded 2026-11-03T14:24:48.583Z to 2026-11-03T15:05:43.363Z; 40 min 55 sec Whole session through cutoff, including investigation, discussion, implementation, and idle time. No inherited fork activity.
Compactions recorded 2 Persisted compaction records through cutoff.
Models recorded gpt-6-astra All eight recorded turn contexts; no model changes.
Reasoning levels recorded high All recorded turn contexts.

@github-code-quality

github-code-quality Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/launchable-too... c64b225 +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd codex/launchable-too... c64b225 +/-
nemoclaw/src/sh...cy-boundary.cts 100% 97% -3%
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/ru...time-context.ts 100% 99% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/index.ts 94% 99% +5%
nemoclaw/src/de...search-state.ts 0% 100% +100%
nemoclaw/src/on...native-route.ts 0% 100% +100%
nemoclaw/src/search-config.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd codex/launchable-too... c64b225 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/launchable-too... c64b225 +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/actions...ess-recovery.ts 65% 81% +16%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 73% +73%
src/lib/inferen...er/lifecycle.ts 0% 75% +75%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 83% +83%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/actions...ned-recovery.ts 0% 93% +93%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 03, 2026 16:40 UTC

@rsliter

rsliter commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Advisor review disposition for c64b2256e402f6bd358c37971b1aca9b042125bd (run):

Eight specialist reports are clear. I decline F-customer-value-behavior-5742411f0d182ede5646 as additional negative coverage outside the accepted minimal repair. The required outcome is that the replacement version executes through the running gateway. Its distinct v2 tool and correlated successful audit records cannot be satisfied by cached v1 code alone. The former weather oracle likewise checked the selected v2 result; it did not independently prove exhaustive removal of every old registration. Checking disappearance of a renamed v1 tool would add another coverage contract, and the report demonstrates no production defect or observed stale-v1 execution.

For regression risk, the applicable latest-commit selectors are full-e2e, security-posture-openclaw, and staging-brev-launchable. I exclude the broad floor's cloud-onboard and Hermes security shard: neither consumes the changed fixture or full-E2E test, and this PR changes no controller, workflow planner, or production runtime. All nine specialists recommend no additional selectors beyond the deterministic floor. Live results will be recorded separately with their actual tested commits.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit c64b225. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@rsliter

rsliter commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

E2E evidence for tested commit c64b2256e402f6bd358c37971b1aca9b042125bd:

Selector Result Run
full-e2e PASS 41679901821
security-posture-openclaw PASS 41679901821
staging-brev-launchable PASS 41697625612

Dispatch receipts bind that candidate to PR #14149, base 9768c5a4001da5d971c373df78f4954e2f4e3993, and trusted workflow 997d5748a4055e8465e4d1d191ef549a605cb72e. Source/security target results and cleanup receipts passed. Launchable receipts verify the selected image, exact clean baked checkout and provision SHA, no runtime overrides, full-E2E success, and workspace deletion with confirmed ABSENT status.

All nine Advisor reports were read; no additional specialist selectors were recommended. Applicability and the declined optional finding are recorded here. The earlier Launchable attempt remains a predeployment producer timeout; it is not counted as a pass. This successful focused retry was explicitly authorized.

@prekshivyas prekshivyas left a comment

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.

Reviewed c64b225. No actionable findings.

Validation: 62 focused support tests passed, along with E2E mock parity and the assertion-budget check. Verified retained source-install full E2E, OpenClaw security-posture, and Launchable evidence for this exact commit, including cleanup. The retained audit records confirm successful v1 and v2 tool execution.

The Advisor suggestion to assert old-v1-tool absence would add coverage, but I found no demonstrated regression requiring it here. The distinct v2 tool prevents cached v1 alone from satisfying the replacement check.

@rsliter
rsliter marked this pull request as ready for review November 3, 2026 20:27
@rsliter

rsliter commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

The growth-check failure on c64b2256e402f6bd358c37971b1aca9b042125bd is inherited CI setup behavior, with no demonstrated regression from this PR.

The failed job checks out trusted base 9768c5a4001da5d971c373df78f4954e2f4e3993 and times out fetching PR history at the existing 30-second Git command limit. All seven growth assertions remain unexecuted. This PR changes neither that comparison helper, the guardrail test, nor the enforcing workflow. Earlier runs of the same candidate passed this check.

Cross-branch evidence confirms the identical failure on six other PR branches. Examples: #14120, #14143, and #14122. Among the latest 100 workflow runs inspected, seven failures on those six branches shared this exact fetch-timeout signature; two other failures had a separate setup-hook timeout.

All applicable exact-candidate E2Es and cleanup evidence are recorded separately, and the human review approves this candidate. This classification does not turn the failed or pending growth run into a pass or alter GitHub's required status.

@rsliter
rsliter enabled auto-merge (squash) November 3, 2026 21:09
@rsliter

rsliter commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer-approved one-time CI exception for PR #14149 at c64b2256e402f6bd358c37971b1aca9b042125bd.

Rebecca Sliter (rsliter) explicitly authorizes an administrator squash merge despite the inherited growth-check fetch timeout and its failing required checks commit status. The failure runs unchanged trusted-base CI code and occurs before all seven growth assertions. The inherited-failure evidence includes the same signature on six other PR branches.

This exception applies only to that failure class and this exact commit. It does not change repository rules or turn the failed check into a pass. All other required checks pass, both commits are GitHub Verified, human approval covers this commit, CodeRabbit has no actionable findings, and all applicable exact-commit E2Es and cleanup passed. The older cancelled maintainer-edits run is superseded by a successful newer run on the same commit.

@rsliter
rsliter merged commit 75f0b05 into main Nov 3, 2026
150 of 156 checks passed
@rsliter
rsliter deleted the codex/launchable-tool-evidence branch November 3, 2026 21:16
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior labels Nov 3, 2026
deepujain added a commit that referenced this pull request Nov 4, 2026
Integrate main at b4e4301 to consume #14149. The OpenClaw lifecycle
and security checks invoke the fixture through an admitted agent turn,
so they preserve disabled-search enforcement.

Refs #14084

Signed-off-by: Deepak Jain <[email protected]>
deepujain added a commit that referenced this pull request Nov 4, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

The OpenShell stop and start E2E lane now proves the native plugin
survives a restart by running its tool in a normal agent turn and
checking the host audit records. Before, it called the tool straight
through the gateway `/tools/invoke` endpoint, which the web search guard
now blocks, so the lane failed on every run.

## Reason

On main run
[41581151938](https://github.com/NVIDIA/NemoClaw/actions/runs/41581151938/job/125746285216),
install, stop, start, readiness and all state markers passed, then
`post-openshell-start-native-plugin-invoke` got `tool_call_blocked`. A
direct `/tools/invoke` call has no owned agent turn, and the guard from
#13607 blocks tool calls without one. Loosening the guard would reopen
#13594, so the test should exercise the plugin the way a user does.

### Related issues

Refs #13594

Builds on #14149, now merged, and reuses its `native-plugin-evidence`
fixture.

## Changes

- `test/e2e/fixtures/native-plugin-evidence.ts`: add
`nativePluginAgentInvocationOutcome`. It runs `openclaw agent` once to
call the tool, takes the run ID from the gateway envelope, and polls the
read-only `openclaw audit` page until that run's tool call has a
matching start and success. A failed turn records gateway readiness and
returns `failed` without reading audit records.
- `test/e2e/live/full-e2e.test.ts`: use the shared helper instead of its
own copy of that sequence. The live test keeps its assertion on the
outcome.
- `test/e2e/live/sandbox-survival.test.ts`: install the shared native
plugin fixture before stop. After start, approve the admin scope and
assert that the shared helper reports success, with up to five audit
polls. The private survival plugin and the direct invoke are removed.
- Remove the baseline `echo alive` probe. The native readiness poll
right after it runs through the same sandbox exec and needs exit 0 and
`ready`, so it already proves exec works.
- `tools/e2e/sandbox-survival-timeout-contract.mts`: name ceilings for
the admin approval (7 minutes, the shared helper's own 3 and 4 minute
waits), the agent turn (2 minutes) and the five audit polls. The final
validation phase already used its whole 15 minute budget for marker
reads and destroy, so raise it to 30 minutes. This also raises the
lane's job timeout through the catalogue.
- `test/e2e/support/sandbox-survival-timeout-contract.test.ts`: include
the new ceilings in the final validation sum.
- `test/e2e/support/native-plugin-evidence.test.ts`: cover the shared
helper. A good turn runs once and then polls only the audit page; a
failed turn stops without reading audit records.
- `test/e2e/mock-parity.json`: map both tests to the survival lane.
- `ci/e2e-assertion-budget.json`: lower the budget to the new assertion
count, as the ratchet requires.

## Verification

- `npx vitest run
test/e2e/support/sandbox-survival-timeout-contract.test.ts
test/e2e/support/native-plugin-evidence.test.ts
test/automation/e2e/e2e-recommendations.test.ts`: passed.
- `npx vitest run test/e2e/support/workflow-plan.test.ts
test/e2e/support/target-catalogue.test.ts
test/e2e/support/sandbox-survival-timeout-contract.test.ts`: 142 passed.
- `node scripts/checks/e2e-assertion-census.mts --check`: passed.
- `node scripts/checks/e2e-mock-parity.mts --base origin/main --head
HEAD`: passed.
- `npx tsc -p tsconfig.cli.json --noEmit`, oxlint and oxfmt on the
changed files: clean.
- Pre-commit hooks: passed.
- The selected `sandbox-survival` and `full-e2e` E2E runs on this PR are
the live checks.
- The diff has no secrets, API keys or credentials.

---
Signed-off-by: Deepak Jain <[email protected]>



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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Tests**
* Expanded end-to-end checks for native plugin runs, including verifying
successful completion after a sandbox restart and confirming the
recorded tool outcome.
* Added coverage for failed plugin runs and retained diagnostic
evidence.
* Updated timeout checks to account for approval, plugin execution, and
audit verification.
  * Adjusted test assertion budgets and test-suite coverage.

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

---------

Signed-off-by: Rebecca Sliter <[email protected]>
Signed-off-by: Deepak Jain <[email protected]>
Co-authored-by: Rebecca Sliter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants