Skip to content

Remote comms: Kernel incarnation detection #689

@sirtimid

Description

@sirtimid

Problem: When a peer reconnects, we can't tell if it's the same kernel or a new incarnation. Promises from the previous incarnation should be rejected, but we currently treat all reconnections as the same kernel.

Expected Behavior:

  • Detect when a reconnected peer is a new kernel incarnation (different from previous)
  • Reject all promises from the previous incarnation when new incarnation detected
  • Track incarnation identity (could be part of peer identity or handshake)
  • Handle incarnation changes gracefully without breaking new connections

Implementation:

  • Add incarnation tracking to connection/channel state
  • Implement incarnation detection mechanism (peer identity comparison, handshake, or protocol-level)
  • On incarnation change detection, find and reject promises from old incarnation (using Task #2 pattern)
  • Update RemoteHandle or promise management to track incarnation
  • Coordinate with RemoteManager for promise rejection
  • Add tests for incarnation detection and promise rejection

Acceptance Criteria:

  • Incarnation changes are detected
  • Promises from previous incarnation are rejected on new incarnation
  • New connections work normally after incarnation change
  • Tests verify incarnation detection and promise cleanup

Dependencies: Remote comms: Promise rejection on give-up

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions