The first version of this test (2cbb816) still failed under heavy load, with
the sign-out itself returning DatabaseBusy. The cause is the writer's fixed
pause of 5 ms: when disk pressure makes each of its commits take 100 ms and
more, it holds the writer lock nearly all the time, and the sign-out, whose
busy timeout is the default five seconds, never gets it between two commits.
(The commit message of 2cbb816 blamed the writer's synchronous = FULL; the
setting is right to mirror the app, but it was not the cause.)
Reproduced without load by delaying every pwrite64 of the process by 700 ms
(strace -f -e inject=pwrite64:delay_enter=700ms): the test of 2cbb816 fails
with DatabaseBusy from the sign-out in two runs of two, this version passes in
two of two. The lib test of 2cbb816 passes with the same delay and with fsync
delayed by 3 s as well.
Now the writer pauses ten times as long as its last write took (5 ms at least),
so its share of the lock stays under a tenth whatever the disk does, and the
sign-out starts only after the writer has written once (a thread of a busy
machine can start after the whole sign-out is over, which made "the writer
never ran" a failure of the machine). A drop guard ends the writer if an
assertion of the test fails first.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/ui.md: the app.rs row of the step-3 table points the toolbar and
tree refreshes at servers/bind.rs, where they live; app.rs only calls them.
voelin-ui-vm host.rs: the doc of Update::rest matches the events module
(the Studio's stream, a changed setting, the offline-message answers; the
watched and shared streams are state and go through the stream effects).
CHANGELOG: the two visible fixes of the branch are named instead of
"nothing changes on screen".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
When the device key's own row carries a device-only binding, the provided
KeyStore::sign_out of VoelinProtocol (c5bb6b9) lists the key twice in
SignOut.unbound: in its loop over the identities bound to the account and in the
Auto branch. The tests of this repository use contains and do not mind (a probe
counted two entries for the key with either value of bound_existing_key); the
fix is a follow-up for VoelinProtocol.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
"The key store now keeps the device key when signing out ...", with the
sentence that nothing changes on screen yet kept.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two in docs/architecture.md (the sign-out paragraph and item 2 of open
question 10) and two in docs/session-seam.md 17.6 (the voelin-store leak
bullet), refilled to the width of the files. The words are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
a_reader_that_blocks_the_checkpoint_... and store::tests::a_blocked_checkpoint_...
bounded the wall clock of a checkpoint (1 s) and gave the concurrent writer a
busy timeout of 1 s. A checkpoint ends in two fsyncs, which take seconds under
disk pressure: the review's sequences failed 7 of 8 and 6 of 8 at I/O pressure
of 10 to 30 %, and dd conv=fsync loops beside 32 busy loops made the lib test
wait 6 s and the sign-out 5 s ("database is locked" for the writer,
DatabaseBusy for the sign-out, whose writer neighbour committed with
synchronous = FULL).
The integration test now asserts what it means without a time: the sign-out
finishes, the writer (set up as the app's connections are, synchronous =
NORMAL, a busy timeout of a minute) gets through without an error, and one
checkpoint is made for the four removals. It is renamed from "costs
milliseconds". The lib test sets the connection's busy timeout to an hour, calls
checkpoint_truncate once and requires that it came back while the reader still
held its snapshot (the reader lets go from a watchdog after 30 s, so a
checkpoint that does not give up fails the test instead of hanging it), that the
reader blocked it, and that the timeout is the hour again. With the line that
sets CHECKPOINT_WAIT removed the lib test fails after 30 s.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CHANGELOG: one line under Changed for the sign-out that keeps the device key
and the identity text that errors no longer repeat.
docs/session-seam.md: the four places that named the old protocol revision (the
reading list of the design, slice 1, the conformance run, the lock merge of the
gate round) are records of that round; they now say "the pin of that round" and
name c5bb6b9 only where it is the revision the statement was checked at (the
suite has 17 cases in the same order at c5bb6b9 too).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Store::identity and Store::identities read the stored JSON of a TeamSpeak
identity with `?`, so a row whose data was damaged outside the client came back
as Error::Json carrying serde_json's message, and that message quotes a value
it refuses: tsproto reports a key that does not import as an invalid value, the
key string and all. The error reaches status lines, events and logs.
identity_from_json classifies the error as voelin-core's ts::identity::from_json
does (voelin-core depends on voelin-store, so the classification is here too):
Error::Identity { damage: IdentityDamage, line, column } says malformed, cut
short, not an identity or unreadable, and where, and nothing of the text.
Error::Json stays for the bookmarks and settings, which hold no secret.
The key store was checked as the recorded leak (docs/session-seam.md 17.6)
names it, and does not leak: check_teamspeak (keystore.rs) drops the parse
error with `let Ok(..) else`, Columns::level uses `map_or`, and the warning of a
damaged binding names the row's kind and uid. A test pins that too.
tests/identity_text.rs damages a row six ways (a key that does not import, a
counter of the wrong type, syntax, a text cut inside its key, bytes that are no
UTF-8 as a BLOB and as TEXT) through a second connection, calls everything of
Store and SqliteKeyStore that reads or writes it, and looks through the errors
(text, Debug and sources) and every log line at TRACE (a capturing subscriber in
tests/support) for any 8 characters in a row of the row's data. A control shows
that serde's own message quotes the value and that the capture sees a warning.
With identity_from_json returning the old error the first test fails, naming
the quoted key; the key store test is a guard.
docs/session-seam.md 17.6: the leak bullet is closed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/architecture.md, "Identities": the sign-out wording follows the trait of
c5bb6b9 (the device key stays, unbound, whether it predates the account or not;
the account record and the synced copies are what it deletes; the release is
the service's operation and the same local sign-out; the deletion of an account
releases every device key and the same sign-out is its local half), and records
the screens' duties as the GPUI client's: the sign-out dialog with "Forget this
device's identity" and an export first, the release in Settings -> Account, and
the delete-account dialog, which must warn that the account's servers become
unreachable and offer an export of the device keys first. The reasons of the
refusal of a synced device key and of the checkpoint are reworded to match
keystore.rs.
docs/session-seam.md 17.6: a bullet for the key store's follow-up, with what it
did and what it did not need (no release call, no "released" record).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AccountClient::release (voelin-account-client at c5bb6b9) asks the service to
release the key and then runs KeyStore::sign_out with DeviceKeyChoice::Auto, so
the unbind of one key that keeps its data is the sign-out's own step (and a put
of the blob without its binding for a single key). Open question 10 and
protocol 13.6 ask the client to remember nothing: the service holds the
registration of the key, and the client learns that a key is still registered
with an account it signed out of from the service's answer to a sign-in or a
sign-up (CONFLICT, field device). So there is no "released" record and no new
store call; keystore.rs says so, and says the same of the deletion of an
account, whose local half is this sign-out.
Two tests pin what the client relies on after a release: the key is kept byte
for byte and unbound, then is the device key of a record of another account,
and a sign-out of that account keeps it again (its copies go); and a release
whose local half was cut short is finished by a sign-out with Auto, and a
second one finds nothing to do.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The module documents of keystore.rs are rewritten to the rule of open question
10 (accounts design, answered 2026-10-24): a sign-out keeps the device key
unbound whether it predates the account or the client made it for the account
(bound_existing_key is the client's wording and no rule reads it), the
identities only this device holds are unbound and kept, and "Forget this
device's identity" is the only deletion of a key of the device: signed in it is
sign_out with DeviceKeyChoice::Forget(uid), signed out it is KeyStore::remove
(a TeamSpeak identity: Store::delete_identity). The store has no export call;
the docs say where the UI reads the bytes (voelin_key + to_pkcs8, Store::identity
+ ts::identity::export) before it forgets, which also serves the delete-account
dialog's export of the device keys.
What a sign-out still deletes is not a key of the device, and the docs now say
so truthfully: the synced copies of integration secrets (private keys, scrubbed
from the file and its log like any deleted key), the account record (no
secret), and with Forget the device key. That is why SignOutPass stays: the
trait's sign-out removes those rows, and the log is still truncated once after
the last step, not per row, and not at all when nothing was deleted.
The refusal of a synced device key stays and is reworded: the sign-out keeps the
device key, but its first step deletes every synced copy before it reads the
record, so a device key stored synced would be deleted all the same.
Tests (the turned-around ones are in the previous commit): the device key's
whole row is unchanged by a sign-out, with and without the flag; a key that
carries a device-only binding is unbound and nothing else of its row changes;
a sign-out scrubs what it deletes and leaves the kept keys in the file; the
blocked-checkpoint test counts exactly one blocked checkpoint for four
removals (Forget, so the removals are four as before), through a TRACE-level
capture in tests/support; a sign-out that deletes nothing does not checkpoint;
a key kept by a sign-out is exported, forgotten with no trace in the file or
the log, and restored from the export.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The three protocol crates move together, as docs/building.md says: the
identity crate depends on voelin-proto of the same revision, so moving it
alone would put two voelin-proto packages in the lock.
c5bb6b9 is the protocol's main with task 34 (open question 10): the provided
KeyStore::sign_out keeps the device key whatever AccountRecord.bound_existing_key
says (only DeviceKeyChoice::Forget deletes it), and the crate gains Adoption,
Release and REVOCATION_KIND_RELEASED. Nothing in the workspace needed a source
change to compile (cargo check --workspace --all-targets --locked is clean on
1.94); the conformance Fixture of voelin-proto now holds an Arc<dyn Backend>,
and FakeHandle implements it, so the two callers build as they were. The
suite still has 17 cases, in the same order, so the two comments that named
the old revision name c5bb6b9.
Cargo.lock: the three source lines only. `cargo update -p ...` also flips
windows-sys 0.52 to 0.61 and itertools 0.14 to 0.13 in unrelated entries;
those are not taken, `--locked` accepts the file without them.
THIRD_PARTY_NOTICES.md regenerated (scripts/notices.sh): unchanged, the
workspace and git crates are not in it.
The voelin-store tests that pinned the old sign-out (a key made for the
account is deleted by Auto) are turned around here, in the same commit,
because they cannot pass with the new trait: the key stays, unbound, and only
Forget deletes it. The rest of the sign-out follow-up (the module documents,
the refusal wording, the new tests) is the next commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The review's 100 whole-binary runs of the head saw
media::tests::undecodable_video_is_noticed_through_the_pipeline fail once
at load 106-146 (untouched by the round); it joins "Seen and left alone".
cargo fmt differed at seven intermediate commits, not six (the shell-only
5c029a9 sits on the unformatted tree); the orchestrator waives per-commit
rustfmt for them, fixed forward in 94195db, history not rewritten.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The record's table said "this one" for the commit that adds the page; there
are two, the page and its record.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The record of the round at the top of the page, in the form of the earlier
rounds' records: the branch and its base, the fallback for the unregistered
mao-* agents, the commit table (which commits are the cut-off run's, which are
this attempt's, which are beyond the list), the two hunks dropped from the
cut-off run's tree, and a table of the checks that ran on the final tree. The
scope test's row gets the failures of the earlier tree that only had the first
half of its fix.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The recipe of the round (32 busy loops beside many runs of a test binary, a
build before and one after run alternately), the rules the fixes followed, the
table of the tests that failed only under load with their counts before and
after, the account-change test of the seam follow-ups (not reproduced; the
timing of its steps against its deadlines, and the reading of the code that
found no race), the tests seen at heavier load and left alone, and the
engine stage of the live smoke (ts6_banners failed because the test shared the
TeamSpeak 6 server with the others; what the smoke still does not do
reliably). docs/ci.md points to it from the section on the job image.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
After the roundtrip and ts6_banners fixes the smoke passed two of three runs
on the head of the branch; the third failed at the directory check of the
TeamSpeak 6 stage, `the directory did not list the stream`. The viewer of that
check ends when it has 30 frames and the script looks for the directory's
`"title"` line, which the viewer prints only if its own gateway session had
connected by then; in the failed run it was still `observe=Connecting`. The
fix is in voelinctl engine (end the viewer on both), not in a round about
tests, so the comment above directory_check records it, with the earlier
`expected output did not appear` of the gateway stage that was seen with the
same engine state.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Beyond the list of this round, found by its final whole-binary run: 1 of 150
runs of the voelin-core lib beside 32 busy loops failed in
an_automatic_bitrate_follows_the_stream, at the assertion that the sink is told
the layer's format once per change and not per frame (`left: 2, right: 1`), and
the unchanged test failed 2 of 900 runs of its own beside the same load.
The sink is told twice for the first picture, and the test counted in between:
Streamer::attach tells it the format from the size captured so far (when a
frame has been captured before the attach), and the encoder tells it again
before its first frame, because its record of what it told starts empty. The
test waited for the format, took the count, slept 200 ms and compared; on a
busy machine the encoder's first frame comes later than the 200 ms.
The test now waits until a frame has been handed over (the encoder tells before
it hands over, so both tellings are done), takes the count, waits for five more
frames, and compares: "per frame" is counted in frames. The deadline of 30 s
only ends a hang. 0 failures of 600 runs of the test beside 32 busy loops.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cargo fmt on the own crates changed these four places of the commits before:
the match arm of ask_files_until, the closure of the features test, the count
closure of streamer_sends_opus and the call of preview_until in the studio
test. No change of meaning. Each of those commits passes clippy on its own;
rustfmt was not clean in them until this one.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
roundtrip started the listener in the background, waited a fixed 3 s and ran
the action (the poke, the private message, the avatar request, the file
upload). A dev server that is slow to let a client in (4 s and more, 13 s
seen, when the machine is busy) left the action running against a client that
was not on the server yet: `error: message: the client is not on the server`,
and `FAIL: private message: the action failed` (the action's client printed
`connected: 2 clients` and the listener's `connected: 1 clients` came after).
That is one of the places at which the earlier steps of the smoke flaked.
voelinctl engine prints `connected: N clients` once its client is on the
server and has seen the presence, for every action; roundtrip now waits for
that line in the listener's log (60 s at most, and not when the listener has
ended) and then 1 s more, for the others on the server to see the listener.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine stage of the live smoke failed in every run that reached it, before
and after every recent branch, at crates/voelin-core/tests/live.rs
`disabled policy must prevent HTTP requests` (ts6_banners, left: 4, right: 0),
while the six tests of the file passed one after the other.
ts6_banners sets and unsets the TeamSpeak 6 server's banners, and it counts the
requests that reach an HTTP server of its own for the images it set, to show
that an engine whose policy is disabled makes none. The server tells every
client that connects while the banners are set where they are, and an engine
fetches what it is told (as it should): the other tests of the binary, which
cargo runs side by side, connect engines to the same server, and their
requests were counted as the engine under test's. Reproduced against the
development servers with the tests in pairs: ts6_banners alone passes (62 s),
with ts6_avatars, ts6_engine or ts6_channel_joins at the same time it fails
(`left: 2` or, in the join test's case, a later count, `left: 6, right: 4`),
and the TS3 and TS6 tests without it pass in any combination. So the test was
wrong, not the engine or the script's ordering: it needs the server to itself.
The TeamSpeak 6 tests that connect now hold a lock shared and ts6_banners
holds it exclusively, so it runs before or after them and not meanwhile. The
smoke is not run with --test-threads=1 for this: that would hide it, not
remove it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Beyond the list of this round, found by its load runs and rarer than the tests
of the list: in about 500 runs of the whole voelin-core lib beside 32 busy
loops, a_scope_bigger_than_the_channel_is_sent_in_bigger_chunks failed 3 times
(the scope had 1 channel, not 5,003) and streamer_sends_opus 2 times (the
`video too` expectation). The fixes are of the mechanism the code shows; the
runs after them (docs/testing/load.md) are too few to count a rate that low.
a_scope_...: the connector waits 250 ms for a link's first snapshot after it
said it is connected, and the test made its 5,000 channels after saying it, so
a busy machine made the session without them. The channels are made first. The
scope is also sent whole only if the presence is in the host's state when it
is asked for, so the test now sends a voice packet of one of the presence's
clients and waits for it to come through: the link takes its events in order,
and a packet of a client comes through only once the presence is in.
streamer_sends_opus: it waited for ten frames of audio and then expected a
frame of video, but audio is made quickly and a busy machine can keep the
video encoder from its first frame for longer. It now waits for ten frames of
audio and one of video, whichever the encoders make first; its deadline, 30 s,
only ends a hang.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Beyond the list of this round, found by its load runs: in 150 runs of the
whole voelin-media test binary beside 32 busy loops, 11 failed, 9 of them in
packets_reach_the_outputs_and_the_studio_is_a_capture_backend at
`assert!(studio.shared.delivered.load(..) > 0)` (the other 2 in
it_composes_into_the_preview_and_follows_commands, fixed in the commit before).
The studio counts a frame as delivered after it has handed it to the capture
sink (`sink.frame(..)`, then `delivered.fetch_add`), so a test that has just
received the frame can read the count before it is made. The test now waits
for the count to become non-zero after it has the frame; the wait for the
frame is 30 s instead of 5 s, and the wait for the count 30 s, which only end
a hang.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
it_composes_into_the_preview_and_follows_commands took the first preview frame
after SetPreview and asserted its size. The studio composes from the moment it
starts, at the preview size and rate it has then (480x270, 15 fps), so the
first frame there is can be one of that size, composed before the command was
applied; on a busy machine it is. The 2 s waits for the new scene's colour
and the test's overall 5 s and 10 s limits measured the machine too.
preview_until now reads the preview until a frame that the test takes comes,
and looks at 20 frames at most: the preview keeps only the latest frame, so
few older ones are waiting or on their way, and the number of frames looked at
is the bound by the work. The wait for each frame, 30 s, only ends a hang.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
layer_formats_reach_the_live_stream sent the same layer format a second time
and then slept 200 ms before asserting that no keyframe was asked for, which
tests that the stream task had not got to the command within 200 ms. It is the
task that asks for a keyframe (when the layer's bitrate changes) and it takes
its commands in the order they are sent, from the sink and from the handle
through the same channel. The test now sends a command whose answer is an
error event (Kick of a viewer, 65535, that is none) and waits for that
event: it comes after everything the format set going, and nothing is left to
wait out. A keyframe request the viewer's side makes late is not covered, and
none was seen.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
the_features_of_a_server_are_the_hosts_narrowed_by_the_servers_list asked for
the lobby's file list every 20 ms until the answer was the one it wanted. The
bus holds 16 events, so on a busy machine the answers fell behind it (and
behind the host's work) and the one that counted was lost in the backlog, or
an answer to a question asked before the host narrowed what it offers was
taken for one asked after.
A helper, ask_files_until, now asks one question and reads the bus until that
question's answer comes, then asks the next only if the answer was not the one
wanted. Every question is answered before the next is asked, so those asked
after the update is pushed are the ones the update can refuse; nothing has to
be told apart by number, and nothing is waited out by the clock. The test
checks that the answer after the server lifted its list came from the host.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
audio_sources_change_live failed 6 of 200 runs beside 32 busy loops, in two
ways. It waited for the sources' meters and then asserted their state and the
mixer's level and limiter, which are set at other times than the meters: the
state could still be Starting when the meters showed the tones. And its
microphone thread published 50 chunks of 20 ms, one second, and the source
takes what is published only from when it runs, which a busy machine delays
by any time, so the test then waited 5 s for a level that had gone by.
The first wait now includes the state, the mix and the limiter. The thread
publishes until the test has heard the tone (or, as a cap that ends a thread
whose test failed first, 120 s), and the second wait includes the window
source's error and the muted tone's own level, which the test asserted right
after it. The deadlines of the waits, 30 s, only end a hang; what is waited
for is a state.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The end of local_preview_decodes_the_pattern asked the rates of the second
since the first stats call to be 20 to 40 pictures and 100,000 to 5,000,000
bits a second. How many pictures a second the pipeline manages is a property
of the machine's load, and a second of sleep is longer than a second when the
machine is busy; neither is what the stats are about. What they promise is
that fps and bitrate are the counters' change over the time since the call
before.
The test now times its two stats calls and the sleep between them. The time
the stats measured lies between the two spans that the test measured around
it (from the end of the first call to the start of the second, and from the
start of the first to the end of the second), so the reported fps has to be
the pictures counted in that time, within the rounding of fps, and the
bitrate the bits counted in it, within the cut-off of bitrate. At least one
picture has to have come in the second.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rectangle_span, the pixel check of local_preview_decodes_the_pattern and
test_pattern_through_stream_tasks, asked every pixel further than two columns
from the rectangle's edges to be within 24 per channel of the rectangle's
colour or of the background. The streamer's VP8 speed control lowers the
quality when the encoder falls behind, and a flat colour then moves by 30 and
more per channel (seen: [33, 31, 101] and [50, 33, 48] for the background
[24, 40, 72], [255, 85, 5] for the rectangle [240, 90, 30]), still nowhere
near the other colour. A tolerance of 40 was tried and reverted: it only moves
the load at which it fails.
A pixel is now whichever of the pattern's two colours it is nearer to, and
what the test is about is the row's structure: background, one run of the
rectangle, background. The first and last pixel that are the rectangle's give
the span; everything between them, but the two blurred columns at each end,
has to be the rectangle's too, and the callers still check the span's width
and that it moves. A stray rectangle-coloured pixel in the background
stretches the span over background and fails there.
Before, the two tests failed 4 and 2 of 100 runs each beside 32 busy loops; see
docs/testing/load.md for the runs after.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
account_change_cancels_pending_handshake was seen to fail about once in 130
runs of the whole suite under load, and the failure was not kept. Its three
timeouts (5 s for the first handshake packet, 5 s for a packet from a new
socket after the account changed, 2 s for the connection to end after the
account source closed) were bare unwrap()s, so a failure said only that a
timeout had elapsed, at a line. Each now says which step it was.
No race was found, in the test or in the code it drives. The account receiver
has seen its version before the connection is made, so a change after the
first packet always restarts the connection; the restart opens a new socket,
so a packet from another port is a packet of the new connection; dropping the
sender makes changed() fail, which ends the loop with the reason the test
expects. The ways the test can fail are those three deadlines. With the steps
timed (a throw-away instrumented build, not committed), 300 runs of the test
alone, eight at a time beside 32 busy loops, all passed, and the steps took at
most 34 ms, 33 ms and 9 ms against deadlines of 5000, 5000 and 2000 ms. So
the failure needs a stall of seconds, which is the machine's and not a
property of the test; docs/testing/load.md has the numbers and what to do if
it is seen again.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RUSTSEC-2026-0387 stays on the crypto-bigint 0.5 and 0.6 lines that the
tsclientlib fork pins (p256 0.13 in tsproto-types, crypto-bigint in tsproto);
ignored until 2026-12-20 with the fork's move to p256 0.14 as the follow-up.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
the_next_published_gateway_is_used_when_one_fails took its "port nothing
listens on" by binding a listener to port 0 and dropping it at once. A port
that is free only for a moment can be given to another socket before the
engine connects to it: the other tests of the binary bind port 0 for their
fake gateways and proxies, and the one that gets the port answers the
connection, so the test then passes over a gateway that is no longer closed,
or fails on the 650 ms deadline.
The test now binds a TCP socket and keeps it, without listening, for its
whole length: the port is taken, so nobody else gets it, and a connection to
it is refused at once. It checks that refusal before it relies on it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
history_on_open_paging_and_offline_messages drops its engine and opens the same
database again for the restart it tests, the same shape as the contacts test
that 0d67dd7 fixed: dropping an Engine does not close the history database, the
engine task ends later and closing the connection checkpoints the write-ahead
log under an exclusive lock, and a History::open meanwhile waits for that lock
only for the 5 s busy timeout, failing with DatabaseBusy on a loaded disk.
The test now waits until the -wal file is gone before it reopens. The helper
that does so (closed) moves from voice_features.rs to tests/common/mod.rs,
which both test binaries declare.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The test runs itself again under dbus-run-session and, on a zero exit, returned
without looking at what the child printed. A child that ran no test at all
(its --exact filter matching nothing, as after a rename of the test) also exits
0 and printed "running 0 tests ... 0 passed", so the wrapper passed having
checked nothing. A zero exit now has to come with libtest's "test result: ok.
1 passed;" in the child's output, else the wrapper fails with that output.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The doc said every reader of the TeamSpeak identity text refuses it through
from_json. Only voelin-core reads it through there: voelin-store parses the
same text on its own (keystore.rs check_teamspeak and level, store.rs list),
and drops or forwards serde's message by its own rules. The doc now names
voelin-core and says voelin-store parses it too.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every machine assumption of the tests fixed (root writes anywhere, no sound
card, no session bus, no GPU, no FFmpeg, no H.264 encoder, no display beyond
xvfb, no TeamSpeak servers, no DNS); a cancelled download's part file removed
after its task stopped (a real defect a test exposed). docs/ci.md: how to run
the suite the way CI runs it. Sonnet review accepted; its three docs minors
are in the last commit.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One paragraph: what the merge brought (the session seam, the CI deploy key, the
media codec test and the seam follow-ups, none of it in the UI crates), that the
.set_ counts of the table were counted again on the merged tree and stand, and
where the colour of a chat's avatar is chosen (servers::logic::conversation_tint,
pinned by a test).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The ui-vm gate's minor "server_tint falls back to black" was closed by a
fallback in App::conversation_item, `.unwrap_or_else(|| vm::avatar::tint(&title))`,
that no test could fail: replacing it with `.unwrap_or_default()` (opaque
black) left cargo test -p voelin-ui -p voelin-ui-vm green.
The choice of (kind, session) -> colour is now a pure function in
voelin-ui-vm, servers::logic::conversation_tint(state, kind, session, title),
and messages.rs calls it. A test pins the three cases: a server chat of a
server in the list takes the rail's colour, a server chat whose server is
gone takes the colour of its title, and a channel's or a person's chat (with
or without a known server) takes the colour of its title. The titles are
chosen so that the title's colour differs from the server's, and the test
asserts that. App::server_tint, whose only caller this was, is removed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Main gained phase0/ci-private-dependency (the CI deploy key and the checks
action), phase5/media-codec-test (a media test stated for machines without an
H.264 encoder) and phase4/seam-followups (five flaky tests fixed, the
identity-text leak closed, docs/session-seam.md 17.8 onwards). None of it
touches the UI crates: the merge is clean, with no conflict, and Cargo.lock
and THIRD_PARTY_NOTICES.md are unchanged by it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>