Repository navigation
Declare caller-owned types in the eight heaviest Toad modules - #1148
Conversation
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.
|
Handoff at 30d8240 on next/toad-types-05. Done: the original eight-file annotation batch is 539 -> 119 bare parameters; src/toad is 2000 -> 1577. All genuine nullable inputs are explicit stops in the PR body, with caller locations. Native session observation is fixed at src/toad/core/context_inspection.py:547-552 using NativeSessionFiles; MroProjection.project_value owns the output contract at src/toad/core/projection.py:8, with all seven consumers migrated. The locked Core is 7017468028ea2428ce71fe30261aa8d827aa222a (lock-only commit 077c680); IncarnationThreadTarget imports from that exact installed wheel. Seven focused tests passed against that lock, and all 15 changed production modules import under python -I. Left: PR #1148 remains draft until Debt ratchet succeeds on this exact head. The prior run's source comparison passed; its remaining surface-guard failure at tests/guards/test_test_layers.py:42 found a preexisting workspace-backed model test. The latest commit moves tests/model/test_recorded_transcript_reader.py unchanged to tests/app/test_recorded_transcript_reader.py (100% rename). Our new real-wire test is already at tests/app/test_context_reader_session_revision.py:8. Wait for the latest head's hosted result; no further source edits are currently identified. Stopped item: src/toad/core/context_inspection.py:703-705 still reads deleted bus.log. Deletion was stopped under Tristan's visible-feature exception: stopped-thread Context explorer detail/search/copy/export depend on this family. Do not delete only the saved overrides: that would inherit the live socket fallback. This needs its own feature-owner decision. Exact next action: gh pr checks 1148 -R OpenHCSDev/toad. If Debt ratchet is green on 30d8240, update the PR body with that run and current head, then gh pr ready 1148 -R OpenHCSDev/toad. If red, read only the failing job and fix its named site. No known next source edit. The PR body currently identifies an earlier head; refresh those head links when reporting the final check. Slice 3 remains parked, clean, on next/toad-types-06 in /home/ts/wt/toad-types-06 until #1148 is green and ready. |
The moved application test still called CoordinationTranscriptReader.snapshot with a root and thread name, the signature P401 replaced with a TranscriptScope (a751354). Pass the KnownTranscript that already declares that address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The eight selected modules now declare 420 formerly bare parameters against main
aeef59ee093561b7a1e5a87d1f33ff952e8343ef. The complete projection consumer family is repaired as authorized; total src/toad reduction is 423. Head:8d7a5be7ca537e9aa00b2818bc9eae244d5a094d. The branch includes current main; no ratchet baseline/configuration changes.src/toad/acp/agent_process.pysrc/toad/comms_root.pysrc/toad/core/context_inspection.pysrc/toad/transcript_preparation.pysrc/toad/transcript_publication.pysrc/toad/transcript_state.pysrc/toad/widgets/presentation_window.pysrc/toad/widgets/sidebar_tree.pyExplicit Any remains 10. All 287 src/toad modules parsed without omissions. No previously annotated input from main was made bare. Genuine nullable inputs retain their old runtime defaults and become explicit IDEN-3 stops; no nullable annotation was invented for the count.
The three context defects:
observe(cls, files: NativeSessionFiles) -> SessionObservation; it reads files.session and files.input_proof. The old caller passed Thread.session_file: SessionFile, which owns neither resource. Test uses Core's create_fresh_private_session and verifies a new owner-proof file changes the observation. Fixture follow-ups: 7ff7198, bd5989c.Projection family caller inventory (final source): owner_preparation.py, session_entry.py, core/context_inspection.py, widgets/session_details.py and widgets/transcript_fragments.py. No projection consumer still calls dispatch_sync. Ordinary identity-preserving dispatch consumers are untouched.
Verification: six focused projection cases pass, covering different output type, first-handler precedence, context forwarding, override binding, None results, unmatched input, and live/unavailable owner-plan results. The new actual ContextInspection.read test passes (1 case). All 15 changed production modules import under python -I and compile in the owned environment synced with uv sync --locked --all-extras --no-editable. Both focused files run together against locked Core 7017468028ea2428ce71fe30261aa8d827aa222a: 7 passed in 4.78s. No broad suite run. The original installed-runtime checks also passed, before this exact locked-environment run. Hosted result on this exact head is reported below before ready.
Dependency and test-layer corrections:
Every stopped parameter in the original eight files; nullable stops include the concrete None/default caller:
src/toad/acp/agent_process.py:31AgentProcess.__init__.agentsrc/toad/acp/agent_process.py:53AgentProcess.accepts_attachment.agentsrc/toad/acp/agent_process.py:66AgentProcess.start.agentsrc/toad/acp/agent_process.py:98AgentProcess.prompt.agentsrc/toad/acp/agent_process.py:98AgentProcess.prompt.contentsrc/toad/acp/agent_process.py:160AgentProcess.read_text_file.linesrc/toad/acp/agent_process.py:177AgentProcess.create_terminal.argssrc/toad/acp/agent_process.py:177AgentProcess.create_terminal.envsrc/toad/acp/agent_process.py:177AgentProcess.create_terminal.cwdsrc/toad/acp/agent_process.py:177AgentProcess.create_terminal.output_byte_limitsrc/toad/acp/agent_process.py:268AgentProcess.stop.agentsrc/toad/comms_root.py:121Observation.failed.selectedsrc/toad/comms_root.py:133Observation.attach.accesssrc/toad/comms_root.py:133Observation.attach.previoussrc/toad/comms_root.py:178FailedObservation.write_order.rootsrc/toad/comms_root.py:178FailedObservation.write_order.channelsrc/toad/comms_root.py:190FailedObservation.observe_sidebar.wantedsrc/toad/comms_root.py:224Observing.write_order.rootsrc/toad/comms_root.py:224Observing.write_order.channelsrc/toad/comms_root.py:271Observing.views_changed.eventsrc/toad/comms_root.py:271Observing.views_changed.subscriptionsrc/toad/comms_root.py:296Observing.observe_sidebar.wantedsrc/toad/comms_root.py:308AnsweringReads.views_changed.eventsrc/toad/comms_root.py:308AnsweringReads.views_changed.subscriptionsrc/toad/comms_root.py:314AnsweringReads.observe_sidebar.wantedsrc/toad/core/context_inspection.py:143ReferenceNode.search_roots.current_rootssrc/toad/core/context_inspection.py:195RecordedTurnNode.search_roots.current_rootssrc/toad/core/context_inspection.py:301AnnotationNode.search_roots.current_rootssrc/toad/core/context_inspection.py:348AnnotationSourceNode.search_roots.current_rootssrc/toad/core/context_inspection.py:432SegmentNodes.messages.segmentsrc/toad/core/context_inspection.py:531ContextInspection.read.cursorsrc/toad/core/context_inspection.py:703SavedContextInspection.saved_manifest.manifestsrc/toad/core/context_inspection.py:749InspectionState.acquire.cursorsrc/toad/core/context_inspection.py:806DetachedInspection.acquire.cursorsrc/toad/core/context_inspection.py:891HoldingInspection.find.selectedsrc/toad/core/context_inspection.py:938NativeInspection.receive_inspection.acquiredsrc/toad/core/context_inspection.py:976UnavailableNativeInspection.receive_inspection.acquiredsrc/toad/transcript_preparation.py:63PreparedTranscriptPage.__deepcopy__.memosrc/toad/transcript_preparation.py:74PreparedTranscriptPage.measured.pagesrc/toad/transcript_preparation.py:74PreparedTranscriptPage.measured.viewsrc/toad/transcript_preparation.py:92PreparedTranscriptPage.empty.pagesrc/toad/transcript_preparation.py:215PageFragmentRange.__eq__.othersrc/toad/transcript_preparation.py:369PreparedPageSource.edge_reached.boundarysrc/toad/transcript_preparation.py:495ReplaceablePageSource.replacement.throughsrc/toad/transcript_preparation.py:518SavedHistory.prefix.throughsrc/toad/transcript_preparation.py:521SavedHistory.replacement.throughsrc/toad/transcript_preparation.py:536SavedPrefix.__init__.throughsrc/toad/transcript_preparation.py:540SavedPrefix.replacement.throughsrc/toad/transcript_preparation.py:627ClosedHistory.has_more.pagesrc/toad/transcript_preparation.py:630ClosedHistory.has_older.pagesrc/toad/transcript_preparation.py:633ClosedHistory.edge_reached.boundarysrc/toad/transcript_preparation.py:639ClosedHistory.prefix.throughsrc/toad/transcript_preparation.py:642ClosedHistory.replacement.throughsrc/toad/transcript_preparation.py:686ProjectedTranscriptSource.prefix.throughsrc/toad/transcript_publication.py:87BoundFrame.capture.argssrc/toad/transcript_publication.py:87BoundFrame.capture.extrasrc/toad/transcript_publication.py:228CanonicalSourcePublication.read_past_history.readsrc/toad/transcript_publication.py:228CanonicalSourcePublication.read_past_history.wholesrc/toad/transcript_publication.py:341SourcePublicationRequests.resume._eventsrc/toad/transcript_publication.py:542BoundView.Moment.capture.extrasrc/toad/transcript_publication.py:568BoundView.Restoration.refresh.publicationsrc/toad/transcript_publication.py:706BoundView.request.ownersrc/toad/transcript_publication.py:811TranscriptPresentation.get_transcript_page.beforesrc/toad/transcript_publication.py:811TranscriptPresentation.get_transcript_page.aftersrc/toad/transcript_publication.py:811TranscriptPresentation.get_transcript_page.throughsrc/toad/transcript_publication.py:929TranscriptPresentation.source_work_finished.historysrc/toad/transcript_state.py:57TranscriptState.reserve.operationsrc/toad/transcript_state.py:108TranscriptState.for_projection.ownersrc/toad/transcript_state.py:135LiveTranscript.reserve.ownersrc/toad/transcript_state.py:135LiveTranscript.reserve.operationsrc/toad/transcript_state.py:141LiveTranscript.check_edges.ownersrc/toad/transcript_state.py:156UnboundTranscript.mounted.ownersrc/toad/transcript_state.py:168UnreadTranscript.rows_published.ownersrc/toad/transcript_state.py:212LatestViewportRequest.reading.ownersrc/toad/transcript_state.py:311WorkingTranscript.__init__.ownersrc/toad/transcript_state.py:329WorkingTranscript.progressed.ownersrc/toad/transcript_state.py:342WorkingTranscript.delivered.ownersrc/toad/transcript_state.py:378WorkingTranscript.execute.ownersrc/toad/transcript_state.py:409WorkingTranscript.schedule.ownersrc/toad/transcript_state.py:489CommitTranscript.__init__.ownersrc/toad/transcript_state.py:497CommitTranscript.execute.ownersrc/toad/transcript_state.py:512CommitTranscript.rows_published.ownersrc/toad/widgets/presentation_window.py:93PresentationBudget.fit.candidatessrc/toad/widgets/presentation_window.py:109PresentationBudget.runway.sequencesrc/toad/widgets/presentation_window.py:147PageEnd.has_more.throughsrc/toad/widgets/presentation_window.py:147PageEnd.has_more.pagesrc/toad/widgets/presentation_window.py:150PageEnd.adjacent.pagesrc/toad/widgets/presentation_window.py:179PageEnd.load_page.loadersrc/toad/widgets/presentation_window.py:179PageEnd.load_page.throughsrc/toad/widgets/presentation_window.py:205PageEnd.walk.targetsrc/toad/widgets/presentation_window.py:240OlderEnd.load_page.loadersrc/toad/widgets/presentation_window.py:240OlderEnd.load_page.cursorsrc/toad/widgets/presentation_window.py:240OlderEnd.load_page.throughsrc/toad/widgets/presentation_window.py:273NewerEnd.has_more.throughsrc/toad/widgets/presentation_window.py:273NewerEnd.has_more.pagesrc/toad/widgets/presentation_window.py:276NewerEnd.load_page.loadersrc/toad/widgets/presentation_window.py:276NewerEnd.load_page.cursorsrc/toad/widgets/presentation_window.py:276NewerEnd.load_page.throughsrc/toad/widgets/presentation_window.py:341PreparationDemand.prepare_ahead.pagesrc/toad/widgets/presentation_window.py:377MovingPreparation.prepare_ahead.historysrc/toad/widgets/presentation_window.py:377MovingPreparation.prepare_ahead.pagesrc/toad/widgets/sidebar_tree.py:136RowReconciliation.sync.methodsrc/toad/widgets/sidebar_tree.py:138RowReconciliation.sync.synchronized.viewsrc/toad/widgets/sidebar_tree.py:138RowReconciliation.sync.synchronized.argssrc/toad/widgets/sidebar_tree.py:138RowReconciliation.sync.synchronized.kwargssrc/toad/widgets/sidebar_tree.py:178KeyedRows.update_row.rowsrc/toad/widgets/sidebar_tree.py:187KeyedRows.place_row.rowsrc/toad/widgets/sidebar_tree.py:254SidebarGroup.__init__.rowsrc/toad/widgets/sidebar_tree.py:254SidebarGroup.__init__.kwargssrc/toad/widgets/sidebar_tree.py:531SidebarModelState.serves.pathsrc/toad/widgets/sidebar_tree.py:540SidebarModelState.changes.changessrc/toad/widgets/sidebar_tree.py:543SidebarModelState.apply.changessrc/toad/widgets/sidebar_tree.py:581BoundSidebar.serves.pathsrc/toad/widgets/sidebar_tree.py:607Current.apply.changessrc/toad/widgets/sidebar_tree.py:620Behind.changes.changessrc/toad/widgets/sidebar_tree.py:632SidebarModelView.__init__.kwargssrc/toad/widgets/sidebar_tree.py:714SidebarModelView.present.changessrc/toad/widgets/sidebar_tree.py:801TargetTree.row_for.selectionsrc/toad/widgets/sidebar_tree.py:895TargetTree.session_selected.eventAdditional moved projection-boundary stops: core/projection.py:8, MroProjection.project_value.value / args / kwargs. The selected input families and per-call context are heterogeneous; object, Protocol and permissive Callable types are not substituted. The existing handler declarations and their concrete typed outputs remain authoritative.
Assumed: