Skip to content

fix: prefer Yamux transport for headless account selection - #59

Open
cray-com wants to merge 1 commit into
anyproto:mainfrom
cray-com:fix/space-invite-transport
Open

fix: prefer Yamux transport for headless account selection#59
cray-com wants to merge 1 commit into
anyproto:mainfrom
cray-com:fix/space-invite-transport

Conversation

@cray-com

Copy link
Copy Markdown

Summary

  • prefer Yamux/TCP when the headless CLI selects an existing bot account
  • preserve all existing AccountSelect request fields through a small request builder
  • add a regression test covering the transport preference and custom-network fields

Root cause and reproduction

anytype-heart exposes PreferYamuxTransport specifically for clients that have problems with QUIC, but the headless CLI never enabled it during bot-account auto-login. On a native Linux x86_64 VPS using the public Anytype Network, a fresh active member invite produced:

Failed to view invite: failed to view space invite:
rpc error: code = DeadlineExceeded desc = stream terminated by RST_STREAM with error code: CANCEL

A/B test with the same account and invite:

  • upstream QUIC account selection: failed after 5.059s
  • Yamux/TCP account selection: invite viewed and join request sent successfully in 0.267s
  • after owner approval, the joined space and editor membership were readable through the REST API

This also matches the existing escape-hatch comment in anytype-heart: Yamux is intended for clients that encounter QUIC problems.

Verification

  • new regression test observed failing before implementation
  • sabotage run confirmed the test fails when PreferYamuxTransport is false
  • make test
  • go vet ./...
  • separate binary build
  • live end-to-end invite join against the public Anytype Network
  • independent pre-commit review: no security or logic findings

Fixes #36

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.

Cannot join a space with invite link via CLI; Cannot re-login

1 participant