Skip to content

Reopened multiple inheritance phases: own-class isinstance and CLI failure roster become capabilities - #3195

Merged
trissim merged 4 commits into
mainfrom
refactor/mi-own-type-checks
Oct 25, 2026
Merged

trissim merged 4 commits into
mainfrom
refactor/mi-own-type-checks

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Multiple inheritance plan, batches 3 (own_type_checks, plan_phases.py:596) and 4 (inheritance_cleanup, :603). Both read done on main a2333ca (10-23 21:40Z). Three later merges reopened them:

Site Check Reopened by
registry_document.py:299 isinstance(other, ThreadRows) OwnClassChecksAbsent #3130 (e16dddd, merged 10-24 22:19Z)
cli_protocol.py:46 CLI_FAILURES = (ValueError, OSError, CoordinationError, GitCommandError) ClassRostersAbsent #2955 (c02ed61)
field_codec.py:2382 isinstance(data, NominalText) OwnClassChecksAbsent #2943 (56cfe9f); unit-toad's #3107 deletes it in Id128 phase 9

This PR:

  • ThreadRows.__eq__ returns NotImplemented for anything that isn't rows (the comparison-guard shape), so it no longer falls back to Mapping equality.
  • New capability CommandFailure in coordination_errors.py, beside DrainDeferred. CoordinationError and GitCommandError inherit it, and CLI_FAILURES names (ValueError, OSError, CommandFailure). The builtins stay because they're foreign types.

Touched tests: 205 passed across 14 files (the ThreadRows, CLI_FAILURES and GitCommandError consumers).

Evidence on this head: OwnClassChecksAbsent 1 site, field_codec.py:2382, which #3107 owns, so the after=RedecodesDeletedPhase gate is real for exactly that one site. ParentsShared 0/11 short, RestatedMembersAbsent 0, flag probes 0, ClassRostersAbsent 0. Once #3107 lands, both phases read done.

Assumed: nothing in src compares a ThreadRows to a plain dict (grepped every .threads ==). The one test that did, test_registration_components.py:41, now asserts emptiness. Every exception already caught by CLI_FAILURES is still caught, by the CoordinationError/GitCommandError MRO.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V

trissim and others added 2 commits October 24, 2026 22:25
… capabilities

ThreadRows.__eq__ asked isinstance of its own class and fell back to Mapping
equality; it now returns NotImplemented for anything but rows, the comparison
guard shape. CLI_FAILURES listed CoordinationError and GitCommandError by hand;
both now inherit the CommandFailure capability, which the tuple names once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
@trissim trissim changed the title Multiple inheritance batch 3: replace own-class isinstance checks with polymorphic methods Reopened multiple inheritance phases: own-class isinstance and CLI failure roster become capabilities Oct 25, 2026
trissim and others added 2 commits October 24, 2026 22:31
Rows compare only to rows now; the test asked whether the document holds
no thread rows, which is emptiness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
@trissim
trissim marked this pull request as ready for review October 25, 2026 02:31
Copilot AI balanced review requested due to automatic review settings October 25, 2026 02:31
@trissim
trissim enabled auto-merge October 25, 2026 02:31

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.

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
trissim merged commit e39ccce into main Oct 25, 2026
14 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.

2 participants