Register the Pub/Sub split agent identifiers: per-side flags and per-language families - #361
umair-ably wants to merge 2 commits into
Conversation
c65f88a to
a90c69e
Compare
I don't think this is right. The version string is the version of the entry it is tied to, so for example the agent string You're proposing here that But I question whether it should have a version, and instead it's a versionless entry to indicate server/device, a bit like |
There are existing agent entries not tied to any repo, like |
PDR-091b splits every Pub/Sub SDK into per-side packages whose factories stamp a side-declaring agent entry so that MAU classification never has to guess which side a connection is on. The identifiers are shared across languages: ably/ably-pubsub-js#2293, ably/ably-pubsub-java#1233 and ably/ably-pubsub-ruby#453 all stamp the same ably-pubsub-device / ably-pubsub-server strings, alongside the SDK's own versioned agent entry. The entries are versionless, like browser: under lockstep versioning a side-flag version would always duplicate the SDK entry beside it, and across SDKs a bare ably-pubsub-device/1.2.3 cannot say 1.2.3 of what. Version-of-what stays the SDK entry's job; the side entry is a pure flag. They carry no source or product for the same reason browser carries none: they are emitted by many repos and attribute no package. Register both so the realtime system classifies them as known agents rather than by their -device/-server suffix alone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
a90c69e to
accd376
Compare
|
Both points taken — updated the PR accordingly. Versionless it is. You're right that the version answered the wrong question: under the lockstep policy it always duplicated the SDK entry beside it, and cross-SDK it couldn't say version-of-what. The entries are now On the And yes, "first multi-repo identifiers" was wrong — |
The ably-pubsub-device / ably-pubsub-server agent identifiers are shared by every Pub/Sub SDK (ably-java and ably-ruby stamp the same strings), so a version on them cannot say what it versions — and under lockstep releasing it only ever duplicated the SDK's own agent entry sent alongside. Per the review of ably/ably-common#361, the side entries become pure flags, like the core's browser entry: ably-js/2.29.0 nodejs/22.3.0 ably-pubsub-server getAgentString now emits a bare identifier for a nullish agents value (previously it produced the invalid token 'name/undefined'; the Record<string, string | undefined> type always sanctioned versionless entries, but no code path emitted them correctly). Entries with versions are emitted exactly as before, so versioned attribution from layered SDKs (chat-js/x.y.z, react-hooks/x.y.z) is unchanged. optionsWithSideAgent loses its version parameter, the factories stop importing their package.json version, and the wire tests (pubsub_side_agent.test.js, the UTS side_modes self-test) now assert the bare token and fail on any versioned form of the flag. Marked breaking because the wire value changes: a released version had stamped ably-pubsub-device/<version>, and anything matching on the versioned form must match the bare identifier instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Matches the entry's registration in the ably-common agents registry (ably/ably-common#361): the side entry is a pure flag, like browser. Under lockstep versioning a version on the flag always duplicates the ably-ruby entry beside it, which keeps carrying identity, version and support status. Wire shape: ably-ruby/2.0.0 ruby/3.3.0 ably-pubsub-server Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Under PDR-091b every SDK's agent identifier follows its repo rename in the new major: ably-js -> ably-pubsub-js and so on. Because the flip happens exactly at the package split and the maintenance branches are never touched, the identifier alone partitions the fleet - the old identifier is legacy-package traffic, the new one is new-package traffic - so migration tracking and legacy EOL enforcement become a string match. Each entry sits beside its legacy counterpart, which stays registered: the old packages keep stamping the old identifiers through their maintenance year, and those entries are where their EOL sunsets will live. Names and types mirror the legacy entries (ably-pubsub-flutter stays a wrapper over the Java/Cocoa cores). ably-pubsub-dart and ably-pubsub-rust have no legacy pub-sub entry to shadow and are registered fresh against their existing repos. Known wrinkle, deliberate: old and new identifiers share a source repo, so fetch-agent-releases will associate that repo's releases with both entries. Sunsets are authored per entry, so this only affects the best-effort release CSV. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The family identifier follows the package split, per the agent identifier convention proposed on PDR-091b2 and registered in ably/ably-common#361: because it flips exactly at the split and the maintenance branch is never touched, the identifier alone partitions the fleet - ably-java/* is legacy-package traffic, ably-pubsub-java/* is new-package traffic. It names the family rather than any one published artifact; the side a client declares travels as the separate versionless entry stamped by the door packages: ably-pubsub-java/2.0.0 jre/17.0.12 ably-pubsub-server Requires the ably-pubsub-java registry entry (ably/ably-common#361) before any release from this branch. Mirrors ably/ably-pubsub-js#2297. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The family identifier follows the package split, per the agent identifier convention proposed on PDR-091b2 and registered in ably/ably-common#361: because it flips exactly at the split and the maintenance branch is never touched, the identifier alone partitions the fleet - ably-ruby/* is legacy-gem traffic, ably-pubsub-ruby/* is new-package traffic. It names the family rather than any one published gem; the side a client declares travels as the separate versionless entry stamped by the server factories: ably-pubsub-ruby/2.0.0 ruby/3.3.0 ably-pubsub-server Requires the ably-pubsub-ruby registry entry (ably/ably-common#361) before any release from this branch. Mirrors ably/ably-pubsub-js#2297 and ably/ably-pubsub-java#1233. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ably-pubsub-device / ably-pubsub-server agent identifiers are shared by every Pub/Sub SDK (ably-java and ably-ruby stamp the same strings), so a version on them cannot say what it versions — and under lockstep releasing it only ever duplicated the SDK's own agent entry sent alongside. Per the review of ably/ably-common#361, the side entries become pure flags, like the core's browser entry: ably-js/2.29.0 nodejs/22.3.0 ably-pubsub-server getAgentString now emits a bare identifier for a nullish agents value (previously it produced the invalid token 'name/undefined'; the Record<string, string | undefined> type always sanctioned versionless entries, but no code path emitted them correctly). Entries with versions are emitted exactly as before, so versioned attribution from layered SDKs (chat-js/x.y.z, react-hooks/x.y.z) is unchanged. optionsWithSideAgent loses its version parameter, the factories stop importing their package.json version, and the wire tests (pubsub_side_agent.test.js, the UTS side_modes self-test) now assert the bare token and fail on any versioned form of the flag. Marked breaking because the wire value changes: a released version had stamped ably-pubsub-device/<version>, and anything matching on the versioned form must match the bare identifier instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ably-pubsub-device / ably-pubsub-server agent identifiers are shared by every Pub/Sub SDK (ably-java and ably-ruby stamp the same strings), so a version on them cannot say what it versions — and under lockstep releasing it only ever duplicated the SDK's own agent entry sent alongside. Per the review of ably/ably-common#361, the side entries become pure flags, like the core's browser entry: ably-js/2.29.0 nodejs/22.3.0 ably-pubsub-server getAgentString now emits a bare identifier for a nullish agents value (previously it produced the invalid token 'name/undefined'; the Record<string, string | undefined> type always sanctioned versionless entries, but no code path emitted them correctly). Entries with versions are emitted exactly as before, so versioned attribution from layered SDKs (chat-js/x.y.z, react-hooks/x.y.z) is unchanged. optionsWithSideAgent loses its version parameter, the factories stop importing their package.json version, and the wire tests (pubsub_side_agent.test.js, the UTS side_modes self-test) now assert the bare token and fail on any versioned form of the flag. Marked breaking because the wire value changes: a released version had stamped ably-pubsub-device/<version>, and anything matching on the versioned form must match the bare identifier instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lmars
left a comment
There was a problem hiding this comment.
A minor comment regarding URLs, but otherwise LGTM
| "identifier": "ably-pubsub-js", | ||
| "versioned": true, | ||
| "type": "sdk", | ||
| "source": "https://github.com/ably/ably-js", |
There was a problem hiding this comment.
Should this be https://github.com/ably/ably-pubsub-js? Similar for all the other sources added in this PR.
The family identifier follows the package split, per the agent identifier convention proposed on PDR-091b2 and registered in ably/ably-common#361: because it flips exactly at the split and the maintenance branch is never touched, the identifier alone partitions the fleet - ably-java/* is legacy-package traffic, ably-pubsub-java/* is new-package traffic. It names the family rather than any one published artifact; the side a client declares travels as the separate versionless entry stamped by the door packages: ably-pubsub-java/2.0.0 jre/17.0.12 ably-pubsub-server Requires the ably-pubsub-java registry entry (ably/ably-common#361) before any release from this branch. Mirrors ably/ably-pubsub-js#2297. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Registers both kinds of agent identifier introduced by the PDR-091b package split, in two commits:
Commit 1 — the cross-SDK side flags (versionless)
ably-pubsub-device/ably-pubsub-serverare the same two strings stamped by every language (ably-js#2293, ably-java#1233, ably-ruby#453). Versionless, per the review discussion below: under lockstep versioning a side-flag version always duplicates the SDK entry beside it, and across SDKs it cannot say version-of-what — so, likebrowser, the entry is a pure flag. Entry shape followsbrowserexactly (versioned: false, nosource/product, hence theruntimetype branch — flag if you'd prefer a dedicated type). The matching SDK-side change is implemented in ably-js#2297; java/ruby mirror it before their splits merge.Commit 2 — the per-language family identifiers (versioned)
Each SDK's identifier follows its repo rename in the new major:
ably-pubsub-js,-java,-go,-python,-ruby,-php,-dotnet,-flutter,-dart,-cocoa,-swift,-rust. Because the flip happens exactly at the split and maintenance branches are never touched, the identifier alone partitions the fleet — old identifier ⇒ legacy-package traffic, new ⇒ new-package traffic — so migration tracking and legacy EOL enforcement become a string match. Wire shape:Details: each new entry sits beside its legacy counterpart, which stays registered (the old packages stamp the old identifiers through their maintenance year, and those entries carry their eventual EOL sunsets). Names/types mirror the legacy entries;
ably-pubsub-flutterstays awrapperover the Java/Cocoa cores;ably-pubsub-dartandably-pubsub-rusthave no legacy pub-sub entry and are registered fresh against their existing repos. One known wrinkle, deliberate: old and new identifiers share a source repo, sofetch-agent-releaseswill associate that repo's releases with both entries — sunsets are authored per entry, so this only affects the best-effort release CSV.The full convention (including what each SDK owner does and the registry-before-release ordering) is proposed as a comment on PDR-091b2.
Verified:
npm run validate:agents(93 agents),npx jest test/agents.test.js(2 passing),prettier --checkclean.🤖 Generated with Claude Code