Repository navigation
Conversation
Empty allOf/anyOf availability groups were silently moving tools to the hidden plan with no observable signal. The evaluator correctly detects these as authoring errors (unsupported-signal), but the planner consumed the diagnostics without surfacing them. Add a console.warn in buildToolPlan when hidden-tool diagnostics include unsupported-signal, so descriptor authoring errors are visible at gateway startup / descriptor registration time. Fixes #92361 Co-Authored-By: Claude <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed June 16, 2026, 1:21 PM ET / 17:21 UTC. Summary PR surface: Source +13, Tests +33. Total +46 across 2 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 0278b59d0ea3. Evidence reviewedPR surface: Source +13, Tests +33. Total +46 across 2 files. View PR surface stats
What I checked:
Likely related people:
How this review workflow works
|
|
Closing this implementation for the same reason as #93709. The underlying issue #92361 is valid and already names the correct boundary: surface malformed availability once during descriptor registration or another lifecycle-owned validation step, while keeping the evaluator and planner pure. A repair at that boundary remains welcome; this planner-time implementation is not landable. |
Summary
allOf/anyOfavailability groups in tool descriptors weresilently moving tools to the hidden plan with zero observable signal.
Plugin authors had no way to know their descriptor was malformed.
buildToolPlanconsumedunsupported-signaldiagnosticsfrom the evaluator without surfacing them. The evaluator already
correctly classifies empty groups as authoring errors — the planner
just never logged them.
console.warninbuildToolPlanwhen a tool is hiddendue to
unsupported-signaldiagnostics. No new API, no callbacksystem — the evaluator stays pure, the planner stays deterministic.
Fixes #92361
Linked context
allOf/anyOfgroups during expression normalization #92361: Tool availability evaluator silently ignores emptyallOf/anyOfgroups. Community consensus from KarthikRV1107 andrudi193-cmd: keep
evaluateExpressionpure, surface diagnosticsonce at the planner boundary.
evaluateExpressionat availability.ts:132-150 returnsunsupported-signaldiagnostics for empty groups, and the codecomment at line 153 even says "must surface." This PR makes the
code match the comment.
onHiddenDiagnosticcallback system reaching into
resolvePluginTools. This PRtakes the minimal approach: one
console.warnat the plannerboundary.
Real behavior proof
Behavior addressed: Malformed tool descriptors with empty
availability groups now produce a visible
console.warnat theplanner boundary instead of silently hiding the tool.
Real setup tested: Linux 4.19.112-2.el8.x86_64, Node.js v24.13.1,
OpenClaw PR branch @ 1e247a0, tsx for runtime probing, vitest.
Exact steps or command run after fix:
After-fix evidence:
The
console.warnfires with the tool name and diagnostic messages.The tool is still correctly hidden (no change to planner semantics).
Observed result after the fix: Descriptor authors immediately see
which tool has a malformed availability expression at registration time.
What was not tested: Full gateway startup with a real plugin that
has empty availability groups. The planner operates on in-memory
descriptors and has no platform-specific logic.
Tests and validation
# Planner + availability tests (17 passed, 2 new): node scripts/run-vitest.mjs src/tools/planner.test.ts src/tools/availability.test.tsNew test cases:
warns when a tool is hidden due to unsupported-signal diagnostics— verifies console.warn is called with tool name and message
does not warn for runtime availability conditions— verifiesauth-missing and other runtime conditions do NOT trigger the warn
Risk / scope
No— descriptors are a developer contract,not runtime user-facing.
NoNoconsole.warnoutput goes to stderr and could benoisy in tests that don't suppress it.
unsupported-signalonly fires for malformeddescriptors (empty allOf/anyOf), which are authoring errors that
should be fixed. Runtime conditions like auth-missing do not
trigger it.
Current review state
with a callback system. This PR takes a 3-line approach aligned with
community consensus.