Skip to content

fix: log warning when tool hidden by unsupported availability signal - #93709

Closed
lsr911 wants to merge 1 commit into
openclaw:mainfrom
lsr911:fix/issue-92361-Bug-Tool-availability-eval
Closed

lsr911 wants to merge 1 commit into
openclaw:mainfrom
lsr911:fix/issue-92361-Bug-Tool-availability-eval

Conversation

@lsr911

@lsr911 lsr911 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Empty allOf/anyOf arrays in tool availability expressions silently hid tools with no actionable diagnostic. Developers had no way to detect the authoring mistake.

Change

buildToolPlan() now emits a logWarn for each tool hidden by an unsupported-signal diagnostic. The warning includes the tool name and reason message:

tool "my-tool" hidden: Empty availability anyOf group. This is likely an authoring error — check the descriptor's availability expression.

Before

  • Tool with availability: { anyOf: [] } → silently hidden
  • No log, no diagnostic visible to developer
  • Hours wasted debugging why a tool never appears

After

  • Tool still hidden (it's invalid)
  • Warning logged at gateway startup so author catches the mistake immediately

Fixes #92361

Empty allOf/anyOf arrays and other unsupported availability signals
silently hid tools with no actionable diagnostic surfaced to the
developer. This made authoring mistakes undetectable.

Now emits a warning-level log for each tool hidden by an
unsupported-signal diagnostic, including the tool name and the
reason message. The tool is still hidden (it's invalid), but the
author now gets a clear signal at registration time.

Fixes openclaw#92361
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 16, 2026
@vincentkoc vincentkoc self-assigned this Jun 16, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Closing this implementation, while keeping #92361 open. buildToolPlan() is a repeated request-time planning path, so logging every unsupported-signal there can emit the same warning on every plan build and turns the otherwise deterministic planner into a side-effecting hot path.

The right fix is to surface malformed availability descriptors once at descriptor registration or another lifecycle-owned validation boundary, while keeping the evaluator and planner pure. Evidence that a planner invocation is lifecycle-once rather than request-time would change this decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Tool availability evaluator silently ignores empty allOf/anyOf groups during expression normalization

2 participants