Skip to content

Assert saved identity collision on the lookup read - #2960

Merged
trissim merged 1 commit into
mainfrom
fix/lazy-registry-read-assertions
Oct 23, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/lazy-registry-read-assertions

Conversation

@trissim

@trissim trissim commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The saved-creation-collision test still expected a history read to resolve registry identities. #2893 made RegistrySnapshot.by_lookup lazy; assert RelationViolationError when that lookup is read instead.

Only tests/test_envelope_bus_integration.py:152 changes:

     with pytest.raises(RelationViolationError):
-        read_history(comms)
+        dict(reopened.registry.snapshot().by_lookup)

Bob's refused claim and the alice-only bus-row assertion stay intact. The dict call forces the lookup and avoids a bare-expression B018 finding. No src changes. Backend's child-script Bus import near :238 is untouched.

This follows #2957, which merged as 922ac87 and was already merged when I checked this additional order; GitHub cannot append a commit to that merged PR. It uses the same main-reds branch, updated to origin/main.

Validation: read RegistrySnapshot.by_lookup at registry_document.py:1023-1031. The commander supplied the behavior proof on 4f62186; no local tests, ratchets or suites ran. ruff check ran on the sole changed Python file and reports only existing I001 at :6 and E501 at :66, neither on the changed line. git diff --check passed.

 tests/test_envelope_bus_integration.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Assumed: the supplied by_lookup refusal is the intended public identity-resolution read. Backend still owns its separate child-script import edit; this PR changes only :152.

@trissim
trissim marked this pull request as ready for review October 23, 2026 23:47
@trissim
trissim enabled auto-merge October 23, 2026 23:47
Copilot AI balanced review requested due to automatic review settings October 23, 2026 23:47

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 c60ae6f into main Oct 23, 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