Skip to content

Fix broken/dead application-state accessor methods - #2

Merged
noha merged 1 commit into
mainfrom
fix/dead-state-accessors
Jul 19, 2026
Merged

noha merged 1 commit into
mainfrom
fix/dead-state-accessors

Conversation

@noha

@noha noha commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

GossipEndpoints>>endpointStateAt:put: called the nonexistent self localEndpoint (should be localEndpointState) and passed itself instead of a GossipEndpointState to setValue:endpointState: — never exercised (Gossiper's own addToList:/removeFromList: bypass it entirely). Fixed to delegate to the already-correct GossipEndpointState>>applicationStateAt:put:.

Found two more of the same species while verifying the fix: Gossiper>>stateAt:/stateAt:put: had the identical bug (calling stateAt:/stateAt:ifAbsentPut: on a bare GossipEndpoint, which has no such method) and were likewise never called anywhere. Fixed the same way; verified end-to-end with a fresh Gossiper instance.

Also removed GossipApplicationState>>initializeVersionFrom:, a dead self shouldBeImplemented stub with zero callers — version is computed in setValue:endpointState: via endpointState nextVersion instead.

GossipEndpoints>>endpointStateAt:put: called the nonexistent
self localEndpoint (should be localEndpointState) and passed itself
instead of a GossipEndpointState to setValue:endpointState: — never
exercised (Gossiper's own addToList:/removeFromList: bypass it
entirely). Fixed to delegate to the already-correct
GossipEndpointState>>applicationStateAt:put:.

Found two more of the same species while verifying the fix:
Gossiper>>stateAt:/stateAt:put: had the identical bug (calling
stateAt:/stateAt:ifAbsentPut: on a bare GossipEndpoint, which has no
such method) and were likewise never called anywhere. Fixed the same
way; verified end-to-end with a fresh Gossiper instance.

Also removed GossipApplicationState>>initializeVersionFrom:, a dead
self shouldBeImplemented stub with zero callers — version is computed
in setValue:endpointState: via endpointState nextVersion instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@noha
noha merged commit f701dda into main Jul 19, 2026
2 checks passed
@noha
noha deleted the fix/dead-state-accessors branch July 23, 2026 06:23
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