Repository navigation
Type context and transcript parameters from checked inference - #1144
Merged
Merged
Conversation
Run autotyping followed by Pyrefly, then correct inferred types against existing callers and capability parents. Reject object, narrow empty defaults, sibling unions and cyclic imports. Use DispatchRequest.require_id for the three stale ContextManifest calls exposed by checking.
trissim
marked this pull request as ready for review
October 23, 2026 10:50
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.
Match against the existing ConversationSessionBinding parent. Request takes a constructor with the captured binding, owner and generation; observed constructors bind their presentation explicitly at the caller. Declare the existing presentation-observation capability on AgentBinding rather than erase the view type.
request() built a throwaway BoundFrame and copied its three fields into a callable typed with those same fields (MEMB-5). The binding's capture already builds the publication from its kind; request types the kind and its one extra argument and hands both to capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main renamed AgentBinding to AgentConnection and moved SessionView to SessionScope; the batch annotations are reapplied on main's versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
show_draft took a union of two update classes to read two fields both declare; it now takes those values, and no union of our own classes stands in for a parent neither shares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Add checked parameter types across eight production modules using autotyping 24.9.0 followed by Pyrefly 1.4.0. Correct wrong inferred types to the existing owners (TurnContext, NativeContextData, PageEnd, SavedHistory, TargetTree, SidebarGroup and SidebarModelView). Checking exposed three calls to the deleted ContextManifest.require_request_id; they now use the declared DispatchRequest owner, manifest.request_id.require_id().
Tool comparison on copies of the worst file, core/context_inspection.py (121 missing parameters): Pyrefly fills 15, autotyping --aggressive fills 11, autotyping followed by Pyrefly fills 25. Read and corrected examples including required: bool for a widget collection, Self for unrelated owners, and tuple[()] for contributor paths.
Counts (AST, production only, self/cls excluded; includes positional-only, keyword-only and both variadics):
Stops retained in the counts:
Assumed:
Review correction at this head: both matches methods take ConversationSessionBinding, their existing shared input parent; both bound_to methods take Conversation. SourcePublicationRequests.request has one typed constructor parameter and no variadics. Observed requests bind presentation with partial at their two callers; request captures the existing BoundFrame and supplies binding/owner/generation to the constructor. AgentBinding now declares observe_thread_presentation, which its concrete members already implement. Both remain concrete. This correction reduces unannotated parameters 2,094 -> 2,086; all eight touched modules import/compile; checker remains at 1,325 errors with zero new diagnostics.
Core stop, unchanged: src/toad/transcript_publication.py:215 show_draft accepts TranscriptDraftUpdate | TranscriptSnapshotUpdate and reads draft. Core's members at agent_comms/acp_extension.py:624 and :632 both declare draft, but their parent AgentCommsUpdate does not. Core owns the missing shared draft capability; no union or field change made in this correction.
Assumed for correction: ConversationSessionBinding is the existing input parent; a captured frame's constructor inputs are bound synchronously before submission. No changes to #1115 or its worktree.