Repository navigation
Type retained-history inputs and reject unknown requested agents - #1147
Merged
Merged
Conversation
Apply autotyping/Pyrefly inference and correct inferred booleans to callbacks and numeric size guesses to Textual Size. Use Iterable[Widget] for visible native history items. Leave unsupported contracts unchanged and counted; no existing parameter annotation is erased.
trissim
force-pushed
the
next/toad-types-04
branch
from
October 23, 2026 11:28
ddfa349 to
677a649
Compare
trissim
marked this pull request as ready for review
October 23, 2026 11:30
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.
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.
An explicit unknown -a / --agent now fails at get_agent_binding, naming the requested value and listing known short names and identities. Empty launch_agent still returns NoAgent. This PR also types retained-history parameters and fixes the import-order lint regression from #1143.
Four separate commits:
Counts are pinned to base 433f04f and head 8bb520c. The seven touched production files are cli.py and widgets/{committed_presentation,conversation,history_anchor,transcript_fragments,transcript_history,transcript_lines}. In tests/textual/test_agent_binding.py, the existing startup-binding test removes the unknown-agent/NoAgent row and asserts pytest.raises(click.BadParameter, match="no-such-startup-agent") around the same lookup. No new test function or fixture.
The AST count includes positional-only, positional, keyword-only and both variadics, excluding self/cls. No previously annotated parameter became bare. Corrected inferred bool callbacks to Callable[[], bool], layout size integers to Textual Size, and the sibling-generator union to Iterable[Widget].
The new ratchet finding was conversation.py:1:1, I001: CommandTarget had been inserted after the later-sorting goal_presentation import. Ran the ratchet's exact Ruff command on full revision trees with the head's pyproject.toml:
All seven touched modules import under python -I with this source and Core 06f123fbd first on sys.path, and compileall passes for each. Full-production Pyrefly reports 1,262 errors on both the pinned main snapshot and this head: zero new diagnostics, not a passing checker. Checks run nice -n 19; Pyrefly uses one thread.
Interpreter proofs with the real packaged catalog:
Stops retained in the missing counts:
Assumed: