Repository navigation
[V3 #235] Typed tool results and errors - #274
Conversation
ghfind author profile
The label reflects the author's public GitHub profile at processing time. Email preferences / 邮件设置: score emails go to available public GitHub addresses by default; unsubscribe in the email. / 有公开邮箱时默认发送评分邮件,可在邮件中退订。 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
OpenKyrozen/openkyrozen/tools/adapters.py
Lines 39 to 41 in cf6ff8c
When AVAILABLE_TOOLS is replaced with dict(adapters.AVAILABLE_TOOLS), each existing value is the text-rendering wrapper created by ToolMapping.__getitem__; this branch installs that wrapper directly instead of unwrapping its __tool_result_executor__. Subsequent registry invocations therefore receive a str and report contract_error for every retained built-in tool. Route these values through the same unwrapping performed by ToolRegistry.register, or explicitly preserve the previous typed executor.
AGENTS.md reference: AGENTS.md:L33-L35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What changed
Completes V3 issue #235 for R024, R025, and R031. Tool execution now returns immutable, JSON-safe
ToolResult/ToolErrorvalues. Runtime receipts, MCP error status, plugin events, learning statistics, and subagent outcomes use typed status; text rendering remains a compatibility projection.All 48 built-in runtime tools are bound to typed producers.
CommandResultkeeps explicit success, failure, and exit status. Dynamic/custom executors must returnToolResult; invalid returns produce a terminalcontract_errorafter one call. Orchestration invocation status stays distinct from child-task status, and effect/acceptance verification remains independent.Requirement coverage
Compatibility: existing built-in text APIs,
AVAILABLE_TOOLS, MCP text content, and CLI/TUI/Web display remain. Custom/dynamic string-returning executors must migrate toToolResult. No retry behavior or dependencies were added.Validation
make test-core: 625 tests, 14 skipped for optional dependencies/browser setup.make check,make lint,make docs-check, offline agent acceptance, and fixture-based subagent acceptance.make testhad three browser-flow failures because the Playwright Chromium executable is not installed. The mocked browser regression passes on both supported Python versions.No paid provider calls were used. This PR is intentionally limited to #235.