Skip to content

Contribute/capability check#114

Merged
dgarson merged 1 commit intodgarson:dgarson/forkfrom
dalefrieswthat:contribute/capability-check
Mar 3, 2026
Merged

Contribute/capability check#114
dgarson merged 1 commit intodgarson:dgarson/forkfrom
dalefrieswthat:contribute/capability-check

Conversation

@dalefrieswthat
Copy link

Summary

  • Problem: The tool description didn’t say that passing model fills capableForRequestedModel; edge cases (no model, bad model) had no tests.
  • Why it matters: Clear docs and tests make the capability-check behavior and boundaries obvious for anyone building on this.
  • What changed: Updated agents_list description to mention the optional model param and capableForRequestedModel; added two e2e tests (no model → all capabilities undefined; unparseable modelrequestedModel and capabilities undefined).
  • What did NOT change: No behavior change. No changes to other tools or to the capability logic itself.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

None. Description text and tests only.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment: macOS, Node 22, pnpm
Steps: pnpm vitest --config vitest.e2e.config.ts src/agents/openclaw-tools.agents.e2e.test.ts --run
Expected: 8 tests pass (6 existing + 2 new).
Actual: 8 passed.

Evidence

  • All tests in openclaw-tools.agents.e2e.test.ts pass

Human Verification (required)

  • Ran the agents_list e2e suite; all 8 tests pass.
  • Did not run full test suite or other channels.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

Revert the commit or restore agents-list-tool.ts and openclaw-tools.agents.e2e.test.ts from the PR base. No config or feature flags.

Risks and Mitigations

None.

Copy link
Owner

@dgarson dgarson left a comment

Choose a reason for hiding this comment

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

Overall assessment: Looks good / low-risk

Summary

This PR tightens the agents_list capability-check behavior and improves test coverage for model-handling edge cases:

  • Adds coverage that capableForRequestedModel is omitted when no model arg is passed.
  • Adds coverage that malformed model input (e.g. empty string) does not emit misleading capability metadata.
  • Clarifies tool description to document optional model-based capability routing.

What I checked

  • Diff scope is small and focused (agents-list-tool + e2e tests).
  • Behavioral intent in tests matches expected contract semantics.
  • No obvious security/performance concerns in runtime path from this change.

Concerns / issues found

  • No blocking issues found.

Suggestions

  • Optional: add one assertion for model in provider-only format (if supported contractually) to make parse behavior explicit in tests.

Blocking issues before merge

  • None.

@dalefrieswthat dalefrieswthat force-pushed the contribute/capability-check branch from d80fca6 to 620a249 Compare February 25, 2026 15:59
@dalefrieswthat
Copy link
Author

Can this be merged now? @dgarson

@dgarson
Copy link
Owner

dgarson commented Mar 3, 2026

Retriggering CI checks

@dgarson dgarson closed this Mar 3, 2026
@dgarson dgarson reopened this Mar 3, 2026
@dgarson dgarson merged commit 49f7bda into dgarson:dgarson/fork Mar 3, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants