Skip to content

Adopt workspace_id / endpoint_addr / session_id split #146

Description

@tanlethanh

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions