Skip to content

Clear NRA restated_override, TerminalMessage, SelfSearchedNode, and phase duplicates - #2234

Merged
trissim merged 1 commit into
mainfrom
toad-qt/nra-slop-sweep-26
Nov 24, 2026
Merged

trissim merged 1 commit into
mainfrom
toad-qt/nra-slop-sweep-26

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Clears six more nominal_refactor_advisor findings (8 files, -27 net lines):

  • Deleted restated SessionScope.matches_launch (session_scope.py, already on SharedSessionScope), driving NRA restated_override to 0.
  • Added Terminal.TerminalMessage (widgets/terminal.py, widgets/shell_terminal.py, widgets/conversation.py) owning terminal + control once for Finalized, AlternateScreenChanged, LongRunning, ShellTerminal.Terminate, and ShellTerminal.Interrupt — also fixing the latent teminal -> terminal typo bug where event.control on Terminate/Interrupt raised AttributeError.
  • Added SelfSearchedNode(ContextNode) (core/context_inspection.py) owning search_roots and search_description once for ReferenceNode, RecordedTurnNode, AnnotationNode, and AnnotationSourceNode.
  • Added PendingSubmissionPhase / SettledSubmissionPhase (client/bus_submission.py, conversation_submission.py) owning submitting() once for NotYetSent/PromptUnstarted and DeliveryOutcome/PromptStarted.
  • Defaulted SuspendedTranscript.successors (client/history_state.py) to (DetachedTranscript,), removing identical overrides on ClosingTranscript and RetiredProjectionTranscript.

Checks

  • Runtime MRO owner assertions across all affected classes: passed
  • tools/guarded_imports.py: 0
  • pytest -q tests/guards/test_shared_hook_sequences.py tests/guards/test_deleted_interface_mechanisms.py tests/guards/test_terminal_attention.py tests/guards/test_transcript_history_has_no_lifecycle_flags.py: 49 passed.

…ttingPhase, and SuspendedTranscript duplicates

- Delete restated SessionScope.matches_launch (already on SharedSessionScope), driving NRA restated_override to 0.
- Terminal.TerminalMessage: own terminal + control property once for Finalized, AlternateScreenChanged, LongRunning, ShellTerminal.Terminate, and ShellTerminal.Interrupt (also fixing latent teminal->terminal typo bug on ShellTerminal.Terminate/Interrupt and Conversation.on_shell_terminal_terminate).
- SelfSearchedNode(ContextNode): own search_roots and search_description once for ReferenceNode, RecordedTurnNode, AnnotationNode, and AnnotationSourceNode.
- PendingSubmissionPhase / SettledSubmissionPhase: own submitting() once for NotYetSent/PromptUnstarted and DeliveryOutcome/PromptStarted.
- SuspendedTranscript.successors: default to (DetachedTranscript,), removing duplicates on ClosingTranscript and RetiredProjectionTranscript.
@trissim
trissim merged commit dce63af into main Nov 24, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant