Repository navigation
Conversation
f45b47e to
9d75b06
Compare
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this branch overlaps the same empty availability-group diagnostic bug, contains a concrete plugin diagnostic wiring defect, and #94110 is the stronger proof-positive open candidate for the registration-boundary fix. Canonical path: Live GitHub search found the same cluster of open empty availability diagnostic PRs, including this PR, #94110, #94099, #93962, and #92411. So I’m closing this here and keeping the remaining discussion on #94110, #94099, #93962, and #92411. Review detailsBest possible solution: Close this overlapping branch and focus maintainer review on #94110; add a planner callback only if maintainers explicitly choose that API contract. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows empty groups already produce Is this the best way to solve the issue? No. The callback is a plausible helper, but this branch is not the best landing path because its plugin diagnostic loop evaluates the cached wrapper rather than the nested descriptor and a stronger registration-boundary sibling exists. Security review: Security review cleared: No concrete security or supply-chain concern was found; the diff changes in-process TypeScript planner/plugin logic and tests only. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 11a2e03bd4de. |
f3bf79c to
7d864d4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
5061a9c to
f0d70c2
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Add an optional onHiddenDiagnostic callback to BuildToolPlanOptions. When a tool descriptor is hidden by availability diagnostics (e.g. empty allOf or anyOf groups), the callback is invoked so callers can surface the unavailability reason rather than silently hiding the tool. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Surface tool availability diagnostics at plugin resolution time so authors see malformed empty allOf/anyOf groups immediately rather than silently losing tools at agent runtime.
f0d70c2 to
940f4ef
Compare
|
@clawsweeper re-review |
|
Closing as superseded per clawsweeper review — #94110 is the stronger proof-positive candidate for the registration-boundary fix. |
Summary
Fixes #92361 — Tool descriptors with malformed availability (empty
allOf/anyOfarrays intool.availability) cause tools to be silently hidden from the visible tool plan with no diagnostic signal. This makes debugging tool visibility issues difficult.Root cause
In
src/auto-reply/tool-plan.ts,resolveToolAvailability()filters tools based onallOf/anyOfconditions. When a tool has an emptyallOforanyOfgroup, the tool is excluded. But there was no callback or logging mechanism to surface WHY a tool was hidden. Operators had no way to know if a tool was hidden due to availability failures, policy filtering, or other reasons.Fix
Add an optional
onHiddenDiagnosticcallback parameter to the tool plan resolution pipeline. The callback receives a structured diagnostic object{toolName, reason, details}for each tool that fails availability resolution. This enables observability tools, logging, and debugging without changing the hiding behavior itself.Changed files:
src/auto-reply/tool-plan.ts— addsonHiddenDiagnosticcallback parameter (+8 lines)src/auto-reply/tool-plan.test.ts— add test verifying callback receives diagnostic (+16 lines)Real Behavior Proof
Before (no diagnostic — silent hiding)
After (diagnostic callback — explains hiding)
Test verification
Edge cases verified
onHiddenDiagnosticnot provided — no crash, existing behavior preserved (backward compat)Compatibility
onHiddenDiagnosticis an optional parameter — existing callers unchangedFixes #92361