Skip to content

Comments

Subscriptions lifecycle#5352

Open
mikolajpp wants to merge 40 commits intodevelopfrom
mp/groups-sub-lifecycle
Open

Subscriptions lifecycle#5352
mikolajpp wants to merge 40 commits intodevelopfrom
mp/groups-sub-lifecycle

Conversation

@mikolajpp
Copy link
Collaborator

@mikolajpp mikolajpp commented Dec 8, 2025

Summary

This PR implements the subscription lifecycle mechanism in the groups and channels agents, tracking connection status on each main subscription. Using this mechanism, the group or channel host can signal a subscription problem without resorting to crashing. This will improve our error logs, as many problems that currently manifest as crashes will now be received as error facts, to be processed by the subscriber. Ultimately, this mechanism, or its elaboration, can be integrated in the UI to improve UX around resource connectivity.

Closes TLON-5136

Changes

  1. Implement connectivity status for each group and channel.
  2. Signal subscription problem with dedicated %group-error, %channel-error facts send out on the offending subscription path.
  3. Upgrade protocols for groups and channels.

How did I test?

Tested connectivity logic in various two-party scenarios, involving resource deletion, banning, kicking, or lack of permissions.

Risks and impact

  • Safe to rollback without consulting PR author? No
  • Affects important code area:
    • Onboarding
    • State / providers
    • Message sync
    • Channel display
    • Notifications
    • Other:

Rollback plan

This is both a state and protocol upgrade in groups and channels. To rollback, we will need to keep the new state and protocol versions, but carefully restore the original subscription logic. This will need to be done manually.

@mikolajpp mikolajpp requested review from Fang- and arthyn December 8, 2025 06:37
@mikolajpp mikolajpp force-pushed the mp/groups-sub-lifecycle branch from c751828 to 61d7e7e Compare December 10, 2025 07:14
:+ %group-update | -:!>(*vale:m-group-update)
:+ %group-log | -:!>(*vale:m-group-log)
::
:+ %group-token & -:!>(*vale:m-group-token)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have been strict in the first place, because tokens are only transferred internally for now.

[net group]
:_ group
^- net:v10:gv
[%sub time init &+%done]:net
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that after type migration we are going to inflate our subscriptions, which will eventually adjust each connection status to its true state.

@mikolajpp mikolajpp marked this pull request as ready for review December 17, 2025 07:25
Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't do channels/server line-by-line yet, but anything that I mentioned on groups should apply there as well.

Comments below!

@linear
Copy link

linear bot commented Dec 18, 2025

Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. We did spot some potential problem with channels' +ca-u-connection, let's reevaluate.

Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there!

Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, thank you!

@mikolajpp mikolajpp force-pushed the mp/groups-sub-lifecycle branch from 9d6597c to 6760aac Compare February 3, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants