Repository navigation
Fix Android/Qt DM view stale-witness, observer drop, and WorkingTranscript publish wedges - #2341
Merged
Merged
Conversation
…cript publish wedges
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.
Summary
Fixes 5 interacting root causes that left Android/Qt DM and native thread views (
QtMailboxView/SavedTranscript) frozen on stale messages, flipped to"Saved history not loaded", or unable to send on desktop Qt:Unreachable
except ReloadRequired:inTranscriptPublication.publish()(src/toad/transcript_publication.py:209-229)ReloadRequired(and its subclassTranscriptChanged) subclassesReadAgain, so catchingReadAgainfirst made theReloadRequiredhandler 100% dead code. When the published source witness invalidated,self.owner.current_readwas never reset toNotPublished(), wedging the view resending a stale witness.except ReloadRequired:ahead ofexcept (*TRANSIENT_SOURCE_ERRORS, StaleRevision, ReadAgain):and widened transient handling to triggercoordination_access.check_route()on transient drop/restart errors instead of crashing the publication task.Observer restarts permanently retiring tabs (
src/toad/client/history_state.py:31-39)ObservationEnded(coveringObserverDied/ObserverProcessDied) andObserverUnattachedtoTRANSIENT_SOURCE_ERRORS. Previously, an observer drop or connector restart duringWorkingTranscript.executefell through toowner.source_failed(error)-> permanentRetiredSourceTranscript("Saved history not loaded").Paused saved-transcript reads never waking on reconnect (
src/toad/client/prepared_pages.py:438-449,src/toad/client/history.py)CoordinationObservedwakeup up ontoPreparedPageSource.observe_availabilityalongsideview.thread_scope.observe(...)and deleted the redundantWirePageBuffer.observe_availabilityoverride (IMPL-12). A pausedSavedTranscript(QtMailboxView) now resumes automatically when Core reconnects even if noThreadRowsChangedarrives for that thread.WorkingTranscript.publish()+CommitTranscript.rows_published()breaking operation completion (src/toad/client/history_state.py:396-399,src/toad/client/committed_presentation.py:341-345)WorkingTranscriptinheritedTranscriptState.publish(), which replacedowner._source_statemid-execution withLiveTranscript(), causingfinish_source_work(operation)to seeself._source_state is operation == Falseand dropoperation.owed,TranscriptSourceWorkFinished(), andsource_settled(leavingdemand=CommitDemandstuck).WorkingTranscript.publish()to advance the wrappedsourcein-place while keeping the running operation mounted untilfinish_source_work, and madeCommitTranscript.rows_published()callsuper().rows_published(owner)so painting rows onto anUnreadTranscriptimmediately advances coverage to"Saved history available".Desktop Qt native thread
operational_sources(src/toad/qt/mailbox_view.py:70-73)self.operational_sources = self.mailbox_sources()inQtMailboxView.__init__so desktop Qt native threads opened viaapply_native_load_planuse Core's inbox composer path instead ofSessionSources()("No agent is connected to this tab"), while keepingBoundSources.apply_native_load_planintact.Verification
tests/model/test_android_resync_lazy_load_catchup.pyand 8 guard suites): all passed (REL_IMPORTS=0).QtToadApp(repro_dm.py --comms-root /home/ts/.agent-comms --open toad-qt): openedtoad-qtcleanly tostate=LiveTranscript,cov='Saved history available',demand=CleanDemand,operational_sources=MailboxSources,rows=203, and bumped to204onexternal_transcript_changed().