Summary
Host-side workspace identity needs to be split into three distinct fields:
workspace_id: durable Zedra workspace ID stored in host storage
endpoint_addr: transport endpoint address for that workspace
session_id: the currently attached session for that workspace
This removes the current naming overlap where one concept is being used for multiple identifiers.
Scope
- Update host storage and workspace state naming
- Keep transport and connection identifiers separate
- Update docs and protocol notes to match the new convention
Notes
session_token stays ephemeral and per-connection.
- This is a naming/model cleanup, not a behavior change.
endpoint_addr is misnamed: despite the name, the string used everywhere (URL params, WorkspaceState.endpoint_addr, deeplinks, saved-state JSON) is the workspace identity, not a network address. It is the id-only encode_endpoint_addr(EndpointAddr::from(endpoint_id)) form (no relay/direct addresses), matched by equality for persistence/reconnect/deeplinks. Pitfalls this causes: encoding a full endpoint.addr() (with relay/direct addrs) where identity is expected yields a different string for the same node and breaks matching (was a real bug in zedra status); it is also distinct from the raw endpoint_id.to_string() (plain base32). The split should make the identity field's name reflect "id", separate from any true transport address. (Doc comments added at zedra_rpc::pairing::encode_endpoint_addr and the endpoint_addr fields in the interim.)
Summary
Host-side workspace identity needs to be split into three distinct fields:
workspace_id: durable Zedra workspace ID stored in host storageendpoint_addr: transport endpoint address for that workspacesession_id: the currently attached session for that workspaceThis removes the current naming overlap where one concept is being used for multiple identifiers.
Scope
Notes
session_tokenstays ephemeral and per-connection.endpoint_addris misnamed: despite the name, the string used everywhere (URL params,WorkspaceState.endpoint_addr, deeplinks, saved-state JSON) is the workspace identity, not a network address. It is the id-onlyencode_endpoint_addr(EndpointAddr::from(endpoint_id))form (no relay/direct addresses), matched by equality for persistence/reconnect/deeplinks. Pitfalls this causes: encoding a fullendpoint.addr()(with relay/direct addrs) where identity is expected yields a different string for the same node and breaks matching (was a real bug inzedra status); it is also distinct from the rawendpoint_id.to_string()(plain base32). The split should make the identity field's name reflect "id", separate from any true transport address. (Doc comments added atzedra_rpc::pairing::encode_endpoint_addrand theendpoint_addrfields in the interim.)