The download test, which 61458df of this branch made wait for the part file,
exposed a defect of the link: a download reports Started just before it opens its part file, and the
open ran on tokio's blocking pool. Link::cancel() aborted the task and removed
the part file at once; when the cancel came between Started and the end of the
open, there was no file yet to remove, the abort cannot stop an open that is
already on the blocking pool, and the open then made an empty `<name>.part`
next to the target after the transfer had been reported Cancelled. The user
sees a leftover file, and a later download with `resume` continues from it.
files::receive now makes the directory and opens the part file with std::fs in
one step (the same kind of small blocking call as Sink::offset and the removal
in cancel, which already ran on the loop), so an abort, which takes effect at
an await, cannot come in the middle of it. Link::cancel() keeps the task's
JoinHandle instead of its AbortHandle, aborts the task, and removes the part
file and reports Cancelled from a task of its own after the aborted one has
stopped: the file the task made is then there to be found, or the task never
got to make one. Cancelled is therefore reported after the removal and after
the task has stopped, where it was reported before both.
The test goes back to the shape it had before 61458df: it cancels as soon as
the transfer is Started (and now fails loudly if it never was). That shape
failed in 10 of 100 runs of the voelin-core lib tests three at a time with 16
busy loops beside them on a 32-core machine, and in the final runs of the CI
test step in the runner image of this task (the second of three); with this
change it failed in none of 200 such runs. The link and files tests pass.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
stream::tests::layer_formats_reach_the_live_stream asserts that telling the
sink the same layer format twice asks for no second keyframe: it drains the
sink's keyframe requests, changes the format, waits for the request that
follows, tells the same format again and expects none within 200 ms. It failed
once ("nothing changed", stream.rs:1326) in the first of the three final runs of
the CI test step in the runner image of this task, with the machine busy with
another job.
Requests reach the sink from the stream going live, from the streamer's own
view of its viewer connecting (PeerEvent::Connected, a moment after the viewer
sees WatchState::Connected, which is all the test waited for), from the
viewer's picture requests, and from a changed layer. The test drained once,
right after the viewer's side was connected, so a request of one of the first
three that arrives later is taken for the one the changed format asked for, and
the real one then arrives after the "same again" and is counted as a change.
This could not be reproduced here (0 in 400 runs of the single test, 32 at a
time with 48 busy loops, nor in 200 runs of the lib tests); the change closes
those windows as far as they can be named: the test waits for the streamer's
own Connected (StreamViewers) as well, and drains until a moment longer than
the merge interval of requests (250 ms) passes with no request, before the
format is changed. The assertions are those of before.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two voelin-core tests read Streamer::stats() once, at the moment a consumer had
seen the effect, and the stats lag behind it:
- stream::tests::test_pattern_through_stream_tasks asserted `video_frames >= 15`
right after the viewer had decoded 15 pictures. The encoder counts a frame
after the sink has taken it (`sink.send_video(..)`, then `fetch_add`), so the
15th picture can be at the viewer first: video_frames was 14 with
captured_frames 15 and the picture on screen.
- media::tests::an_automatic_bitrate_follows_the_stream asserted the layer's
bitrate in the stats right after the sink had been told the layer's format;
the stats had 0 (the layer's target is stored by the encoder thread, not by
the call that tells the sink).
Both now poll for the value with a deadline (5 s, and 10 s as the test's other
waits), which is the same assertion without the order of two threads. Before,
on a 32-core machine with 32 busy loops beside the runs: the first failed on
that assertion in 7 of 150 runs of the stream tests six at a time, the second
in 19 of 120 runs of the voelin-core lib tests six at a time. After, in 200
runs of the lib tests three at a time with 16 busy loops beside them, neither
failed on these assertions.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
link::tests::a_file_is_downloaded_through_the_connection_the_link_opens waited
for the Started state and then cancelled, expecting the part file to be gone
100 ms later. The download reports Started just before it opens the part file
(files::download, then receive), and the open runs on tokio's blocking pool. A
cancel that arrives in between finds no part file to remove (link cancel()
removes it at once and reports Cancelled), the aborted task cannot stop the
open that is already going on, and the part file is made after the cancel:
`assert!(!part.exists())` failed. It did so in the second of the final runs of
the CI test step in the runner image of this task, and in 10 of 100 runs of
the voelin-core lib tests with three of them at a time and 16 busy loops
beside them on a 32-core machine (none in 200 such runs with this change).
The test now waits for the part file itself, which is what "the transfer
waits in the middle" means, and checks that Started was reported.
This is a real, if small, defect of the product that the test exposed: a
cancel in the moment between Started and the end of the open leaves an empty
`<name>.part` next to the target. It is not fixed here: closing it takes
reporting Started after the open (it also feeds the chat and the preview size
limit) or waiting for the aborted task before the part is removed, which is a
change of the transfer code and not of a test. Recorded in the report of this
branch.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
web::tests::info_lines read the lines a closure logs with
tracing::subscriber::with_default. While that scoped subscriber is the only
one alive, tracing-core registers a callsite that another thread meets first
against that thread's own default, which is none, and the callsite stays
disabled for every thread. session::banner_tests::
a_failing_banner_is_logged_once_with_its_address flakes this way (lines == []):
it failed in one of eight runs of the CI test step in the runner image of
this task (assertion `left == right` failed: [] left: 0 right: 1 at
session.rs:2541; it passed in the other seven). Several other tests reach the same
"banner not downloaded" callsite through image_finished while it runs.
info_lines now installs a recording subscriber as the global default the first
time it is called, and each call records into a buffer of its own thread, so
every callsite is registered against the same subscriber and no scoped
dispatcher is created or dropped while tests run. The result is the same: the
lines `f` logged at info and above on its thread. The new test
info_lines_see_a_callsite_another_thread_met_first fails with the old helper
(lines == []) and passes with the new one.
The same change is 4be37e1 on phase4/seam-followups (not merged yet; it
measured 1 failure in 300 runs of banner_tests before and 0 in 600 after),
taken here unchanged so that a CI run of this branch does not stop on it and
the two branches merge without a conflict.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ts::identity::tests::improve_level_keeps_the_key made its identity with
Identity::create(), which stops at the first counter whose level is 8 or more,
and asked improve_level for 13. About one identity in 32 has 13 or more
already, and improve_level then returns it as it is, so the assertion that the
counter grew fails. The test does not depend on the machine: it failed 9 times
in 300 runs of the single test on a developer machine, and once in the
offline run in the runner image of this task, a CI run that fails one time in
about thirty for it.
The target is now three levels above what the identity has, so the search
always runs. The assertions on the level, the callbacks and the counter use
that target.
The same change is 9254e08 on phase4/seam-followups (which also fixes four
other tests that fail on their own and is not merged yet): it is taken here
unchanged so that a CI run of this branch does not stop on it, and the two
branches merge without a conflict.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The table of docs/ci.md quoted one skip message per row, but the tests print
several wordings per piece (for the H.264 encoder: "skipped: no H.264
encoder", "skipped: needs VP8 and H.264 encoders", "no h264_vaapi or H.264
decoder, skipped"; for FFmpeg: "FFmpeg not installed, skipped", "no FFmpeg with
libavformat, skipped", ...), and some live tests return without printing. The
rows now say a skipped line naming the piece, and keep an exact string only
where the code has exactly that one.
The row on DNS and the internet sat under a column headed "The image has no",
which read as if the job had no network; it has, for apt, rustup and crates.
The column is now headed "A test cannot count on" and the row says the tests
use no DNS or internet and names the #[ignore]d ones that would.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Runner setup told to register ubuntu-24.04:docker://ghcr.io/catthehacker/
ubuntu:act-24.04 while the new section on the tests says the test step runs in
docker.gitea.com/runner-images:ubuntu-24.04. The runner of this machine
(gitea-runner-performance, register script of its NixOS unit) is registered
with ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04, and
`docker ps` shows its CI tasks running that image, so the label line was the
stale one. It now names that image, the network list names its registry in
place of GHCR, and the tests section says it is the image of the
ubuntu-24.04 label.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The docker run that docs/ci.md prints for the tests under the job image hung
for ever once the apt and rustup setup was done: bash -c execs its last
command, so xvfb-run became the container's process 1 and never started cargo
(probed: with the runner image and xvfb installed, xvfb-run -a as process 1
stays up with an idle Xvfb, and the same command under --init finishes). The
command now has --init. The runner is not affected: it starts its steps with
docker exec.
The hint for the private dependency is part of the block now, so the block
runs as printed: the bare clone is mounted at /protocol.git (it was never
mounted into the container before) and `git config` runs with -C /, because a
git worktree's .git file points outside the /src mount and git config in /src
exits 128 with "gitfile does not point to a valid repository".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unreadable TeamSpeak identity is refused without its key in the text (the
classification of from_blob shared as from_json); VoiceOptions fields and
Backends::set_account documented; docs/session-seam.md 17.6 holds the complete
engine/ts edge list for the second half; improve_level, the contacts database
reopen, the banner log subscriber, the two localhost tests and the portal proxy
test made deterministic. Sonnet review accepted; its five minors (two more
DatabaseBusy/port races in tests/gateway.rs, a 1-in-130 voice handshake flake,
the from_json doc, the proxy wrapper's success check) go to the next
test-hygiene round.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The test step runs as root in docker.gitea.com/runner-images:ubuntu-24.04
with only the apt packages of the system-dependencies action. docs/ci.md now
says how to run the CI's test command in that image with --no-fail-fast, and
lists what the image has no (a regular user, sound card, PipeWire daemons, a
session bus, GPU and VA-API, FFmpeg, an H.264 encoder, Wayland, a browser, the
TeamSpeak dev servers) with what each kind of test does about it. It also
records that two voelin-core tests fail on a machine whose ::1 swallows
connections, whatever the change under test is.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
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>
17.8: the commits of the follow-up round, the five flaky tests (all fixed, how
each was reproduced and what the evidence is, including the two that are
rewrites and the one that was never seen again), and what ran on both
toolchains: fmt and clippy per commit, the lib suite ten times in a row on
each with no exclusions, the integration tests, cargo doc, the workspace check
with the environment that made it build, and the smoke script before and after
on fresh stacks. The status line names the round.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
voelin-platform's tests/proxy.rs says to run it under dbus-run-session, and
without DBUS_SESSION_BUS_ADDRESS it returned at once. With one set it ran on
the desktop's bus and failed at "the portal leaves the bus": the test has its
stand-in release org.freedesktop.portal.Desktop, and the first call afterwards
starts the real xdg-desktop-portal, which the bus can start by name; it
answers instead of the "missing" the test expects for a minute. A private bus
from plain dbus-run-session starts it the same way (the test failed the same
three times under it here), so the documented way did not work on a desktop
that has the portal installed.
The test now runs itself again under dbus-run-session with a bus configuration
of its own, a session bus without service directories, so that nothing on it
can be started by name. Without dbus-run-session, or when the bus does not
come up, it says "skipped, nothing was checked" with the reason and passes;
when the test ran on its bus and failed, it fails with the output. The
stand-in and the assertions are the ones that were there.
On the bus with the default services the same inner test still fails as
before (checked by hand), and on the bus of its own it passes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
web::tests::pictures_go_through_the_proxy_named_for_each_hop downloads
http://localhost:<port>/banner through a SOCKS5h proxy of its own and asserts
that the proxy was given the name "localhost:<port>". The test proxy then
connected to that name through the system's resolver, and on a machine that
resolves localhost to ::1 only (this one) the server, which listens on
127.0.0.1, was not reachable: the download timed out after 20 s.
The proxy still reports the name it was given, as SOCKS5h says, and dials
localhost at 127.0.0.1 like the server it stands in front of.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
discover::tests::without_records_the_gateway_itself_is_asked starts a server on
127.0.0.1 and has the discovery ask the gateway at "127.0.0.1",
"127.0.0.1:9987" and "localhost". The probe connected to the name through the
system's resolver, and on a machine that resolves localhost to ::1 only (this
one) nothing listens there: the third address found no gateway.
The test helper that makes the probe, probing, connects to localhost at
127.0.0.1 instead. What the test checks is that the gateway is asked at the
name localhost, not what the resolver makes of it, so it no longer depends on
the resolver.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
web::tests::info_lines read the lines a closure logs with
tracing::subscriber::with_default. While that scoped subscriber is the only
one alive, tracing-core registers a callsite that another thread meets first
against that thread's own default, which is none, and the callsite stays
disabled for every thread. session::banner_tests::
a_failing_banner_is_logged_once_with_its_address flaked this way (lines == [],
once in a full run of slice 3); several other tests reach the same
"banner not downloaded" callsite through image_finished while it runs. The old
helper failed 1 of 300 runs of banner_tests, and always on a single thread
that meets the callsite first (the new test below).
info_lines now installs a recording subscriber as the global default the first
time it is called, and each call records into a buffer of its own thread, so
every callsite is registered against the same subscriber and no scoped
dispatcher is created or dropped while tests run. The result is the same: the
lines `f` logged at info and above on its thread. The new test
info_lines_see_a_callsite_another_thread_met_first fails with the old helper
(lines == []) and passes with the new one; the new helper failed 0 of 600
runs of the same tests.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voice_features::contacts_are_kept_in_the_database dropped its engine and opened
the same database again at once. Dropping an Engine does not close the history
database: the engine task ends later, the history writer is joined there, and
closing the connection checkpoints the write-ahead log under an exclusive lock
with fsyncs. The second History::open waits for that lock only for the 5 s busy
timeout, and fails with DatabaseBusy when a loaded disk makes the close take
longer (seen as 3 failures in 8 runs, 10 in 24 with eight runs at a time).
The test now waits until the -wal file is gone, which SQLite does when the last
connection closes, before it reopens: the restart of a process, as the test
means it. With every fsync of the test process delayed by 6 s (strace -e
inject=fsync,fdatasync:delay_enter=6000000) the old test failed every time at
the reopen with DatabaseBusy, and the new one passes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
ts::identity::tests::improve_level_keeps_the_key made its identity with
Identity::create(), which stops at the first counter whose level is 8 or more,
and asked improve_level for 13. About one identity in 32 has 13 or more
already, and improve_level then returns it as it is, so the assertion that the
counter grew failed: 8 failures in 300 runs of the single test before this
change, 0 in 300 after.
The target is now three levels above what the identity has, so the search
always runs. The assertions on the level, the callbacks and the counter use
that target.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
17.6 of docs/session-seam.md named two engine-to-ts edges; the Opus gate of the
merge found the rest. Each line was checked with rg and cargo tree:
- the engine into src/ts: Backends::default and register_teamspeak, the uid and
id rule of the projection, gateway.rs from_blob/to_blob (H5), the public
voelin_core::ts paths and their users in voelinctl and the UI crates, the
API docs that link into ts, and the test-only edges;
- what a TeamSpeak connector in another crate cannot do with
Backends::register (no LocalCtx, no StreamPort): streams across the crate
boundary need H2 or a public extension trait;
- src/ts into engine-private items (link, stream, files, offline, the crate
root, settings), with the conclusion that the "by git tag" step needs H1 and
H2 or a shared vocabulary crate, else voelin-core and voelin-gateway-ts form
a cycle;
- what else keeps tsclientlib and tsproto in voelin-core's tree, so that the
exit check needs H5 too, and voelin-store, voelin-stream and
voelin-gateway-proto lose the dependency;
- the split of stream.rs;
- the same key-quoting leak in voelin-store's Store::identity, not closed.
The H9 row of 11.2 points to the list and no longer says the exit check holds
after H1-H3 alone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both fields were carried over from ConnectOptions without a doc: what the
nickname is on each kind of server and that an empty one falls back to the
link's nickname parameter; that the server password is Hello.password, falls
back to the link's password parameter and is not the channel's.
Backends::set_account said the connectors use the account (the QUIC
connector's certificate, the TeamSpeak connector's myTS ID proof). No connector
reads ConnectParams.account yet: the TeamSpeak one is given the myTeamSpeak
account through TsConnector's setters, and the QUIC connector does not exist.
The doc says so and names H4 as the step that moves the proof to this hook.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Opus gate of the merge found that ts_session::inner_options put the raw
serde_json error into the refusal of an identity it cannot read, and tsproto's
key visitor reports a key that does not import as invalid_value(Unexpected::Str(
key), ..), so the private key string reached LinkEvent::Disconnected(Some(text)),
Event::Error and the UI status line.
The classification ts::identity::from_blob already had (malformed, cut short,
not an identity, unreadable, with line and column, never the value) is now
ts::identity::from_json, which takes the JSON text; from_blob and inner_options
both use it, so the refusal is worded in one place. A credential that is not
UTF-8 is refused as "it is not text".
Tests: identity::tests (a key that lost its last two characters: the JSON
reader's own message quotes it, from_json and from_blob do not; no 8-character
piece of the key), ts_session::tests (inner_options), link::tests (the
LinkEvent::Disconnected text through SessionLink with the real connector) and
session_fake (ConnectVoice through the engine: the Disconnected state, the
Error event and every event after it). All three connector-side tests fail with
the serde_json text put back.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
"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>
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>