Commit Graph
623 Commits
Author SHA1 Message Date
faumarayandClaude Opus 5.5 c81d4ea666 spikes/gpui/composer: spike 2, the composer, preedit and chat lines
gpui-component's Textarea as the composer (auto-grow, placeholder), emoji
from a picker of voelin-ui-vm's emoji archive inserted at the caret,
pictures and file paths pasted as attachments (Textarea::on_paste),
Ctrl+Enter bound to Send in the Input context after gpui-component's own
bindings. Sample messages go through voelin_ui_vm::chat::line and are drawn
as StyledText with one GPUI text run per TextRun inside InteractiveText,
links clickable (masked ones ask first). The preedit is GPUI's own (XIM on
X11, text-input-v3 on Wayland); the spike reads the marked range and
prints it. drive.sh runs the scenario on the headless display, ime.sh the
X11 preedit with fcitx5 and Pinyin.

From the interrupted attempt, changed here: runs instead of highlights, so
each run has its font (emoji runs in Noto Color Emoji, code in the theme's
monospace font: the row's font_family("monospace") resolved to no
monospace font); a sample line of the smileys DejaVu Sans also has; the
picker in the emoji font; the font probe (whose get_font_for_id printed
"?" for every fallback font) replaced by an emoji probe that counts the
glyphs GPUI draws in colour (ShapedGlyph::is_emoji), printed by drive.sh as
findings for the system's and a Noto-only font configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:43:43 +03:00
faumarayandClaude Opus 5.5 fd421b9982 spikes/gpui/video: spike 1, decoded video as BGRA RenderImages in img()
video.rs' delivery (deliver, FrameSlot, Handoff, Buffers; video.rs:360-480)
ported to GPUI: the decoder hands over its newest frame only, a converter
thread turns it into an Arc<RenderImage> (BGRA, spike_common::bgra), the
window takes the newest from a Latest in render and drops the one it
replaces from every window's atlas (cx.drop_image). A RenderImage owns its
pixels with no way back to them, so Buffers' reuse cannot be ported.

Sources: --mode pipeline is LocalPreview with SourceId::Synthetic through
the real VP8 encoder and decoder, as Video::demo; --mode raw hands I420
frames from memory to the converter; --mode static (added in this attempt)
is the control: one picture, uploaded once, the window repainted every
frame. --convert rgba measures voelin-media's conversion in place,
--no-drop is the negative control for drop_image, --bench times RGBA
against BGRA. measure.sh runs every case on the headless display, with
damage-count beside it and the Slint app's demo stream for comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:43:30 +03:00
faumarayandClaude Opus 5.5 c9859bcfb4 spikes/gpui: the GPUI spikes' workspace, environment and meter
Plan section 6 step 1. A Cargo workspace of its own under spikes/gpui (own
lock, not a member of the root workspace, so the root's lock, deny policy,
notices and CI are untouched; it builds into the checkout's target/), on
gpui-kit pinned to =0.8.0. No gpui-kit release builds on Rust 1.94 (every
gpui-pre 0.3.x calls std::hint::cold_path, stable since 1.95), so the
workspace says rust-version 1.95.

- shell.sh: the toolchain (1.95.0, 1.94, stable or nightly, all from one
  pinned fenix), the native libraries, Mesa's lavapipe as the only Vulkan
  driver, Xvfb, openbox and the X tools, Noto Color Emoji and Noto Sans CJK.
- headless.sh: a private Xvfb display with openbox and a private session
  bus, never the desktop's; headless-wayland.sh: sway's headless backend.
- spike-common: CPU by thread group and memory from /proc once a second
  with the spike's counters (meter), proc-meter and damage-count for
  programs without a meter (the Slint app), Inter and the emoji/CJK fonts,
  the client's Lucide icons as GPUI assets, and the BGRA twin of
  voelin_media::convert::to_rgba.

From the interrupted 2026-10-25 attempt, kept; changed here: shell.sh takes
1.94 and nightly from the pinned fenix (the store paths it named were
garbage-collected), the README's headless-wayland.sh paragraph (sway, not
weston), its fmt command (-p, not --all), its toolchain and nixpkgs lines,
and the font docs (GPUI drops Noto Color Emoji from a fallback chain).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:43:20 +03:00
faumarayandClaude Fable 5.1 3930ef2945 Merge phase5/test-hygiene: test hygiene after the runner-image round (DatabaseBusy twin, closed-port race, the load-only flakes, ts6_banners alone with its server, docs/testing/load.md)
CI / Linux checks (push) Failing after 5m13s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 06:12:04 +03:00
faumarayandClaude Fable 5.1 8614b120fe docs: load.md records the review's undecodable_video flake and the seven unformatted intermediate commits
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>
2026-10-25 06:11:47 +03:00
faumarayandClaude Sonnet 5.5 f791d3926f docs: testing/load.md names its own commits
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>
2026-10-25 04:54:19 +03:00
faumarayandClaude Sonnet 5.5 376925a96e docs: testing/load.md records the round, its commits and what ran
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>
2026-10-25 04:54:03 +03:00
faumarayandClaude Sonnet 5.5 d4ccb8c8b8 docs: testing/load.md, how to make a machine busy and what the load-only tests assert
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>
2026-10-25 04:34:05 +03:00
faumarayandClaude Sonnet 5.5 ad806606ac Say in the smoke script which of its checks still flake
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>
2026-10-25 04:34:05 +03:00
faumarayandClaude Sonnet 5.5 f508e5bec4 Count frames, not a pause, in the automatic-bitrate test's "not per frame" check
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>
2026-10-25 03:59:07 +03:00
faumarayandClaude Sonnet 5.5 94195db16a Format four spots of the test changes of this round with rustfmt
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>
2026-10-25 03:42:19 +03:00
faumarayandClaude Sonnet 5.5 5c029a982a Start the smoke's action when its listener is on the server, not after 3 s
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>
2026-10-25 03:30:02 +03:00
faumarayandClaude Sonnet 5.5 069fd2ac12 Run ts6_banners with the TeamSpeak 6 server to itself
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>
2026-10-25 03:29:42 +03:00
faumarayandClaude Sonnet 5.5 661a607a35 Make two more link and media tests independent of how long the machine takes
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>
2026-10-25 03:27:19 +03:00
faumarayandClaude Sonnet 5.5 92d02b0e00 Wait for the studio's delivered count in the capture-backend test
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>
2026-10-25 03:26:56 +03:00
faumarayandClaude Sonnet 5.5 9d04e0158a Wait for a preview frame of the size and scene asked for in the studio test
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>
2026-10-25 03:26:33 +03:00
faumarayandClaude Sonnet 5.5 77304604fe Let the stream task say when it is done in the layer-format test
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>
2026-10-25 03:26:33 +03:00
faumarayandClaude Sonnet 5.5 c5bb74ffcb Ask the file list one question at a time in the server-features test
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>
2026-10-25 03:26:33 +03:00
faumarayandClaude Sonnet 5.5 81c40a4b09 Wait for the states audio_sources_change_live asserts, and keep feeding the microphone
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>
2026-10-25 03:26:22 +03:00
faumarayandClaude Sonnet 5.5 25be4337a8 State what the preview's rates are, not what a busy machine reaches
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>
2026-10-25 03:26:22 +03:00
faumarayandClaude Sonnet 5.5 f9bfd5d305 Check the test pattern's structure, not its pixels within a tolerance
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>
2026-10-25 03:26:13 +03:00
faumarayandClaude Sonnet 5.5 0bc6abadfe Name the step in which the account-change test timed out
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>
2026-10-25 03:26:12 +03:00
faumarayandClaude Fable 5.1 de89fddcb6 deps: crypto-bigint 0.7.7, ctutils 0.4.5, rustls-webpki 0.103.16, tokio 1.54.1, webpki-root-certs 1.0.11 (RUSTSEC-2026-0382, -0383, -0385, -0386, -0387); notices regenerated
CI / Linux checks (push) Successful in 37m31s
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>
2026-10-25 02:44:31 +03:00
faumarayandClaude Sonnet 5.5 e465a55b9e Give the fallback gateway test a port that stays refused
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>
2026-10-25 02:21:55 +03:00
faumarayandClaude Sonnet 5.5 ac957a0c87 Reopen the history database of the gateway test after the engine has closed it
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>
2026-10-25 02:21:55 +03:00
faumarayandClaude Sonnet 5.5 35408a3dfe Require the portal proxy test's child to report one passed test
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>
2026-10-25 02:20:03 +03:00
faumarayandClaude Sonnet 5.5 7e63092bcd Say in from_json's doc who reads the identity text through it
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>
2026-10-25 02:19:48 +03:00
faumarayandClaude Fable 5.1 2ffe5ffb99 Merge phase5/tests-under-runner: the workspace suite green as root inside the runner image
CI / Linux checks (push) Failing after 35m27s
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>
2026-10-25 02:04:09 +03:00
faumarayandClaude Fable 5.1 e807df40e5 docs: ci.md quotes the right git error, removes root's files, names the bare clone, follows main's loopback and D-Bus tests; .scratch/ ignored
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 02:04:08 +03:00
faumaray a8dbc5ba74 Merge remote-tracking branch 'origin/main' into phase5/tests-under-runner 2026-10-25 02:03:16 +03:00
faumarayandClaude Sonnet 5.5 1de2725f19 Remove a cancelled download's part file after its task has stopped
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>
2026-10-24 23:07:48 +03:00
faumarayandClaude Sonnet 5.5 443559aa79 Take the keyframe baseline of the layer-format test after the streamer has settled
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>
2026-10-24 21:42:15 +03:00
faumarayandClaude Sonnet 5.5 272de7a13d Read the streamer's stats until they show what the viewer already saw
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>
2026-10-24 21:42:03 +03:00
faumarayandClaude Sonnet 5.5 61458df625 Cancel the download test's transfer only once its part file is made
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>
2026-10-24 21:41:37 +03:00
faumarayandClaude Sonnet 5.5 637ee58979 Record log lines in the tests through one subscriber for the whole process
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>
2026-10-24 20:08:50 +03:00
faumarayandClaude Sonnet 5.5 9aea876437 Ask improve_level for more than the test identity already has
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>
2026-10-24 19:53:00 +03:00
faumarayandClaude Sonnet 5.5 172bee5337 Say what the tests print when they skip only as precisely as the code does
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>
2026-10-24 19:11:42 +03:00
faumarayandClaude Sonnet 5.5 ac6937289d Name in docs/ci.md the job image the runner really registers
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>
2026-10-24 19:11:03 +03:00
faumarayandClaude Sonnet 5.5 cd08498092 Make the documented image run start cargo, and its VoelinProtocol mirror work
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>
2026-10-24 19:11:03 +03:00
faumarayandClaude Fable 5.1 6e0df5178e Merge phase4/seam-followups: the gate's identity-text minor, the H9 edge list, five flaky tests
CI / Linux checks (push) Failing after 27m35s
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>
2026-10-24 17:32:58 +03:00
faumarayandClaude Sonnet 5.5 8541d7c9e5 Document what the Linux job image lacks and how the tests cope
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>
2026-10-24 17:16:19 +03:00
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 f374f5797b Record the round after the gate in the design of the session seam
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>
2026-10-24 15:26:46 +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 Sonnet 5.5 c35bbb5ba8 Run the portal proxy test on a bus of its own, or say it checked nothing
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>
2026-10-24 14:32:53 +03:00
faumarayandClaude Sonnet 5.5 a90bb70ee6 Let the test SOCKS proxy dial localhost at the IPv4 loopback
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>
2026-10-24 14:29:29 +03:00
faumarayandClaude Sonnet 5.5 e614a1c3f1 Probe localhost at the IPv4 loopback in the discovery test
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>
2026-10-24 14:29:29 +03:00
faumarayandClaude Sonnet 5.5 4be37e1fd1 Record log lines in the tests through one subscriber for the whole process
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>
2026-10-24 14:28:07 +03:00