cargo doc with warnings denied failed on efacb41 and on main alike, with eight
errors (six with the media features on): the cache's module documentation
linked to private items, and the crate documentation to modules and a type
that exist only with the media features. They are plain code spans now, so
that RUSTDOCFLAGS='-D warnings' cargo doc --no-deps -p voelin-core passes,
with and without --features media-desktop.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine's own query connections used the query crate's default line
options, which keep a client-side limit of nine commands in three seconds. The
live tests passed voelin_query::Connect with that limit off, because the
development servers allowlist their clients, and with the limit on the
channel relay of ts3_engine and ts6_engine did not connect within the two
seconds the test waits before it speaks. QueryLogin gets the one bit the
tests had: allowlisted, off for the application (which cannot know), on for
the tests, and the UI's login says false, as it always effectively did.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voice.rs handled Download, Upload and CancelTransfer with a copying task per
transfer, a progress cadence, the picture limits and a cancel table; none of
it is reachable since SessionLink copies the bytes itself over the
connections OpenRead and OpenWrite open (the picture limits and the
negotiation deadline live there, tested in link/tests.rs). The connection
keeps the two connection jobs and refuses the three commands in words;
files::upload and its close wait go with it (SessionLink uses upload_to, and
the TCP test of the upload runs through that), and the test of the picture
download time moves to the cache, which owns the function.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
VoiceOptions is a struct of its own, no longer an alias of the TeamSpeak
link's options: identity is an IdentityBlob and client_version a spec for
ts::versions::resolve, which rides the address as the link parameter
client_version and which the TeamSpeak connector resolves (a spec it refuses
fails the connect in words). SessionLink builds the connect parameters
(link/connect.rs: the bookmark's link, the hello, the credential of the
identity's kind, now also a Voelin key's signer) and session.rs holds it
directly: the ServerLink trait between them was redundant. The trait lives
on in the TeamSpeak module (ts/ts_link.rs, with the TeamSpeak-typed
ConnectOptions) for TsLink and the in-memory link of the tests.
ServerLink, TsLink, LinkCtx, LinkCmd, LinkEvent and Remote are crate-private,
Engine::start_with_link is gone, and the three tests that needed the inner
link (tests/link_fake.rs) are unit tests of link/ now. The rg over the crate
for tsclientlib, tsproto and voelin_query, outside ts/ and the three files
that use them privately (gateway.rs, query.rs, stream.rs), is empty. The UI
and voelinctl get compile fixes: the identity blob and the spec string.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Command::ObserveGateway.identity is a Box<IdentityBlob> (a TeamSpeak
identity as the key store keeps it; voelin_core::ts::identity::to_blob and
from_blob convert) and gateway::connect takes the blob too; gateway.rs reads
it itself, and one it cannot read ends the observation with its reason
instead of reaching the gateway. Command::ObserveQuery.connect is a
QueryLogin (transport, address, user, secret, server port and id) that
query.rs turns into voelin_query::Connect with the query crate's own line
options, which is what the UI always passed. voelin_core re-exports
IdentityBlob; voelin-identity is a dependency of voelin-core now, so
Cargo.lock gains that edge (the crate was in the graph already, and no
third-party package is added: THIRD_PARTY_NOTICES.md is unchanged).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Command::SetMytsIdentity and SetMytsData are gone (nothing sent them): the
account's proof and what servers are shown of it belong to TeamSpeak, and the
engine only forwarded two watch channels through every session to the link's
context. TsConnector is public now, with set_myts_identity and set_myts_data;
it owns the senders (shared by its clones through its TsLink) and each
connection holds them for as long as it runs, so a session outlives its
connector as it outlived the engine's loop. Backends::register_teamspeak
takes a connector whose clone the application keeps, and Backends::default
registers one of its own. LinkCtx, LocalCtx, SessionHandle and Session lose
the watches, and the test of the standalone context's senders is a test of
the account's: a connection keeps it open.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ts_link.rs, voice.rs, book.rs, ts_session/, versions.rs and identity.rs move
under crates/voelin-core/src/ts (git mv, so git log --follow keeps their
history). voelin_core::versions and voelin_core::identity are
voelin_core::ts::versions and voelin_core::ts::identity now; the UI and
voelinctl follow with the new paths. Nothing else changes: the module
declarations, the use paths and the path of Versions.csv are the only
edits to the moved files.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
presence_follows_the_host_until_it_ends showed the clients' names and
channels but not what the engine keys contacts and private history by: the
unique id of each client (the base32 of a Voelin user's 32 bytes) and the
server's unique id in ServerDetails.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The tail of a_reconnect_finds_the_state_the_first_session_left (a connect
while connected replaces the session) and the end of
commands_reach_the_host_as_requests (a host without streams is not asked
for one) are tests of their own now, so that each name says what is
checked.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cases_that_do_not_apply_fail zips the suite's cases with EXPECTED, so a case
the protocol repository adds would have been left out without a word. It
calls the_suite_is_known first, as the conformance subset does.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Section 16 of the design said that after a reconnect to a v1 host the
display is right and only the store is wrong, because Dedup drops the copy
of the event. That holds only for the messages within 4 s of the newest one
seen: Dedup evicts what is older than that relative to the incoming
message, so a replayed older message is shown again as a live Event::Chat
and stored again. Corrected in 4.4, 16.1, 16.4 and F3 (16.5), with the two
ignored tests that pin the display and the store, and in P17 and H10: only
the CHAT-cursor resume cures both, and only within an epoch.
Also: the introduction of section 16 names the two production changes (F1,
F2), not three; the move-back test now sends two messages 10 s apart and
the record says what the single-message version did not prove; the live
module raises the anti-flood limits itself and the record says so and what
ran (a fresh stack before and after, in series and in parallel, and the
smoke script before and after on freshly reset stacks); the toolchains of
the review round, the nightly that replaced 2026-10-19, and the per-commit
checks.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On a freshly started stack the live module failed 8 tests of 12 with
ConnectFailedBanned: a server with its default anti-flood limits bans the
address that connects as often as these tests do, after three or four
connections. scripts/it-smoke.sh sets the limits when it prepares its admin
identity, so the module passed only after the smoke script had run.
The module now raises virtualserver_antiflood_points_needed_ip_block and
..._command_block itself before its first connection, once per server and
run, through the ServerQuery admin login that refused_moves uses, and clears
the bans of an earlier run with bandelall (banclear is not a command of
either server). The command of the module header works on a fresh stack.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
a_reconnect_finds_the_state_the_first_session_left passed for a narrower
reason than its comment said: the one message seen before the disconnect is
the newest one, so Dedup (which holds the messages up to 4 s older than the
last one it was asked about) still held it and dropped the host's replay.
With two messages more than 4 s apart the replay of the older one reaches the
user as a live Event::Chat, and no test saw it: the ignored test of the
stored rows used the same one-message setup.
- The ignored replay test is now two, over one scenario: two messages 10 s
apart are seen, the session ends, a third is said while we are away, a
second session connects. One asserts that only "while away" is shown (it
sees ["first", "while away"]), the other that the history has each message
once (it sees every row twice). The comments of the passing reconnect test
say what it proves: a message inside Dedup's window is not shown again.
- the_chat_of_a_channel_is_resubscribed_when_we_move_back passed without the
`seen` check of SessionLink for the same reason (the message seen before is
the newest one Dedup holds). It now sees two messages 10 s apart before it
moves away and fails with the check disabled ("before" comes again).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Section 16: what the tests on the fake host and the TeamSpeak sessions
cover, the verdict of every case of the conformance suite on both
development servers with the reason it was observed to fail or be skipped,
where the code differs from 9.2 and 9.3 (the CHAT re-subscription is a full
sync, a reconnect resumes nothing, the conformance and live tests are
in-crate), the three things the tests found (our own voice played back, a
session made outside an engine ending by itself, a v1 host's replay stored
twice after a reconnect, the last one open), the protocol and second-half
follow-ups, the deliberately broken translation, and what ran.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ts_session/live_tests.rs (VOELIN_LIVE=1, the development servers) holds the
TeamSpeak Session tests of docs/session-seam.md section 9.3, made through
TsConnector's plain Connector interface:
- the conformance suite of the protocol repository, every case listed with
what a TeamSpeak session does with it: two pass (welcome_matches_features,
close_ends_the_session), four are skipped for a feature the session lacks
(chat.edit, chat chat.history, idempotency), and the rest do not apply;
a case the suite gains fails until it is listed;
- what the suite cannot reach: an own-channel message answered and pushed to
the other session and back, the PASSWORD and FULL refusals of a move, a
poke between two sessions, voice RTP from one slot to the other session's
media sink (marker, order, an empty payload at the end), and a channel file
written with write_file and read back from an offset with read_file.
Two tests, ignored by default, run the cases that do not apply and watch each
fail; the reason in the table is what the case did when it was run.
scripts/it-smoke.sh runs the module before its engine stage.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A TeamSpeak session made through the plain Connector interface (the way the
conformance suite and any client of the seam that is no engine make one) got
a LocalCtx::standalone() whose only job is to hold the senders of the
myTeamSpeak watches. connect_link dropped that context when it returned, the
senders went with it, and the TeamSpeak link ends its connection with
"account source closed" when a watch has no sender: the session died by
itself a moment after it was handed out. The engine's own path was never
affected, its watches belong to the engine.
The context now moves into the driver task and lives as long as the session.
Found by running the link conformance suite against the development servers:
close_ends_the_session passed vacuously and the_backend_can_end_the_session
saw the session end with that text. The new test fails without this change
("the identity watch lost its sender").
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A session that loops our voice back (the fake host of the protocol
repository does, so that a test sees media move) made the engine hand our
own packets to the audio thread and show us as talking: the slot map holds
every participant of the server, ourselves included. The engine never plays
itself from the network (a sidetone is local), so on_media returns for the
packets of the slot the host gave us. TeamSpeak never sends a client its own
voice, so nothing changes for the servers the engine reaches today.
Found by the fake-host tests; the test failed before this change with
[1, 50] as the talkers heard (us, then alice).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
link/fake_tests.rs holds the tests that need what is private to the crate:
- our voice leaves as RTP on the slot the host gave us (sequence, marker on
the first packet of a spurt, timestamps that advance by the previous
packet's duration, an end of spurt that is an empty payload sent once, the
SSRC that is the flow), read from FakeHandle::sent_media;
- the voice of other slots reaches the audio thread: the talker of the slot,
a whisper sub-flow, stereo Opus as music, the end of a spurt, and what is
no voice of a known slot (an unknown slot, probes, feedback) dropped;
- the link conformance suite of the protocol repository, 17 cases, run
against the session Backends::connect hands over: all pass, none skipped.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tests/session_fake.rs runs the engine through Engine::start_with_backends
with a FakeConnector registered, so a session of the engine is a
voelin_proto::link::Session that no TeamSpeak code made. The host is a
FakeHost filled through put; FakeHandle plays the backend of one session.
The scenarios of link_fake.rs move over (presence until the host ends the
session, commands as v1 requests, a sent message and its echo, the dedup of
a message that comes twice, history across the session), and the ones the
v1 path needs are new: how a session ends and the text the user reads, what
a host refuses and the words it says it in, the chat of a channel
subscribed again when we move back (in full: there is no cursor), closed
scopes, a HostUpdate that changes what the engine asks for, offline messages
as Mail, files through read_file and write_file with a resumed upload, file
operations as FileEntry puts and deletes, the media of a session routed to
the talker of its slot, a reconnect that finds the state the first session
left, and a connect that fails.
link_fake.rs keeps the three tests that need the inner link: the stream
commands (they travel on a port a Session has no part in), the order in
which a reconnect shuts the streams and the old connection down, and a link
that keeps talking after its connection was replaced.
One test is ignored with its reason: a v1 host sends the window of a chat
scope again after a reconnect, and the engine stores the copy (the history
merges copies of different sources only). TeamSpeak never replays, so no
host the engine reaches today meets it; docs/session-seam.md will say so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Section 15 lists the seven findings with their fix and test, what the fixes
leave as it was (the move shortcut and the window it keeps), and what ran:
format, clippy, tests and the workspace check on 1.94 and nightly, and the
smoke and live runs against fresh dev servers. The other sections say what
changed: the media and push channels have no order between them (4.2 step 9,
13), the second changed test (5.4), the move rule and the transfer deadline
(3.1), the nameless sender (5.2), the address rules (4.2) and the narrowed
features (4.7).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The last wait of the test asked for file lists until one was refused locally and
took the first refusal on the bus. The asks made before the HostUpdate reached
SessionLink are refused too while the server's list stands, and their events can
still be unread on the bus, so the wait could end before the update had been
applied. It accepts a refusal of a request made after the update only.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine hands the TeamSpeak side its bookmark as a ts3server:// link and
reads the options back from it. A link cannot say all an address can: a port
that is no u16 (host:99999) was dropped silently and the connection went to the
default port; a bare host with a '?' in it ended there and hid the channel
behind the next '?' that to_url writes; a '/' or '#' ended the host and a '%'
was decoded. The TeamSpeak library had refused every one of those when it
resolved the address.
connect_params returns a Result now. A bookmark whose port is not a number from
1 to 65535 (in host:port and [v6]:port), or whose host is empty, holds a '?',
'#', '/' or '%', white space or a control character, or has an unclosed '[',
fails the connect with a reason that shows the address without its query. The
other normalisations of the round trip (blanks cut, [v6] without a port read
as v6, an empty option is none, the model's rules for an address that is a
link) are listed in docs/session-seam.md.
Tests: the refused and the accepted addresses (the channel survives the round
trip of each accepted one), the empty options, and a connect with a bad port
that ends in Disconnected with the reason before any link is asked.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/session-seam.md 4.7 says features() is narrowed by Server.features, and
Features::narrowed exists for it, but SessionLink took Session::features() as
it was and a HostUpdate replaced the set wholesale. Against a host whose
server offers fewer features, Capabilities and the local Features::require
refusals were too generous.
SessionLink keeps the host's set and the set of the server (the host's,
narrowed by the Server entity's list; an empty list keeps all of them), and
recomputes the second when the SERVER scope changes or syncs and after a
HostUpdate. Capabilities, the local refusals and the presence fix-ups use it.
Test (over the protocol repository's fake host): a server that lists no files
leaves file transfer out of the capabilities and refuses a file list without
asking the host; an empty list brings it back; a HostUpdate that drops files
takes it away again. It fails on the code before this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Driver::sender made a synthetic user id for such a sender ("client:N") but put
no User entity into LIVE, so SessionLink::signal found no User and the nick of
the poke was empty. The earlier fix covered senders that have a unique id only.
The driver now puts a bare User with the name the link gave and no uid into
LIVE, keyed by the synthetic client id, before it pushes the signal (so it
shows in no presence, and the poke's from_uid stays none). A client id is given
again to whoever connects next, so the user is replaced when the same client
id comes back with another name; a sender with an empty name gets none.
Test: a poke from client 77 with no unique id is named, and named again with
the new name when the client id comes back as somebody else. It fails on the
code before this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LinkSession gave the reply to an OpenRead or OpenWrite 30 seconds, for every
transfer. Only pictures had a deadline before the seam (IMAGE_NEGOTIATION,
which SessionLink still applies to them); a file the user asked for waited for
a slow server as long as it took. With the extra deadline such a transfer
failed with "timed out", and the inner job stayed in voice.rs until the server
opened it, found nobody to hand the connection to, and dropped it.
The driver waits without a deadline now. A caller that drops the call (the
picture's deadline, a cancel) is noticed through the closed reply channel, and
the driver's wait ends, dropping the receiver that the inner job holds.
Test (virtual time): a read and a write wait 120 seconds for the server and
then open; a read that is dropped closes the reply of the inner job. It fails
on the code before this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Driver::join answered a JoinVoice with the own voice state and sent no Move
whenever the snapshot showed us in the requested channel. A move to another
channel that the link had not answered yet left the snapshot where it was, so
a second request back into the old channel was dropped without an error and
the user ended up in the channel of the first move. The baseline forwarded
every Move to the link (which swallows "already in that channel" itself).
A move into the channel the snapshots show is answered at once only while no
move of ours is pending; otherwise it goes to the link in order. The link says
nothing to a move into the channel it is in, so a refusal of the first move
now also answers the pending moves into the channel the snapshots show,
instead of leaving the second to its ten seconds.
Tests: a move made while another is on its way reaches the link and both are
answered by their snapshots (and a move into the channel we are in is still
answered without the link when none is pending); a move back after a refused
move is answered at once. Both fail on the code before this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nightly rustfmt wanted `.count()` and `== 3` on separate lines in the wait for
the three subscriptions of a_session_that_ends_during_the_connect_syncs_says_why,
1.94 (which CI pins) did not. The count is a local now, and the comparison a
line of its own. Nightly rustfmt differs from the baseline's six diffs only
(history.rs, encoder.rs, discovery.rs, chat.rs, studio.rs, engine.rs) after it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
presence_follows_the_link_until_it_disconnects played a voice packet, a poke
and an error in one go and waited for Talking, the poke and the error in that
order. Talking comes from the media queue and the poke and the error from the
push channel, and the loop of SessionLink cannot order two channels: when the
push was polled first the engine reported Poke, Error, Talking, the wait for
Talking skipped the first two and the next wait timed out. It failed in 22 of
300 isolated runs (the baseline never did).
The test now plays the voice packet, waits for Talking, and only then plays the
poke and the error. The design records the change (it is a change of the order
of the steps, not of an assertion).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A sync is sent whole or not at all, so that a scope is never left half sent;
that needs the channel to have room for every frame of it. A scope with more
frames than the channel holds when it is empty (more than 16 frames of 256
entities on the smallest channel) could never be sent and stayed lagged for
ever. The chunks of such a sync are now as big as the channel needs, so every
sync fits an empty channel. A test syncs a SERVER scope of 5,000 channels over
the smallest channel.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sections 3, 4.1 to 4.4 and 13 say what changed (notify, the talking hint, the
address text, the close reason of a connect, the chat scope limit and the SyncEnd
of a CHAT scope, the seat across tsclientlib's reconnect), the risk table has the
lagging consumer, and section 14 lists the eight findings with their fix and
test. Follow-ups P13 (a speaking hint for the own channel) and P14 (what a
backend that reconnects inside a session tells its consumer) are for the
protocol repository.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each test fails on the code before the two previous commits (checked against
2d71903 with these tests applied: eleven failures):
- the connection across TeamSpeak's own reconnect: the engine follows a new
client id (OwnChannel, the chat of the channel, what we say, the voice slot,
the flags), and stays the client it was while a ghost lingers;
- private messages from 24 peers all arrive;
- a talker the link hears but does not forward as Opus is shown as talking;
- notify refuses what has a stream of its own and runs the rest;
- a session that ends while the connect waits for the syncs says why (a fake
host that answers the subscriptions and is killed with a reason);
- the text of an address nobody serves keeps the channel password out;
- a consumer that does not read the pushes does not stall the voice, and gets
the scope again whole when it reads.
The rig can connect as a TeamSpeak 3 server, which is what makes the engine
follow its seat.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The review found four defects in SessionLink and the link module, fixed here:
- A message of a CHAT scope's first full sync could be lost. The replica stages
a full sync until its SyncEnd, so a message of a Change of the sync cannot be
read when the Change is applied, and SyncBegin, Change and SyncEnd may come
in different batches; but (channel, id) was marked as reported before the
replica was asked for the message. A message is marked as reported only when
it was shown now, and at the SyncEnd of a CHAT scope the messages of that
channel not shown yet are (two deterministic unit tests, one with SyncEnd in
a later batch and one for a message that comes before its scope).
- When the push channel ended during the connect syncs, the real close reason
of the session was thrown away and the engine showed a silent disconnect. It
now asks closed() (and closes a session that has not ended: a refusal with no
words).
- The CHAT scopes were limited to 16 whatever the host said. The limit is now
Welcome.limits.max_chat_subscriptions (0 or none: the v1.0 default of 16); the
server chat and our channel come first, then the private conversations, the
newest (highest id) first.
- The own participant was pinned to the one of the connect. Behind a TeamSpeak
host the seat now follows our user: it stays while the participant is ours
and moves to the participant that carries our user id when the seat is gone
(tsclientlib's reconnect makes us another client) or no longer carries it (a
ghost of the old connection); a seat whose user id changed by itself is
followed. OwnChannel, the voice flags, the uplink slot and the chat scope of
our channel follow.
A Signal{speaking} of the host is believed (TalkTracker::hint) until the host
says it is over: that is how a talker whose packets are no Opus is shown as
talking. The documentation of LinkEvent::Talking, OwnChannel and
Connected.own_client says what the adapter derives and what it does not.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The task behind LinkSession (ts_session/driver.rs) is where the review found
five defects, all fixed here:
- It awaited pushes.send() on the bounded push channel, so a consumer that
lagged stalled the voice media and the commands that share the task. It now
never waits: a push that finds the channel full is dropped, its scope is
marked as lagged and sent again whole (SyncBegin .. SyncEnd, all frames or
none) once the channel has room, as ConnectParams.push_capacity documents; a
signal has no scope and is dropped. The functions that only awaited the push
are plain functions now.
- The own client id was the one of the connect for the whole connection, so
after tsclientlib's own reconnect (a new client id, the same unique id) the
own channel, the poke target, the own VoiceState, the author of our messages
and the slot send_media checks were all the old client's. The task now follows
the snapshots: it stays the client it was while that client is there, and
else is the newest client of its unique id; the own client keeps the database
id when an identity is there twice (entities::build), so the user stays the
same; LinkSession.send_media reads the slot from a shared atomic.
- CHAT subscriptions were limited to 16 in process, so private messages from
the 15th peer of a connection were never delivered. The limit is 65,536
(Welcome.limits says so, and the total of subscriptions follows).
- notify accepted List, FileRead and FileWrite and ignored them. Only an op of
the control stream goes without an answer now (a misplaced op is a Protocol
error, as on FakeSession); our mute flags go to the link, and any other op is
run as the request it is. A notify on a session that has closed is refused
also while the task is still on its way out.
- The link's own Talking was dropped, so a talker whose packets TsLink does not
forward as Opus (Speex, CELT) was no longer shown as talking. It goes on as a
Signal{speaking} hint.
The assertion of the Welcome test on the limit follows. The engine side of the
reconnect, the limit and the hint is the next commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Backends::connect handed an address that no plain connector serves to
Connectors::connect, whose error names the whole address: "no connector for
ts3server://host?port=9987&channelpassword=...". The text is shown to the user
and may be logged, and a TeamSpeak link carries the channel password (and a
voelin:// link a host pin) in its query and fragment.
The registry now looks the connector up itself and cuts the address at ? and #
in the text (without_query, which the "not a TeamSpeak server address" error of
the TeamSpeak side uses too, so that one also loses a pin).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A nightly clippy (1.101) flags two places of the session seam that the pinned
1.94 does not: the sibling placement of ts_session/entities.rs is a while let
loop, and the generated channel tree of the presence round trip in book.rs
counts with its loop variable. Neither changes behaviour (the same random
stream, the same ids).
The remaining nightly findings are in code this branch does not touch:
audio.rs and media.rs of voelin-core (chunks_exact), voice.rs (a large Err
variant), voelin-audio, voelin-media and voelin-ui.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first run of the adapter's smoke failed the stream directory scenario (the
fix is the previous commit); the second ran every per-server scenario of
scripts/it-smoke.sh on TeamSpeak 3 and 6 to the end, and the serial live tests
of voelin-core passed again (live 6, media_live 2, stream_live 3,
voice_features 3). The script's last stage fails as it does on the baseline
(ts6_banners, when the live tests run in parallel).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first smoke run of the adapter failed its stream directory scenario (the
late viewer's WatchStream was refused with "not connected with voice"), and an
alternating probe of that scenario with the baseline binary and this one on the
TeamSpeak 6 dev server failed 3 of 6 for this branch and none of the baseline's
four runs the server's clone limit left alone.
The cause is an ordering the adapter lost. The TeamSpeak 6 stream task puts
Event::StreamsChanged on the engine's bus itself; behind a session the engine
hears of the connection only after the connect sequence (several requests
through the driver), while the stream task lists the server's streams as soon as
the server tells it, so a client that acts on the first list asked for a watch
before the engine knew it had voice.
The ts_session driver now holds the bus events of a link with streams that are
no answer to a request until the engine's first stream command (session.rs
sends one in its handling of Connected right after emitting the state), or for
three seconds. Three unit tests pin the hold, its end, and that a link without
streams is not held. The same probe passes 8 of 8; docs/session-seam.md section
13 records it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- A unit test frames 5,000 Opus packets each way through SessionLink, the
TeamSpeak session and the recording link and prints the cost per packet
(about 7 microseconds to the host, 10 from it in a debug build; the test
bounds each direction at 500 microseconds). docs/session-seam.md section 13
records the figures, which were the one thing slice 1 had not measured.
- tests/session_backends.rs: the engine over voelin-proto's FakeConnector
through Engine::start_with_backends (connect, server name and backend,
channels, a move, disconnect), and the registry's error text for an address
no connector serves.
- The error of a TeamSpeak connector given an address that is not a TeamSpeak
one no longer prints the query, where a channel password rides.
- The note on the two library tests that need the name localhost to resolve to
127.0.0.1 says so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- docs/session-seam.md: the status line, and section 13 with how the code
differs from the design, a follow-up for the protocol repository (P12), and
what ran against the baseline.
- docs/architecture.md and the crate docs describe the engine on the Session.
- A departed client's talk state is dropped before the new snapshot replaces
the table it is looked up in.
- The backend of a host that names none is its product and version.
- A unit test drives the engine over the protocol repository's FakeSession
through the registry: connect, presence, a move, chat in the channel,
disconnect.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine's voice source is now a voelin_proto::link::Session obtained from a
registry of connectors (docs/session-seam.md, slice 1):
- link::Backends keeps the plain connectors of voelin_proto::link::Connectors
and the in-process ones that also hand the engine a port for TeamSpeak 6
streams; the scheme of the address picks the connector, an address without
one is a TeamSpeak bookmark.
- link::SessionLink is the engine's ServerLink. session.rs is unchanged and
still speaks LinkCmd and LinkEvent; SessionLink runs the connect sequence
(List the server, subscribe HOME, SERVER and LIVE, take the seat), keeps a
voelin_model::replica::Replica, projects it into the client's older model
(link/project.rs, the fix-ups F1 to F10), frames voice as RTP and derives
who talks from the media (link/media.rs), and turns every command into the
Session call of its row. Transfers copy through read_file and write_file.
- ts_session makes a TeamSpeak connection a Session: LinkSession over any
ServerLink translates the link's commands, events and presence snapshots to
v1 entities, pushes, answers and RTP; TsConnector makes them for
ts3server:// and teamspeak:// addresses with TsLink inside, and
LinkConnector for the link of Engine::start_with_link.
- voice.rs opens the transfer connection itself for the new OpenRead and
OpenWrite commands; files::download and upload are generic over the stream.
- Engine::start_with_backends is new; start_with and start_with_link go
through the registry.
tests/link_fake.rs runs through both adapters; its fixtures are normalised as
the design says (an order chain, database ids, talking from media, the server
named, channel chat for the channel we are in), and the request id the link
sees is the session's own. New unit tests cover every row of the mapping with a
recording link, the TeamSpeak session on its own, media framing both ways, the
talk tracker, the close table, the error texts, the backend and capability
tables, the connect parameters, and the presence round trip on book fixtures
and generated presences.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voelin-identity, voelin-proto and voelin-model now come from one revision of
the protocol repository (main c8e0e5a: the session seam voelin_proto::link
with its account types, and the replica in voelin-model). The client's own
crates/voelin-model is removed: the protocol's crate is a superset, identical
in presence, server, chat and percent, and differs in badges.rs, link.rs and
tree.rs only by a doc comment and two equivalent expressions, and adds the
perms and replica modules. Every crate that used it takes
voelin-model.workspace = true. voelin-core depends on voelin-proto (and, in
its dev-dependencies, on the test-util fakes), which the engine will consume
in the next commits.
Manifests, the lock file and docs only: no source change. THIRD_PARTY_NOTICES.md
is unchanged (scripts/notices.sh --check: up to date).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first half of plan step 7: every LinkCmd, LinkEvent and StreamCmd
variant mapped to the Session API and back, with the decision for what v1
cannot carry yet (streams on a local port, TeamSpeak-only connect options
on the ts3server:// link, presence fix-ups F1-F10 through Foreign);
SessionLink over a Backends registry on the engine side, LinkSession over
TsLink on the TeamSpeak side; connect, close, error texts, Features and
LinkStats; RTP framing of voice against voelin-audio's packets; credentials
with the account left as a hook; files through read_file and write_file;
the FakeLink tests through the adapter, then on FakeSession and FakeHost,
and which conformance cases the TeamSpeak session can run; three slices
with acceptance, and the follow-ups for the protocol repository and for
the move to VoelinGateWay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sign-out finishes when a row's binding columns cannot be read; deleted
keys are overwritten (secure_delete) and the log is truncated once per
sign-out with a short wait; the device key refuses a synced binding; the
unbind step keeps non-text data byte for byte; rustls and yoke-derive
updated, wasapi ignored until 2026-12-20. Two Opus gates accepted; the
last left two minors (wording of where deleted bytes may stay; a test
that counts the checkpoint) as follow-ups.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
KeyStore::get reads a data column that is a BLOB, or TEXT of bytes that are no
UTF-8, as text with the odd bytes replaced. The sign-out's unbind step puts that
text back with the binding removed; REBIND (data = ?3) matches nothing for such
a row, so put fell through to the full write: the lossy string replaced the
original bytes (invalid UTF-8 became U+FFFD, a BLOB became TEXT), and for a
TeamSpeak row the replaced text is no identity, so check_teamspeak refused it
and the sign-out could never finish for that row.
- put() now tries a second statement when REBIND changed nothing:
rebind_stored_bytes reads the stored data raw and, if it reads (lossy_text) as
exactly the blob's JSON, updates only the four binding columns by (kind, uid)
(REBIND_BYTES) and returns without check_teamspeak, so the original bytes are
kept and the TeamSpeak case unsticks. Any other JSON is a new identity for the
uid, checked and stored as before.
- The doc sentences at the top of keystore.rs (what a binding-only put and a
non-text data column mean) and docs/architecture.md are narrowed to what holds:
the bytes are kept for the text get returned, any other text replaces them.
Tests: the gate's probe (a bound voelin row with data x'7b2276223aff317d', two
future-kind rows, one a BLOB and one TEXT of no UTF-8, and two TeamSpeak BLOB
rows, one of a good identity and one of garbage): sign_out(Auto) and
sign_out(Forget) are Ok and every data value is byte-identical afterwards; a put
of what get read changes the binding and keeps the bytes; a put of other data is
checked and replaces them. The three tests fail on the previous code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Store::truncate_wal ran PRAGMA wal_checkpoint(TRUNCATE) with the connection's
busy timeout of five seconds. A checkpoint that truncates holds the writer lock
of the log while it waits for readers, so a reader that kept a snapshot made
every removed row cost the whole timeout with the store's mutex held, and other
writers failed with "database is locked" meanwhile. KeyStore::sign_out removes
up to four rows (the synced copies, the device key, the record) and ran the
checkpoint after each: 20 s and failing writers in the gate's probe.
- truncate_wal now sets a busy timeout of 150 ms (CHECKPOINT_WAIT) around the
pragma and restores the timeout the connection had (read back with PRAGMA
busy_timeout, so a value set by a caller survives) whatever the checkpoint
returned. A blocked checkpoint still leaves the delete standing and warns.
- SqliteKeyStore overrides sign_out: the trait's own steps run on a private
SignOutPass whose remove deletes the row and notes it, and the sign-out
truncates the log once after its last step (also when a step failed, the
removals before it have happened). KeyStore::remove on its own still
truncates after the row it removed.
- The three sentences that said the bytes "stay in the log until the next
checkpoint" (keystore.rs, Store::truncate_wal, docs/architecture.md) are
corrected: they go when a later checkpoint truncates the log, later writes
overwrite those frames, or the last connection closes and the log is deleted.
Tests: with a raw connection holding a read snapshot, a sign-out with four
removals returns in about 170 ms (it took 20 s) while a writer on another
connection with a one-second busy timeout writes throughout without an error
(it got "database is locked" nineteen times), and the next removal after the
reader is gone truncates the log again; a unit test shows a blocked
truncate_wal returns in under a second, leaves the log, and restores a
non-default busy timeout, and that the same call truncates once the reader is
gone. Both tests fail on the previous code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cargo deny check failed on the advisories of the base lock:
- rustls 0.23.45 (RUSTSEC-2026-0346 to 0349: Debug output of client session
values, buffered data after ECH rejection, unbounded brotli certificate
decompression, ServerHello downgrade): cargo update -p rustls --precise
0.23.46, which the advisories name as the fix.
- yoke-derive 0.8.3 was yanked: cargo update -p yoke-derive --precise 0.8.4.
- wasapi 0.24.0 (RUSTSEC-2026-0332, unsound WaveFormat::parse): the fix is
wasapi 0.25.0, a breaking release of a Windows-only dependency of
voelin-media, which the Linux CI can neither build nor test, so it is not a
semver update. voelin-media never calls WaveFormat::parse (it only builds
formats with WaveFormat::new). deny.toml ignores the advisory with that
reason and a date: remove by 2026-12-20, by upgrading wasapi on a Windows
machine. cargo-deny cannot enforce the date; the comment and the reason say it.
Cargo.lock changes only those two packages (cargo's re-resolution also moved
tempfile to getrandom 0.3.4; that is put back to 0.4.3 by hand so the diff is
the advisories' and nothing else; cargo metadata --locked accepts it).
THIRD_PARTY_NOTICES.md is regenerated (scripts/notices.sh, cargo-about 0.9.2)
for the two version numbers.
cargo deny --locked --workspace check: advisories, bans, licenses and sources
ok.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KeyStore::sign_out deletes every identity bound with synced = true in its
first step, before it reads the account record that says which Voelin key is
the device key and whether it predates the account. A device key stored with
synced = true was therefore deleted even where the record says to keep it.
Nothing in this crate stored such a key, but the store accepted it.
SqliteKeyStore::put now refuses, with an error that names the key and the
record and says why, a voelin blob with synced = true while an account record
names its uid as the device key, and also while an account record cannot be
read (it may name the key, and the sign-out would delete it on that guess).
The state is also reached from the other side, so a put of an account record
whose device key is already stored as a synced copy is refused as well. A
binding with synced = false is accepted: a sign-out unbinds it and then follows
the record. The check runs before the binding-only fast path, so a put of the
key's own data cannot rebind it as synced.
Documented in keystore.rs and docs/architecture.md. Tests cover the refusal
for records that keep and that delete the key (the error text, the row left
untouched, the sign-out still following the record), another key that may be
synced, no record or a record naming another key, a record put naming a synced
copy, and unreadable records; the three refusal tests fail without the check.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SQLite's secure_delete was off: a deleted row stayed in the free space of its
page, and the frame of the write-ahead log that held that page kept the key
until the log was reset. Every connection (Store::init) now sets
secure_delete = ON next to foreign_keys, and Store::delete_identity and
KeyStore::remove (how a sign-out deletes the device key, the synced copies and
the account record) run PRAGMA wal_checkpoint(TRUNCATE) after a row was
deleted, so the page with the overwritten row is copied into client.db and the
log is empty.
The truncate is best effort: the delete has happened and a sign-out must still
finish, so a checkpoint that another connection blocks, or that fails, only
logs a warning that the bytes stay in the log until the next checkpoint.
Keys deleted before this change stay in the free pages until a VACUUM; the
architecture notes say so.
Tests read client.db and client.db-wal as bytes: the PKCS#8 text of a Voelin
device key (sign-out with Auto, and with Forget), a synced TeamSpeak copy's key,
a TeamSpeak identity deleted by Store::delete_identity and a key removed
through KeyStore::remove are present before and in neither file after, another
key is still stored and the log is empty; and secure_delete reads 1 on every
connection. Each raw-file test fails with either measure taken out.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SqliteKeyStore::list() failed on the first row whose binding columns were
damaged outside this crate (synced = 2 on the account record, say), and
KeyStore::sign_out starts with list() through bound_to(): it never reached the
record, so it could never finish, and DeviceKeyChoice::Forget did not delete
the key it was given either. get() failed the same way where sign_out reads
the record and the device key.
A row whose binding columns cannot be read (refused by
AccountBinding::from_columns, or a value of the wrong type) is now listed and
read as unbound, with a tracing warning that names the row and the reason and
quotes no content. Unbound is the reading that never deletes on a guess: such
a row is not deleted as a synced copy, and a put of it writes four good
columns. A data column that is not text is read as text with the odd bytes
replaced, so a record that cannot be read is deleted by the trait's sign_out
instead of its read failing; a row whose kind or uid is not text cannot be
addressed and the list leaves it out with a warning. list() now fails only
when the database does.
Tests: the gate's probe (UPDATE identities SET synced = 2 WHERE kind =
'account', then sign_out with Auto and with Forget on a store with
bound_existing_key true and false), more damage to the record row, the device
key row and a synced copy, and the unreadable data and kind/uid cases; the
test that asserted the old precise errors of get() and list() now asserts the
unbound reading. The six new tests fail on the previous keystore.rs.
voelin-store gets the tracing dependency (already in the lock); Cargo.lock
changes, THIRD_PARTY_NOTICES.md is unchanged by it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voelin-identity from VoelinProtocol as a git dependency pinned by rev;
the identity migrations as schema versions 6 and 7 (kind column, account
binding columns); voelin_identity::KeyStore on the identities table with
bindings and the account sign-out rules; notices regenerated; the sibling
checkout recipe in docs/building.md. Opus gate accepted with three minors
(damaged binding columns block sign-out, secure_delete off, one commit red
on the notices job) left as follow-ups. Building now needs read access to
the private VoelinProtocol repository (docs/building.md, docs/ci.md).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>