Repository navigation
Conversation
push_delta looked up the instance and dereferenced it unconditionally.
The registry holds weak references, so a delta flushed after its model
was collected resolved to None and the flush raised AttributeError.
Publish it without a revision; get_state already answers
{"id": ..., "state": None} for such an id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
can you share more information about what issue prompted you to implement this fix? |
This branch has not been deployed
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.
Problem
RevisionsMixin.push_deltadereferencesfind_instance(msg["id"])unconditionally:The instance registry holds weak references, so a delta flushed after its model was collected resolves to
None. The whole flush then dies withAttributeError: 'NoneType' object has no attribute '_id'.Change
When the instance is gone, the delta is published without a revision.
get_statealready answers{"id": ..., "state": None}for such an id, so what to do about a dropped instance stays with the client.Test
test_a_delta_for_a_collected_model_is_published_without_a_revisionruns on both protocol versions. It fails on the current code (2 failed) and passes with the change (22 passed intests/test_protocol_revisions.py).🤖 Generated with Claude Code