Repository navigation
Type ACP lifecycle parameters with existing owner contracts - #1146
Merged
Merged
Conversation
trissim
marked this pull request as ready for review
October 23, 2026 11:05
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
force-pushed
the
next/toad-types-03
branch
from
October 23, 2026 11:14
f7088d1 to
61894e7
Compare
Apply checked autotyping/Pyrefly inference to process, controller, session and configuration contracts. Use SurfaceBinding for attachment and AgentProcess for reusable connections. Reject the inferred object-based prompt list; the boundary still accepts two different payload representations.
trissim
force-pushed
the
next/toad-types-03
branch
from
October 23, 2026 11:19
61894e7 to
bfc03e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotate ACP lifecycle parameters with existing owners. Agent.start and AgentProcess.start both accept tuple[AgentProcess, ...]; the empty default does not restrict the argument to tuple[()]. AgentController imports ClientSessionRequest, SurfaceBinding and DetachedSurfaceBinding once each and uses those class names consistently.
Rebased onto main 661fc63. Resolved agent_session.py imports preserving ThreadPresentation, agent.py preserving AgentConnection and feedback.flash, and agent_binding.py preserving AgentConnection/NoAgentConnection and feedback.flash. No removed owner or forwarding method returns.
Counts against that main: seven-file batch 206 -> 182 unannotated parameters; whole src/toad 2065 -> 2041. Explicit Any remains 10. All seven modules imported under python -I against Core 06f123fbd and compiled. No pytest; tests/ unchanged.
Requested checker command (nice -n 19, Pyrefly 1.4.0, -j 1, explicit source roots):
All 20 are present in the fresh-main baseline; zero new diagnostics. The earlier full checker did run, but it missed the empty-only tuple at the call through the untyped AgentSession.agent field. A checker baseline is not proof that inferred types match callers.
Current diagnostic output:
Stop: src/toad/acp/agent_controller.py:242 _prompt still receives SDK blocks and raw dictionaries. No object type or payload union substituted.
Assumed: reusable processes are AgentProcess instances; existing main owns the renamed connection family and feedback behavior. No pytest run. The old checkout containing the paused rebase was left untouched after the worktree order; this correction was made in /home/ts/wt/toad-types-1146.
Count correction: the comparison is pinned to parent 661fc63 and delivered head bfc03e7. Exactly the seven changed files were recounted individually: 206 -> 182. The earlier 612 -> 676 included changes from a moving main outside this PR; that claim was wrong.