Skip to content

Interop fixes and add subscribe namespace support and handling - #195

Merged
TimEvens merged 18 commits into
mainfrom
sub_namespaces
Oct 15, 2026
Merged

TimEvens merged 18 commits into
mainfrom
sub_namespaces

Conversation

@TimEvens

@TimEvens TimEvens commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds subscribe namespace handling and update to latest libquicr main that has various interop fixes for draft-18.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T22:21:53.358220Z e016694 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TimEvens
TimEvens merged commit f85a478 into main Oct 15, 2026
2 checks passed
@TimEvens
TimEvens deleted the sub_namespaces branch October 15, 2026 22:20

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0166944d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +61 to +64
priority = Read<uint8_t>(it, end);
delivery_timeout = Read<uint64_t>(it, end);
expires = Read<uint64_t>(it, end);
forward = Read<uint64_t>(it, end);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Version the incompatible subscribe-info wire format

When a relay is upgraded while any peer still runs the previous release, both sides advertise protocol version 1 but interpret this payload differently: the old decoder treats these new attribute bytes as the former subscribe_data length, while this decoder treats the old length and message bytes as attributes. This results in parse errors or corrupted subscription state, so rolling upgrades break peering subscriptions. Preserve the old encoding or introduce and validate a new protocol version with version-specific decoding.

Useful? React with 👍 / 👎.

Comment thread src/publish_handler.cc
publish_object_priority_ = priority;
}

server_.peer_manager_.ClientSubscribe(GetFullTrackName(), attrs);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Propagate repeated acknowledgements as subscription updates

When an existing downstream subscription receives an update acknowledgement, including the kNewGroupRequested and kPaused statuses handled above, this always calls ClientSubscribe, which constructs a fresh SubscribeInfo starting at sequence zero. After serialization it reuses the initial sequence number, so InfoBase::AddSubscribe rejects it as unchanged and the new forward or new-group attributes are neither persisted nor propagated beyond the directly connected peer. Use the existing ClientSubscribeUpdate path when this track already has a local subscribe-info entry.

Useful? React with 👍 / 👎.

Comment thread src/client_manager.cc

state_.conn_state_metrics[connection_handle].published_tracks++;

NotifySubscribeNamespaces(publish_attributes.track_full_name.name_space, connection_handle, false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Emit namespace teardown when a publisher disconnects

When a publishing connection disappears without sending PUBLISH_DONE, this records the namespace in notified_namespaces_, but OnSessionRemoved calls PurgePublishState, which only erases pub_subscribes and pub_namespace_active and never calls NotifySubscribeNamespaces(..., true). SUBSCRIBE_NAMESPACE clients therefore retain a namespace that no longer exists, and the stale notification entry can also suppress a later NAMESPACE if that namespace is republished. Purge should collect the removed namespaces and send NAMESPACE_DONE whenever no other publisher remains.

Useful? React with 👍 / 👎.

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