Commit Graph
572 Commits
Author SHA1 Message Date
faumarayandClaude Sonnet 5.5 2c9c739732 Make an_unwritable_path_fails_at_once hold for root
The test started a recording at /nonexistent-root-dir/x/clip.webm and expected
an error. Recorder::start creates the missing parent directories, which a
regular user cannot do below / but root can: under the runner image (Gitea
run 1091, docker.gitea.com/runner-images:ubuntu-24.04, root) the call
succeeded, created /nonexistent-root-dir and left a file behind.

The test now builds its unwritable paths in a temporary directory from things
that fail for every user: a path below a regular file (ENOTDIR, so
create_dir_all fails) and a path that names an existing directory (EISDIR, so
File::create fails). The unknown-container name is checked in the same place
and also asserts that no file was created. Reproduced in the runner image as
root with the old test failing and the new one passing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 16:42:41 +03:00
faumarayandClaude Fable 5.1 c91a3b719d Merge phase5/media-codec-test: peer_config_follows_codecs on a machine without an H.264 encoder
CI / Linux checks (push) Failing after 25m38s
The first CI run that could fetch the private dependency failed on this test
under the runner image. It now states preferred_codec's contract on any
machine. Reproduced and shown green inside docker.gitea.com/runner-images:ubuntu-24.04.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-24 15:34:27 +03:00
faumarayandClaude Sonnet 5.5 6329e56780 Make peer_config_follows_codecs state what preferred_codec promises on any machine
The test compared preferred_codec(&all, Some(H264)).is_some() with whether an
H.264 encoder exists. preferred_codec falls back to another encodable codec
when the configured one cannot be encoded, so is_some() is true on every
machine with any encoder and the assertion held only where an H.264 encoder
exists. The first CI run that could fetch the private dependency (Gitea run
1089, runner image without an H.264 encoder) failed on it; a developer machine
with FFmpeg or a GPU passed.

The test now says the contract: a configured H.264 is the result when
all.encoder_codecs() has it, and otherwise the result equals the automatic
choice, preferred_codec(&all, None). The built-in codecs (no OpenH264) pin both
branches on every machine: VP9 configured gives VP9, H.264 configured gives
the automatic choice, VP8.

The H.264-in-software offer assertion assumed VP8 second after H.264
(offer_codecs(&all, H264)[..2]). A hardware AV1 or VP9 encoder ranks before
libvpx's VP8, so a machine with software H.264 and one of them fails it (the
dev machine does with the named av1_vaapi encoder and hardware off). It now
says H.264 leads exactly the codecs the VP8-led offer has.

Checked at 9714dc2 in docker.gitea.com/runner-images:ubuntu-24.04 with the
apt packages of .github/actions/system-deps and rustup 1.94: the test failed
at media.rs:3426 and passes now; the voelin-core lib tests there were 268
passed, 1 failed, 2 ignored before and are 269 passed, 0 failed, 2 ignored
after.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 15:06:54 +03:00
Aleksey Selihov 9714dc2226 Merge pull request 'CI and release builds read the private VoelinProtocol repository' (#1) from phase0/ci-private-dependency into main
CI / Linux checks (push) Failing after 22m41s
2026-10-24 11:46:50 +00:00
faumarayandClaude Fable 5.1 b8ba43f0c9 Check each OpenSSH tool on its own and stop only an agent this job started
CI / Linux checks (pull_request) Failing after 21m18s
command -v with two names returns 0 when one resolves, so the guards were
weaker than they read. The release workflow's final step killed whatever agent
SSH_AGENT_PID named; it now needs the marker the start step writes after it
succeeded. Two documentation lines re-wrapped (the review's three minors).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-24 14:24:19 +03:00
faumarayandClaude Fable 5.1 c60acf9de0 Merge phase4/session-seam: the engine on voelin_proto::link::Session (plan Phase 4 step 7, first half)
CI / Linux checks (push) Failing after 49s
Slices 1 to 3 of docs/session-seam.md plus the merge of main ad20979 and the
minors round: SessionLink and the Backends registry put the engine on
Arc<dyn Session>; the TeamSpeak implementation is a Session under
voelin_core::ts; ServerLink, TsLink, LinkCmd, LinkEvent, LinkCtx and Remote are
private; VoiceOptions, QueryLogin and IdentityBlob are the public API changes.
Sonnet review accepted each slice; the Opus gate accepted the branch with one
minor (the TeamSpeak connector's refusal of an unreadable identity puts the
serde_json error, and so the key text, into the message: a follow-up).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-24 13:56:17 +03:00
faumarayandClaude Sonnet 5.5 e5956e40e9 Set CARGO_NET_GIT_FETCH_WITH_CLI in the CI workflow's own env as well
The checks action exports it through GITHUB_ENV, which depends on the runner
handing a composite action's environment file on to the later steps of the
job. If a runner did not, Cargo would silently go back to its built-in git
client, which cannot use the deploy key's IdentityFile, and fail with a
confusing authentication error in the first cargo command. The workflow-level
env does not depend on that, so both are set; the access check step still
exercises the key, the host key and the ssh configuration through git.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:45:56 +03:00
faumarayandClaude Sonnet 5.5 6e774873bf Document how CI and the release builds read the private VoelinProtocol repository
docs/ci.md gets a "VoelinProtocol access" section: why every cargo command
needs the access (Cargo resolves the whole workspace, so the gateway image
needs it too), the deploy key and the repository secret
VOELIN_PROTOCOL_DEPLOY_KEY, what the checks action, the release workflow and
the Dockerfiles do with it, why Cargo is told to use the system git, the
committed host key line with its fingerprint and the two commands that
re-check it, the effect on fork pull requests, and what each failure message
means. The runner setup no longer says that a fresh checkout does not build
there. docs/building.md says that the Docker builds need an ssh-agent with a
key that can read VoelinProtocol (--ssh default) and summarises the CI setup;
the plain docker build commands in it and in docs/gateway-admin.md gain
--ssh default, without which they would now stop at the cargo step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:44:44 +03:00
faumarayandClaude Sonnet 5.5 b89116c0f4 Let the Docker builds fetch the private VoelinProtocol repository with an ssh-agent
Every cargo command in the images (linux, windows, android and the gateway
image) failed for the same reason as the CI job: Cargo resolves the whole
workspace, which includes the git dependency voelin-identity on the private
Voelin/VoelinProtocol repository, and the images had no SSH access to it. The
crates that depend on voelin-identity are voelin-store and, through it,
voelin-core, voelin-ui, voelin-ui-vm, voelin-android and voelinctl; the
gateway crate does not, but `cargo build -p voelin-gateway` fails without
access too (checked with an empty CARGO_HOME), so its Dockerfile needs the
same.

Each cargo RUN gets --mount=type=ssh,required=true: the build is handed the
caller's ssh-agent (docker build --ssh default), the key stays in the agent
and never reaches a layer or the build context, and a build without --ssh
fails at that step with "unset ssh forward key default". The build stage
copies the host key committed in .gitea/known_hosts to
/etc/ssh/ssh_known_hosts and sets CARGO_NET_GIT_FETCH_WITH_CLI=true, so that
Cargo uses the system git and ssh. The toolchain stages install git and
openssh-client where they were missing; the gateway Dockerfile gets the
syntax directive the others already have. scripts/docker-build.sh passes
--ssh default and stops early, with a message, when ssh-add -l shows no agent
or no key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:43:12 +03:00
faumarayandClaude Sonnet 5.5 437b508047 Start an ssh-agent with the VoelinProtocol deploy key in the release workflow
The Docker builds run cargo, which has to fetch the private VoelinProtocol
repository over SSH. After checkout the workflow now loads the deploy key
(secret VOELIN_PROTOCOL_DEPLOY_KEY) into a new ssh-agent through stdin, so
the key is never written to the runner's disk and never reaches an image
layer, and exports SSH_AUTH_SOCK and SSH_AGENT_PID for the later steps. The
agent is started with a nine hour key lifetime and stopped by a last step
that runs even after a failure, because the release runner is a persistent
host. The gateway image, which is built with a plain docker build and not
through scripts/docker-build.sh, gets --ssh default; the Dockerfiles use it
in the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:34:08 +03:00
faumarayandClaude Sonnet 5.5 8b6dcbf442 Give the Linux checks read access to the private VoelinProtocol repository
The workspace depends on voelin-identity from Voelin/VoelinProtocol over SSH,
and the job container had no key and no known_hosts, so the first cargo
command failed with "unknown SSH host key" (runs 1037 and 1050).

The checks action takes the private half of a read-only deploy key as the
input protocol-deploy-key (secrets are not visible inside a composite action,
so ci.yml passes ${{ secrets.VOELIN_PROTOCOL_DEPLOY_KEY }}). Its first step
fails at once, with a message that names the secret, when the input is empty
or not a private key; it writes the key to ~/.ssh/voelin_protocol (0600),
appends the host key line committed in .gitea/known_hosts, writes a Host
block for git.faumaray.com (User gitea, IdentityFile, IdentitiesOnly,
StrictHostKeyChecking yes) and sets CARGO_NET_GIT_FETCH_WITH_CLI=true and
GIT_SSH_COMMAND for the rest of the job: Cargo's built-in git client cannot
use an IdentityFile, the system git and ssh can. The key reaches the step
through the environment only, is never echoed, and only the public
fingerprint is printed. A second step, after the system packages, runs
git ls-remote against VoelinProtocol, so a wrong key or a changed host key
fails there and not minutes later inside a cargo command.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:34:08 +03:00
faumarayandClaude Sonnet 5.5 5afa5a9740 Commit the SSH host key of git.faumaray.com for the CI and release builds
Cargo reaches the private VoelinProtocol repository over SSH and, in a fresh
job container or image, has no known_hosts: every cargo command failed with
"unknown SSH host key" (runs 1037 and 1050). The server (Gitea's built-in SSH,
SSH-2.0-Go) offers an RSA host key only; the line is committed here, after
checking its fingerprint (SHA256:fugBYnqAnqmTLsGpafVgQF9gPQzJqps7uHvs48blg2A)
against ssh-keyscan and Cargo's own report, so that jobs trust the reviewed
key instead of fetching one while they run. The next commits use it in the
checks action, the release workflow and the Dockerfiles.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:28:02 +03:00
faumarayandClaude Fable 5.1 37f8fe9bc1 Say what the transfer commands did before f1df886: a notice and a hanging report, not a dropped connection
The review of the merge-and-minors round read ts/voice.rs: the Input::Cmd arm
sends a command's error as LinkEvent::Error and keeps the connection, so the
old anyhow::bail! never ended the TeamSpeak session. The 17.7 row said it did.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-24 12:57:30 +03:00
faumarayandClaude Sonnet 5.5 d5d85b3f3d Record the round after the review of slice 3 in the design of the session seam
17.7: the merge of main (ad20979), what it conflicted on and what it needed to
compile, the four minors of the review with their commits, and what ran on the
merged tree: fmt and clippy per commit, tests on both toolchains, the lib
suite ten times in a row, cargo doc, the acceptance of section 10 (including
the rustdoc JSON walk), the notices check, and the smoke script and the live
binaries before and after. The status line follows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:43:48 +03:00
faumarayandClaude Sonnet 5.5 f1df88690b Fail a transfer the TeamSpeak link is given, not its connection
ts::voice::Voice::command answered LinkCmd::Download, Upload and CancelTransfer
with anyhow::bail!, which ends the whole TeamSpeak connection: chat, voice,
presence and the stream task with it. SessionLink copies the bytes of a
transfer itself and never sends them, but a command that does arrive is that
transfer's failure, not the connection's. Download and Upload answer their
report with TransferState::Failed and the connection goes on; CancelTransfer
has no report and nothing to cancel, so it is logged at debug.

A unit test gives an unconnected Voice the three commands: each returns Ok, the
two reports see Failed, nothing is pending.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:00:57 +03:00
faumarayandClaude Sonnet 5.5 76a884a779 Correct the paths and statements slice 3 left stale
- docs/session-seam.md 4.1: the TsConnector owns the myTeamSpeak account since
  a451f02; it is not registered "with the engine's watches".
- docs/session-seam.md 16.1: the live tests are src/ts/ts_session/live_tests.rs.
- docs/session-seam.md section 10: the acceptance rg is given as it runs from
  the repository root (--glob '!**/ts/**'); from crates/voelin-core/src the
  first glob is '!ts/**'.
- ts/voice.rs module documentation: the type that runs it is ts_link::TsLink
  (crate::TsLink is gone).
- link/tests.rs: ts/ts_session/driver.rs.
- voelin-store (IdentityOrigin::Imported, a one-word path) and
  docs/research/ui-review.md: voelin_core::ts::identity, ts/voice.rs.
- docs/audio.md: LinkCmd::Audio and LinkEvent::Audio are in link/mod.rs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:00:17 +03:00
faumarayandClaude Sonnet 5.5 f0d20cc02f Document QueryLogin.transport
The one public field of QueryLogin without a doc comment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 10:58:50 +03:00
faumarayandClaude Sonnet 5.5 87926e9b59 Refuse a TeamSpeak identity that holds no JSON
link::connect::credential sent a TeamSpeak IdentityBlob with an empty json as
an empty Credential::Foreign blob, which is what the TeamSpeak connector reads
as "make an identity up" (identity: None). An identity that holds nothing is no
identity: it is refused with SessionError::Protocol, as the Voelin branch
refuses a key that cannot be read, before any connector is asked. The comment
of ts::identity::to_blob ("a blob with no JSON is refused when it is used")
holds on both paths now: the gateway's from_blob already refused it.

Two tests: connect_params refuses "" and white space and still sends none as
the empty blob; an engine on the fake host answers ConnectVoice with the reason
and the connector is never asked and makes no session.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 10:58:34 +03:00
faumarayandClaude Sonnet 5.5 e13d401b9c Merge main (ad20979) into phase4/session-seam
Main brings the merge of phase5/ui-vm: the toolkit-free crates/voelin-ui-vm
crate and the logic/bind split of crates/voelin-ui. Conflicts, and what each
resolution keeps:

- crates/voelin-ui/src/settings_pages.rs: main deleted it (it is
  settings_pages/{mod,bind}.rs and voelin-ui-vm's settings_pages/logic.rs
  now), this branch had changed its voelin_core::identity paths. Deleted; the
  paths are voelin_core::ts::identity:: in bind.rs and in logic.rs.
- crates/voelin-ui/src/identities.rs: the module comment names
  voelin_core::ts::identity::import_new (this branch) and settings_pages/
  (main).
- docs/architecture.md: the voelin-core row of this branch with the
  voelin-ui-vm and voelin-ui rows of main.

Not conflicts, but needed to compile: voelin-ui-vm named the in-tree
voelin-model by path, which this branch moved to the protocol repository
(workspace dependency), and imported voelin_core::identity::Found, which is
voelin_core::ts::identity::Found. Cargo.lock merged without a conflict and
resolves with --locked; THIRD_PARTY_NOTICES.md is up to date
(scripts/notices.sh --check).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 10:32:05 +03:00
faumarayandClaude Sonnet 5.5 6a08147f93 Record slice 3 in the design of the session seam
Section 17: what was done, commit by commit; where the code differs from the
text of section 10 (QueryLogin.allowlisted, the ServerLink trait moved rather
than made private, Backends::register_teamspeak, files::upload deleted, the
directory the acceptance rg runs from); the API changes that phase5/ui-vm-2
has to absorb; the acceptance list; what ran against the baseline (fmt,
clippy per commit, tests on both toolchains, cargo doc, notices, the smoke
script and the live tests before and after); the follow-ups. The status line,
4.1, 4.8, 9, 11.2 (H9's two edges into src/ts) and 16.1 follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 08:28:14 +03:00
faumarayandClaude Sonnet 5.5 d0092e467a Describe the session seam in the architecture document
"The server link" is "The session seam": the registry, SessionLink and the
vocabulary it shares with session.rs (crate-private now), what a session asks
for in VoiceOptions, the TeamSpeak module (voelin_core::ts), StreamPort, the
tests, and what is still TeamSpeak-shaped. The crate table row of voelin-core
follows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 07:27:49 +03:00
faumarayandClaude Sonnet 5.5 f63d459865 Keep the crate's documentation free of links that do not resolve
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>
2026-10-24 07:24:37 +03:00
faumarayandClaude Sonnet 5.5 ca34f84610 Let a query login say that its address is on the server's allowlist
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>
2026-10-24 07:23:46 +03:00
faumarayandClaude Sonnet 5.5 d70a3582f2 Take the transfers the engine does itself out of the TeamSpeak connection
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>
2026-10-24 07:07:52 +03:00
faumarayandClaude Sonnet 5.5 1edc52ce74 Make the engine's link vocabulary private and the options neutral
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>
2026-10-24 06:59:44 +03:00
faumarayandClaude Sonnet 5.5 be84874a09 Take the gateway's identity as a blob and the query login as the engine's own type
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>
2026-10-24 06:29:50 +03:00
faumarayandClaude Sonnet 5.5 a451f027f3 Give the myTeamSpeak account to the TeamSpeak connector, not to the engine
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>
2026-10-24 06:17:16 +03:00
faumarayandClaude Sonnet 5.5 029b8464b7 Move the TeamSpeak implementation into src/ts
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>
2026-10-24 06:08:10 +03:00
faumarayandClaude Sonnet 5.5 362e2b9da1 Assert the unique ids and the server's uid in the presence test
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>
2026-10-24 05:58:27 +03:00
faumarayandClaude Sonnet 5.5 b92379d01b Name the replaced session and the refused stream in tests of their own
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>
2026-10-24 05:56:28 +03:00
faumarayandClaude Sonnet 5.5 dd9140e1ea Check that the conformance suite is known before the cases that do not apply run
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>
2026-10-24 05:55:52 +03:00
faumarayandClaude Sonnet 5.5 efacb41894 Correct the record of a reconnect's replay and of the live module's prerequisite
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>
2026-10-24 04:54:16 +03:00
faumarayandClaude Sonnet 5.5 9283191e58 Raise the anti-flood limits of the development servers from the live module
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>
2026-10-24 04:13:13 +03:00
faumarayandClaude Sonnet 5.5 81d1de86e1 Show in the tests that a reconnect's replay is shown again, and what the passing ones prove
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>
2026-10-24 04:13:13 +03:00
faumarayandClaude Sonnet 5.5 2089f7ceba Record slice 2 in the design of the session seam
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>
2026-10-24 02:29:40 +03:00
faumarayandClaude Sonnet 5.5 226933fcdc Run the link conformance subset and the session scenarios on both TeamSpeak servers
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>
2026-10-24 02:02:39 +03:00
faumarayandClaude Sonnet 5.5 659798e5f9 Keep the account watches of a session made outside an engine open
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>
2026-10-24 02:02:07 +03:00
faumarayandClaude Sonnet 5.5 8d07502e1e Drop the media that comes back on our own slot
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>
2026-10-24 01:16:51 +03:00
faumarayandClaude Sonnet 5.5 82da64d8d3 Test the voice path and the conformance suite on the fake host
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>
2026-10-24 01:16:23 +03:00
faumarayandClaude Sonnet 5.5 f9d3f86896 Test the engine on the protocol repository's fake host
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>
2026-10-24 01:15:34 +03:00
faumarayandClaude Sonnet 5.5 bfc52e2688 Record the third review round in the design of the session seam
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>
2026-10-23 23:21:07 +03:00
faumarayandClaude Sonnet 5.5 5df011f08c Count only the refusals that come after the host's update in the features test
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>
2026-10-23 22:45:38 +03:00
faumarayandClaude Sonnet 5.5 2bee828022 Refuse the bookmark addresses that a ts3server:// link would change
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>
2026-10-23 22:30:03 +03:00
faumarayandClaude Sonnet 5.5 b8db1a85f0 Narrow the features of a session by the server's list
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>
2026-10-23 22:29:36 +03:00
faumarayandClaude Sonnet 5.5 6a2f00a636 Name a poke from a sender with no unique id who is not on the snapshot
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>
2026-10-23 22:29:08 +03:00
faumarayandClaude Sonnet 5.5 b0b1c82ddc Leave the deadline of a transfer's negotiation to the caller
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>
2026-10-23 22:28:32 +03:00
faumarayandClaude Sonnet 5.5 96dece42e6 Send a move to the link while another move of ours is on its way
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>
2026-10-23 22:28:07 +03:00
faumarayandClaude Sonnet 5.5 e06ed43b07 Bind the count in the subscription wait so both rustfmt versions format it alike
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>
2026-10-23 22:26:44 +03:00
faumarayandClaude Sonnet 5.5 6b2b792926 Do not let the fake-link presence test depend on the order of media and pushes
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>
2026-10-23 22:26:28 +03:00
faumarayandClaude Sonnet 5.5 b5ea0c3e95 Send a scope that is bigger than the push channel in bigger chunks
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>
2026-10-21 06:53:26 +03:00