Repository navigation
fix(tools): emit warning for empty allOf/anyOf availability groups (fixes #92361) - #92368
liuhao1024 wants to merge 1 commit into
Conversation
Empty allOf/anyOf arrays in tool availability descriptors produce unsupported-signal diagnostics that were silently consumed — tools were hidden with no actionable feedback to authors. - Add signal property to empty-group diagnostics for consistency - Log console.warn in evaluateToolAvailability when unsupported-signal diagnostics are detected, including the tool name and message - Update messages to clarify these are authoring errors Fixes openclaw#92361
|
Codex review: needs real behavior proof before merge. Reviewed June 12, 2026, 3:01 AM ET / 07:01 UTC. Summary PR surface: Source +14, Tests +2. Total +16 across 2 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. 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 d4819948f37d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +14, Tests +2. Total +16 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Closing to free up PR slots for higher-quality contributions. The ClawSweeper rating indicates this may not align with the project's current priorities. |
What does this PR do?
Emit a
console.warndiagnostic when tool availability descriptors contain emptyallOf/anyOfgroups, instead of silently hiding the tool. Also adds thesignalproperty to these diagnostics for consistency with other diagnostic types.Related Issue
Fixes #92361
Type of Change
Changes Made
src/tools/availability.ts: Addsignalproperty to empty-group diagnostics; emitconsole.warninevaluateToolAvailabilitywhenunsupported-signaldiagnostics are detectedsrc/tools/planner.test.ts: Update test expectation to match new diagnostic shapeHow to Test
node scripts/run-vitest.mjs run src/tools/availability.test.ts— all 9 tests passnode scripts/run-vitest.mjs run src/tools/planner.test.ts— all 6 tests passconsole.warnoutput in stderr for the malformed-availability test caseReal behavior proof
Behavior or issue addressed:
Empty
allOf/anyOfarrays in tool availability descriptors produceunsupported-signaldiagnostics that are silently consumed — tools are hidden with no actionable feedback to authors. This is an authoring error that should be surfaced at evaluation time.Real environment tested:
macOS 26.4.1, Node.js v22, pnpm, OpenClaw main branch (d481994)
Exact steps or command run after the patch:
cd /Users/liuhao/.hermes/workdir/openclaw node scripts/run-vitest.mjs run src/tools/availability.test.ts src/tools/planner.test.tsEvidence after fix:
Observed result after fix:
Warning is emitted with tool name and descriptive message when empty availability groups are detected. All 15 tests pass.
What was not tested:
Live gateway startup with malformed descriptors (the fix is in the pure evaluation layer, no gateway integration needed).