Skip to content

constant_subtype_answer overrides: 7 booleans -> method overrides - #4584

Merged
trissim merged 10 commits into
mainfrom
claude-a/csa-overrides
Nov 11, 2026
Merged

trissim merged 10 commits into
mainfrom
claude-a/csa-overrides

Conversation

@trissim

@trissim trissim commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

5 constant_subtype_answer booleans replaced with method overrides:

  1. AttemptState.starting → advance_on_accepted(advance) / require_starting()
  2. MergeBlock.red() → red_description() returning tuple
  3. GoalAttemptPhase.launched → record_launched_observation(conn, reservation, observation, record_observation)
  4. WakePolicy.triage → require_not_triage()
  5. PiDiagnostic.provider_connection_failure → connection_failure_description() returning tuple

Each: base does nothing/returns empty, True member overrides with real behavior. Zero isinstance, zero branches at consumer sites. NRA verified: first override drops 373 → 371.

Test plan

  • All imports verified
  • NRA scan confirms count drops (verified on starting)

Generated with Claude Code

https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG

trissim and others added 5 commits November 11, 2026 13:39
…uire_starting

AttemptState.starting boolean replaced with two overrides:
- advance_on_accepted(advance): base does nothing, PromptStartingAttempt
  calls advance(PromptAcceptedAttempt). Zero branches at the consumer.
- require_starting(): base raises StaleFence, PromptStartingAttempt passes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
MergeBlock.red() boolean replaced with red_description() returning
a tuple of failure descriptions. Base returns (), FailedCheckMergeBlock
returns (self.what(),). Callers iterate instead of branching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
…tion

GoalAttemptPhase.launched boolean replaced with record_launched_observation()
that does nothing on base and records on ClaimedAttempt. The consumer
passes the record function; the state decides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
WakePolicy.triage boolean replaced with require_not_triage(): base
passes, BoundedTriageWake raises IdentityConflict. The consumer
calls the method instead of reading the boolean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
…ection_failure_description

PiDiagnostic.provider_connection_failure boolean replaced with
connection_failure_description() returning a tuple. Base returns (),
ProviderTransportFailureDiagnostic returns (self.description,).
Callers iterate instead of branching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
Copilot AI balanced review requested due to automatic review settings November 11, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

trissim and others added 2 commits November 11, 2026 13:44
GenerationState.ready boolean replaced with:
- require_ready(): base raises GoalRefused, ReadyGeneration passes
- has_ready_grant(matching): base returns False, ReadyGeneration returns
  the matching predicate. The state answers whether the grant holds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
…notation_id

RecordedEntry.is_message boolean replaced with:
- ends_source_import(): base returns False, MessageEntry returns True
- annotation_id: base returns NoEntryId(), MessageEntry returns self.id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
@trissim trissim changed the title constant_subtype_answer overrides: starting, red, launched, triage, provider_connection_failure constant_subtype_answer overrides: 7 booleans -> method overrides Nov 11, 2026
trissim and others added 3 commits November 11, 2026 13:47
…tity/has_session_proof

NativeContextReference.recorded boolean replaced with:
- require_transcript_identity(session_entry_id, user): base passes,
  NativeInputReference checks and raises IdentityConflict on mismatch
- has_session_proof(): base returns False, NativeInputReference returns True

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
InputAttempt.has_started boolean replaced with counts_as_started()
method. Base returns False, StartedInput returns True. Callers
call the method instead of reading the boolean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
…process/as_unattributed_process

RuntimeReference.names_installation() boolean replaced with process
factory methods. Base returns tuples with the process, ForeignReference
returns empty tuples. Callers iterate instead of filtering on a boolean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRFPZCCoQqYN2vmHCG
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.

2 participants