Merge main (6e0df51) into phase5/ui-vm-2

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>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-24 23:17:40 +03:00
commit 9e7452ec2a
24 files changed
+989 -89

No files matched your search

+27 -8
View File
@@ -28,7 +28,8 @@ yet: Windows SmartScreen warns about the installer, and the debug APK is
signed with a debug key (fine for testing, not for the Play Store).
The gateway's image can also be built directly:
`docker build -f crates/voelin-gateway/Dockerfile -t tsgw .`.
`docker build --ssh default -f crates/voelin-gateway/Dockerfile -t tsgw .`
(`--ssh default`: see [Locally with Docker](#locally-with-docker)).
Gitea at [git.faumaray.ru](https://git.faumaray.ru) builds the same package
types through `.gitea/workflows/release.yml`: manual runs produce one
@@ -80,7 +81,16 @@ scripts/docker-build.sh android # → dist/android/
scripts/docker-build.sh # all three
```
The same with plain Docker, e.g. `docker build -f docker/linux.Dockerfile -o dist/linux .`
The same with plain Docker, e.g. `docker build --ssh default -f docker/linux.Dockerfile -o dist/linux .`.
**The builds need an ssh-agent that holds a key able to read the private
VoelinProtocol repository** ([below](#depending-on-voelinprotocol)): Cargo
fetches it inside the image, through the agent that `--ssh default` hands to the
build. The key stays in the agent; it is not copied into the image or the build
cache. `scripts/docker-build.sh` passes `--ssh default` itself and stops with a
message when `ssh-add -l` shows no agent or no key (`eval "$(ssh-agent -s)"`,
then `ssh-add` your key). The server's host key comes from
`.gitea/known_hosts` ([ci.md](ci.md#voelinprotocol-access)).
Rebuilds are incremental: the cargo registry, `target/` and Gradle live in
BuildKit cache mounts (`docker builder prune` frees them).
@@ -153,13 +163,22 @@ set `net.git-fetch-with-cli = true` in `~/.cargo/config.toml`.
compiler (gcc or clang) and cmake.
`deny.toml` allows this one git source.
**CI and the Docker builds need read access to that repository too**: an SSH
deploy key (a repository secret written to `~/.ssh`, with the server's host key
in `known_hosts`) or an access token (rewrite the SSH URL to HTTPS with
**CI and the Docker builds read it with a read-only SSH deploy key.** The key
is registered on VoelinProtocol and stored as the repository secret
`VOELIN_PROTOCOL_DEPLOY_KEY`; the Gitea workflows write it to `~/.ssh` (CI) or
load it into an ssh-agent (release builds), the server's host key comes from the
committed `.gitea/known_hosts`, and Cargo is told to fetch with the system git
(`CARGO_NET_GIT_FETCH_WITH_CLI=true`) because its built-in git client ignores
`~/.ssh/config`. The Docker builds use the same key through
`docker build --ssh default` (see above). What was set up, how to re-check the
host key's fingerprint and what each failure means:
[ci.md](ci.md#voelinprotocol-access). A runner of your own gets the same setup
from the workflows; the alternative to a deploy key is an access token (rewrite
the SSH URL to HTTPS with
`git config --global url."https://<token>@git.faumaray.com/".insteadOf ssh://gitea@git.faumaray.com/`
and set `CARGO_NET_GIT_FETCH_WITH_CLI=true`). Without it `cargo` cannot fetch
the dependency and a fresh checkout does not build; the details are in
VoelinProtocol's `docs/development.md` ("Depending on VoelinProtocol").
and set `CARGO_NET_GIT_FETCH_WITH_CLI=true`), which these workflows do not
use. More in VoelinProtocol's `docs/development.md` ("Depending on
VoelinProtocol").
### Working with a sibling VoelinProtocol checkout
+105 -12
View File
@@ -51,16 +51,17 @@ the separate `release.yml` workflow below.
Configure this in the runner's labels when registering/configuring it;
an `ubuntu-latest` label alone does not match. The job image must provide
Bash, Git, Node.js for checkout v4, and root or passwordless sudo for apt.
Bash, Git, the OpenSSH client, Node.js for checkout v4, and root or
passwordless sudo for apt.
3. Allow network access from the runner and job container to the Gitea
instance, GitHub (checkout action, dependencies and RustSec advisories),
GHCR (runner image), Ubuntu apt mirrors, rustup distribution servers,
crates.io and dependency/license sources used by cargo-about. The
workspace also depends on the **private** VoelinProtocol repository
(`voelin-identity`, over SSH), so the job needs read access to it: an SSH
deploy key or an access token, set up as in
[building.md](building.md#depending-on-voelinprotocol). Until a runner has
it, a fresh checkout does not build there.
(`voelin-identity`, over SSH), so the job needs read access to it and the
server's SSH port. The workflows set that up themselves from a repository
secret: [VoelinProtocol access](#voelinprotocol-access). A runner needs
nothing for it beyond the network access and the image tools above.
4. Provision enough RAM, swap and free disk for a full Slint workspace build
plus cargo-deny/cargo-about compilation. These are large builds; monitor
the first run and size the runner accordingly. The workflow limits Cargo
@@ -93,14 +94,104 @@ No GitHub cache/artifact service or reusable-workflow support is required.
The job does not need a Docker socket mounted inside its container; the
runner itself still needs Docker access to start that container. Keep this
runner isolated from production services and credentials, particularly when
accepting untrusted pull requests. No release signing or publishing secrets
are needed.
accepting untrusted pull requests. CI needs one secret, the VoelinProtocol
deploy key below; it needs no release signing or publishing secrets.
After registering the runner, dispatch **CI** in Gitea Actions and inspect
all step results. Local YAML/shell checks do not prove that a particular
Gitea instance, runner registration, network policy or resource allocation
can complete this job.
### VoelinProtocol access
The workspace depends on `voelin-identity` from the **private** repository
`Voelin/VoelinProtocol`, as a git dependency over SSH
([building.md](building.md#depending-on-voelinprotocol)). Cargo resolves the
whole workspace before it builds anything, so *every* cargo command needs
that access: all of CI, all three package images and the gateway image (whose
crate does not use `voelin-identity` itself). Without it the first cargo
command fails with `unknown SSH host key` (runs 1037 and 1050 did).
What is set up:
- **The deploy key.** A read-only SSH deploy key is registered on
`Voelin/VoelinProtocol` (Settings → Deploy Keys, write access off). It has
no other use and no access to any other repository. Its private half is the
repository secret **`VOELIN_PROTOCOL_DEPLOY_KEY`** of `Voelin/VoelinClient`
(Settings → Actions → Secrets): the whole OpenSSH private key file, BEGIN
and END lines included, without a passphrase. To rotate it, make a new pair
(`ssh-keygen -t ed25519 -N '' -C voelin-client-ci -f key`), register
`key.pub` on VoelinProtocol, replace the secret with the contents of
`key`, run CI, then delete the old deploy key and `key`.
- **CI** (`ci.yml`). The workflow hands the secret to the checks action as its
input `protocol-deploy-key` (a repository secret is not visible inside a
composite action). The action's first step fails at once, naming the secret,
if the input is empty or is not a private key. Otherwise it writes the key to
`~/.ssh/voelin_protocol` (mode 0600, `~/.ssh` 0700), appends the host key
line to `~/.ssh/known_hosts`, writes a `Host git.faumaray.com` block to
`~/.ssh/config` (`User gitea`, that `IdentityFile`, `IdentitiesOnly yes`,
`StrictHostKeyChecking yes`) and exports `CARGO_NET_GIT_FETCH_WITH_CLI=true`
and `GIT_SSH_COMMAND` for the rest of the job (`ci.yml` sets the first one
in its own `env` as well). It prints only the key's
public fingerprint; the key is never echoed. After the system packages a
second step runs `git ls-remote` on VoelinProtocol, so a wrong key or host
key fails there, with the reason, and not inside a cargo command. The key
lives in the job container and goes with it.
- **Release** (`release.yml`). A step after checkout starts an `ssh-agent` on
the release host, loads the key into it from stdin (it is never written to
disk) and exports `SSH_AUTH_SOCK`; the agent forgets the key after nine
hours, and a last step, which also runs after a failure, stops it. The
builds pass the agent on with `docker build --ssh default`
(`scripts/docker-build.sh` does it for the three packages; the gateway image
step does it itself).
- **The images.** Each cargo `RUN` of `docker/*.Dockerfile` and
`crates/voelin-gateway/Dockerfile` has `--mount=type=ssh,required=true`, so
the key exists only inside that step, through the agent socket, and never
reaches a layer, a build argument or the cache; a build without `--ssh`
stops there with `unset ssh forward key default`. The build stage copies
`.gitea/known_hosts` to `/etc/ssh/ssh_known_hosts` and sets the same
`CARGO_NET_GIT_FETCH_WITH_CLI=true`; the toolchain stages install `git` and
`openssh-client`.
- **Cargo uses the system git** (`CARGO_NET_GIT_FETCH_WITH_CLI=true`) because
Cargo's built-in git client does not read `~/.ssh/config` (so it cannot use
an `IdentityFile`), authenticates with an ssh-agent and checks the host
against `~/.ssh/known_hosts` and its own `net.ssh.known-hosts` setting. The
system git runs `ssh`, which reads the config above (and
`/etc/ssh/ssh_known_hosts` in the images), so the same files serve a plain
`git` call, Cargo and the access check.
- **The host key** is committed in [`.gitea/known_hosts`](../.gitea/known_hosts),
never fetched while a job runs. Gitea's built-in SSH server (`SSH-2.0-Go`)
offers an RSA host key only (`ssh-keyscan -t ed25519 git.faumaray.com`
prints nothing), so the line is `ssh-rsa`; its fingerprint is
`SHA256:fugBYnqAnqmTLsGpafVgQF9gPQzJqps7uHvs48blg2A`. Re-check it:
```sh
ssh-keygen -lf .gitea/known_hosts # the committed line
ssh-keyscan -t rsa git.faumaray.com | ssh-keygen -lf - # what the server offers now
```
Both print the fingerprint above. If the server's key is ever replaced on
purpose, confirm the new fingerprint with the server's administrator, put the
new `ssh-keyscan -t rsa` line and the date in `.gitea/known_hosts` and the
fingerprint here, and commit all of it in one change. Until then a changed key
makes every job stop with `Host key verification failed`, which is the point.
Pull requests from forks get no secrets: their CI run stops at the first step
with the message about the empty deploy key. Anyone who can change a workflow of
this repository, or run code in one of its jobs, can read the key; it can only
read VoelinProtocol, and it is replaced as above. That is one more reason to
keep the CI runner isolated, as said above.
If a run fails here:
| Message | Cause |
|---|---|
| `The VoelinProtocol deploy key is empty` | the secret is missing, empty or not visible (a fork's pull request) |
| `… is not an unencrypted OpenSSH or PEM private key` | the secret holds something else, or a key with a passphrase |
| `Permission denied (publickey)` in "Check read access to VoelinProtocol" | the key is valid but is not a deploy key of VoelinProtocol: compare the fingerprint "Deploy key installed" printed with the one in VoelinProtocol's deploy key settings |
| `Host key verification failed` | `.gitea/known_hosts` does not match the server: check as above before changing anything |
| `unset ssh forward key default` | a Docker build ran without `--ssh default`: a plain `docker build` (`scripts/docker-build.sh` passes it itself and stops earlier when the agent has no key) |
### Gitea release runner
The instance at `https://git.faumaray.ru` reported Gitea **1.25.4** on
@@ -114,9 +205,10 @@ host** runner with the label:
voelin-release:host
```
Provision Bash, Git, Node.js 20+, Python 3.11+, curl, tar, gzip and rootful
Docker 23+ with BuildKit. Use **act_runner 0.2.7 or newer** (prefer the latest
maintained release), or gitea-runner 2+. Older act_runner does not provide
Provision Bash, Git, the OpenSSH client (`ssh-agent` and `ssh-add`), Node.js
20+, Python 3.11+, curl, tar, gzip and rootful Docker 23+ with BuildKit. Use
**act_runner 0.2.7 or newer** (prefer the latest maintained release), or
gitea-runner 2+. Older act_runner does not provide
`ACTIONS_RESULTS_URL`, which the pinned artifact action needs. Register the
runner against `https://git.faumaray.ru`, reachable from both the host and
build containers. Gitea 1.25.4 provides the required artifact-v4 API.
@@ -158,8 +250,9 @@ ENDLESS_TASK_TIMEOUT = 9h
Keep sufficient RAM/swap and free disk for all package builds and their
Docker caches. The package builds run one after another, each with as many
Cargo jobs as the host has CPUs. The workflow never prunes shared Docker
state or creates host swap. The token and optional Android signing secrets
are documented in
state or creates host swap. The secrets are the VoelinProtocol deploy key
([below](#voelinprotocol-access)), `RELEASE_TOKEN` and the optional Android
signing secrets, both documented in
[Gitea releases](release.md#gitea-releases).
The Gitea release job builds packages only: it runs no formatting, Clippy,
+1 -1
View File
@@ -240,7 +240,7 @@ the unit to `/etc/systemd/system/`.
**Container** (`tsgw-image.tar.gz`, or build it):
```sh
docker load -i tsgw-image.tar.gz # or: docker build -f crates/voelin-gateway/Dockerfile -t tsgw .
docker load -i tsgw-image.tar.gz # or: docker build --ssh default -f crates/voelin-gateway/Dockerfile -t tsgw .
docker run -d --name tsgw --init --restart unless-stopped \
-v $PWD/tsgw.toml:/etc/tsgw/tsgw.toml:ro -v tsgw-data:/var/lib/tsgw \
-e TSGW_QUERY_PASSWORD=… -p 7788:7788 tsgw
+206 -6
View File
@@ -3,8 +3,10 @@
Status: design (2026-10-20); slices 1, 2 and 3 are implemented (section 13
says how slice 1 differs from this text, sections 14 and 15 what its reviews
changed, section 16 what slice 2 built, found and corrected, section 17 what
slice 3 moved, changed and ran, and 17.7 the round after its review, which
brought the branch onto main `ad20979`); section 10 has the slices.
slice 3 moved, changed and ran, 17.7 the round after its review, which
brought the branch onto main `ad20979`, and 17.8 the round after the gate of the
merge; 17.6 has the complete edge list for the second half); section 10 has
the slices.
Design for the first half of plan step 7 (Phase 4): the engine consumes
`voelin_proto::link::Session`, `ServerLink` becomes an adapter over it, and
@@ -929,7 +931,7 @@ Nothing here blocks this half: each has a workaround above.
| H6 | Avatars and icons as attachments (`Image.attachment_id`, content-addressed cache) instead of channel-0 paths. |
| H7 | The UI on the replica (Phase 5): the old-model projection and F1-F10 go; `u16` client ids widen to `u32` participants. |
| H8 | Reconnect with backoff, resume tokens and persisted cursors move to `voelin-sdk` once it exists; the engine consumes the SDK. |
| H9 | Move `src/ts/` (with its live tests) to `voelin-gateway-ts` (features `basic`, `streams`), first behind a `ts` feature of `voelin-core`, then by git tag; the exit check of plan step 6, `cargo tree -p voelin-core -e normal \| grep -E 'tsclientlib\|tsproto'` empty, holds after H1-H3 and this. Two edges run from the engine into `src/ts/` and have to be cut first: `Backends::default` registers `ts::TsConnector` (the `ts` feature makes it optional), and `link/project.rs` and `link/session_link.rs` import `ts::ts_session::{entities::user_uid, ids}`, the id and uid rule that the projection undoes the synthetic ids with (it moves to the engine side, or into `voelin-model`'s replica conversion, which already has `uid_text`). |
| H9 | Move `src/ts/` (with its live tests) to `voelin-gateway-ts` (features `basic`, `streams`), first behind a `ts` feature of `voelin-core`, then by git tag; the exit check of plan step 6, `cargo tree -p voelin-core -e normal \| grep -E 'tsclientlib\|tsproto'` empty, holds after H1-H3, H5 and this (17.6 has the complete list of the edges between the engine and `src/ts/`, the stream split and the other crates that carry `tsclientlib`). The first two to cut run from the engine into `src/ts/`: `Backends::default` registers `ts::TsConnector` (the `ts` feature makes it optional), and `link/project.rs` and `link/session_link.rs` import `ts::ts_session::{entities::user_uid, ids}`, the id and uid rule that the projection undoes the synthetic ids with (it moves to the engine side, or into `voelin-model`'s replica conversion, which already has `uid_text`). |
### 11.3 Coordination
@@ -1634,9 +1636,112 @@ were fresh compose projects (`down -v`, `up -d`) for each smoke run.
### 17.6 Follow-ups
- **H9 gains two edges to cut** (11.2): `Backends::default` and the use of
`ts::ts_session::{entities::user_uid, ids}` in `link/project.rs` and
`link/session_link.rs`.
- **H9 starts from the complete edge list below.** The Opus gate of the merge
(2026-10-24) found that 11.2 names two edges and the tree has more. Each
line was checked with `rg` and `cargo tree` on the tree of the follow-up
round (`phase4/seam-followups`); file lines are given where the file did not
change in the round, items by name where it did.
1. **From the engine into `src/ts/`**: what has to be cut or moved before
`ts` can leave the crate.
| Where | What | Goes with |
|---|---|---|
| `link/backends.rs` | `use crate::ts::TsConnector`; `Backends::default` registers `TsConnector::new()`; `Backends::register_teamspeak(TsConnector)` is the only public way to register an in-process connector and goes through the crate-private `register_local(Arc<dyn LocalConnector>)` | H9: the `ts` feature makes `default` optional |
| `link/project.rs:20-21`, `link/session_link.rs:565, 973, 1328` | `ts::ts_session::entities::user_uid` and `ts::ts_session::ids::{self, FOREIGN_SYSTEM}`: the id and uid rule the projection undoes the synthetic ids with | H9: to the engine side, or into `voelin-model`'s replica conversion (`uid_text`) |
| `gateway.rs:98, 1209` | `ts::identity::{from_blob, to_blob}`: 98 is `login_identity` (the blob to the `tsclientlib::Identity` the gateway login is made of), 1209 is a test | H5: the gateway becomes a `Session` and takes the blob as a credential |
| `lib.rs:69` | `pub mod ts`: the public paths `voelin_core::ts::{identity, versions, TsConnector}` | H9: they move or are re-exported |
| outside the crate: `tools/voelinctl/src/{engine,identity,versions,client}.rs`, `crates/voelin-ui/src/{app,servers}.rs` and `settings_pages/bind.rs`, `crates/voelin-ui-vm/src/settings_pages/logic.rs`, `crates/voelin-core/tests/gateway.rs` | users of `voelin_core::ts::identity::*` and `ts::versions::*` (`to_blob`, `Found`, `import`, `import_new`, `discover`, `read`, `write_export`, `improve_level`, `LaunchImport`, `DEFAULT_NICKNAME`, `resolve`, `native_version`, `known_versions`, `client_metadata`) | H9: re-point to the new crate (`crates/voelin-ui*` belong to `phase5/ui-vm-2`) |
| docs: `lib.rs:8` (`ts::TsConnector`), `lib.rs:129` (`Command::ObserveGateway`: `ts::identity::to_blob`), `gateway.rs:103` (`to_blob`), `settings.rs:1138` (`import_new`); in `link/mod.rs` the module doc (`TsConnector`), `VoiceOptions::identity` (`to_blob`) and `VoiceOptions::client_version` (`ts::versions::resolve`) | intra-doc links into `ts`, which `cargo doc` with `-D warnings` resolves only while `ts` is in the crate | H9: reworded, or pointed at the new crate's docs |
A TeamSpeak connector in another crate has only
`Backends::register(Arc<dyn Connector>)`: `register_teamspeak` takes the
crate's own `TsConnector`, and `LocalConnector`, `LocalCtx`,
`LocalConnected` and `StreamPort` are crate-private. A plain `Connector`
is handed neither the `LocalCtx` (the event bus, `audio`, `stream_peer`)
nor a `StreamPort` (`Backends::connect` makes its `LocalConnected` with
`streams: None`), so its sessions have no TeamSpeak 6 streams. Streams
across the crate boundary need H2 first, or a public extension trait that
takes the place of `LocalConnector`.
*Test-only* edges, which move with the tests of each side:
`link/tests.rs` and `link/fake_link_tests.rs` (lines 30-31 of both) use
`ts::ts_session::LinkConnector` and `ts::{ConnectOptions, ServerLink}`;
the tests of `link/session_link.rs` use `ts_session::{backend_to_v1,
features_of}`; `link/tests.rs` uses the helpers
`ts::identity::{json_with_a_cut_key, assert_holds_no_piece_of}` and
`tests/session_fake.rs` builds a `tsclientlib::Identity` and runs
`Backends::default()` in one test (both from this round, with the gate's
minor).
2. **From `src/ts/` into engine-private items**: the reverse edges.
| Module of the engine | Items `src/ts/` uses |
|---|---|
| `crate::link` | `LinkCmd`, `LinkEvent`, `LinkCtx` (its `session`, `events`, `frames`, `settings`, `emit`, `done`), `Remote`, `BoxRead`, `BoxDuplex` (`ts/voice.rs`, `ts/ts_link.rs`, `ts/ts_session/driver.rs`); `LocalConnector`, `LocalCtx`, `LocalConnected`, `StreamPort`, `VERSION_PARAM`, `without_query` (`ts/ts_session/mod.rs`); `StreamEvent` (`driver.rs`) |
| `crate::stream` | `StreamCmd` (`voice.rs`, `driver.rs`), `StreamHandle`, `StreamInput` (`voice.rs`) |
| `crate::files` | `FileEntry`, `RequestId`, `TransferState`, and the functions `normalize_dir` and `join_path` (`voice.rs`, `driver.rs`) |
| `crate::offline` | `OfflineMessage`, `OfflineMessageInfo` (`voice.rs`, `driver.rs`) |
| the crate root | `Event`, `JoinFailure`, `BackendInfo`, `POKE_MESSAGE_MAX` |
| `crate::settings` | `SharedSettings`, through `LinkCtx.settings`, which `voice.rs` hands to the stream task |
| tests only | `crate::link::{Backends, VoiceOptions, connect_params}` (`ts_session/mod.rs`, `live_tests.rs`), `crate::link::media::TalkTracker` and `crate::link::project::{View, presence}` (`ts/book.rs`), `crate::settings::{SharedSettings, Settings}` and `crate::files::{Report, Sink}` (`ts/voice.rs`) |
Together with the first list this is a cycle: `voelin-core` would need
`voelin-gateway-ts` for `TsConnector` and the uid rule, and
`voelin-gateway-ts` needs `voelin-core` for every item above. So the "by
git tag" step of H9 needs **H1 and H2** (the TeamSpeak side speaks v1
through `Session`, which takes the place of `LinkCmd`, `LinkEvent`,
`LinkCtx`, `StreamPort` and the stream task's input) **or a shared
vocabulary crate** that holds the items above for both sides. Without
one of the two, only the first step, the `ts` feature of `voelin-core`,
is possible.
3. **What else keeps `tsclientlib` and `tsproto` in the tree.** The exit
check (`cargo tree -p voelin-core -e normal | grep -E 'tsclientlib|tsproto'`
empty) is not met by moving `src/ts/` alone:
- `voelin-core` itself: its four direct dependencies (`tsclientlib`,
`tsproto`, `tsproto-packets`, `tsproto-types`) leave with `src/ts/`,
but `gateway.rs` uses `tsclientlib::Identity` (`login_identity`,
`connect_watched`, `attempt`: H5) and `stream.rs` uses
`tsclientlib::ClientId` (item 4).
- Three more crates of `voelin-core`'s tree carry the dependency:
`voelin-store` (`store.rs` and `keystore.rs` take, read and check a
`tsclientlib::Identity`), `voelin-stream` (`proto.rs`, `session.rs`,
`discovery.rs`: `tsclientlib::{ClientId, InMessage, messages::c2s}` and
`tsproto_packets::packets::OutCommand`; H3 splits it) and
`voelin-gateway-proto` (`auth.rs`, `client.rs`:
`tsproto_types::crypto::EccKeyPrivP256`, the key of the gateway login;
H5). `cargo tree -p <crate> -e normal` shows it for each of the three.
- `voelin-query` and `voelin-observer` have none, so `query.rs` using
`voelin_query` is not an edge of the exit check; it goes with H5
because the query observer becomes a `Session` of a gateway daemon.
- So the exit check needs H1-H3, **H5**, a way for `voelin-store` to
handle a TeamSpeak identity without `tsclientlib`'s type, and H9.
4. **`stream.rs` must be split.** Stays with the engine: `StreamState`,
`WatchState`, `StreamFrame`, `StreamSink` and `LayerFormat` (public API),
`StreamCmd`, `OwnStreamEvent`, `kind_name`, `parse_kind` and
`parse_srtp_profiles` (`session.rs`), `media_codec` (`media.rs`) and the
re-exports of `stream_types` (`StreamInfo`, `StreamKind`, `StreamSetup`,
`ViewerInfo`, ...). Goes with the TeamSpeak 6 task: `StreamHandle`,
`StreamTask` and its helpers, `StreamInput`, the `StreamLookup` over the
gateway directory, and every use of `tsclientlib::ClientId` (the engine's
own ids are `u16`; `stream.rs` wraps them for `voelin-stream`).
5. **The engine API docs that link into `ts` move with it** (the last row of
the table of item 1): `VoiceOptions::identity` and
`Command::ObserveGateway` link `ts::identity::to_blob`,
`VoiceOptions::client_version` links `ts::versions::resolve`.
- **The same leak in `voelin-store`, not closed.** `Store::identity` and
`Store::identities` read the stored JSON of a TeamSpeak identity with `?`, so
an `Error::Json` whose text is the `serde_json` message, which quotes a key
that does not import, as the gate's minor did in the connector. The rows are
written from a `tsclientlib::Identity` (`add_identity`), so a damaged
database is the only way to such a row; the key store (`keystore.rs`) drops
the parse error for the same reason. `ts::identity::from_json` cannot be
used there (`voelin-core` depends on `voelin-store`); the fix is the same
classification in `voelin-store`, or `from_json` moved down.
- The bookmark tests of `link/connect.rs` that still sit in
`ts/ts_session/mod.rs` (17.2) belong next to it.
- `QueryLogin.allowlisted` goes with the query observer (H5), which becomes a
@@ -1720,3 +1825,98 @@ included.
The last bullet of 17.6 (documents that still name the old paths) is closed by
`76a884a`; the others stand.
### 17.8 The round after the gate (`phase4/seam-followups`)
The Opus gate of the merge (`c60acf9`) accepted it with one minor and notes for
H9. This round, on `phase4/seam-followups` from `c60acf9`, closes the minor,
writes the notes down (17.6) and deals with the five tests that failed on
their own on `main`. No history was rewritten. The `mao-*` agents were not
registered in the session, so a general-purpose agent played
`mao-implementer`, attempt 1.
| Commit | What |
|---|---|
| `a856f90` | The gate's minor. `ts::identity::from_json` is the classification `from_blob` had (malformed, cut short, not an identity, unreadable, with line and column, never the value), taking the JSON text; `from_blob` and `ts_session::inner_options` both use it. `inner_options` had put the `serde_json` error into the text, and `tsproto`'s key reader reports a key that does not import as `invalid_value(Unexpected::Str(key), ..)`, so the key reached `LinkEvent::Disconnected(Some(text))`, `Event::Error` and the status line. A credential that is not UTF-8 is "it is not text". Four tests, each with a key that lost its last two characters and none holding 8 characters in a row of the key: `identity::tests` (which also asserts that the reader's own message does quote it), `ts_session::tests` (`inner_options`), `link::tests` (the `Disconnected` text through `SessionLink` and the real connector) and `session_fake` (`ConnectVoice` through the engine with `Backends::default()`: the `Disconnected` state, the `Error` event and every event after it). The three connector-side ones fail with the `serde_json` text put back. |
| `563482d` | `VoiceOptions::nickname` and `server_password` have their docs; `Backends::set_account` says that no connector reads `ConnectParams.account` yet and that H4 moves the myTeamSpeak proof to it. |
| `96ff0e0` | The edge list of 17.6, and the H9 row of 11.2 pointing to it. |
| `9254e08` | `identity::tests::improve_level_keeps_the_key`. |
| `0d67dd7` | `voice_features::contacts_are_kept_in_the_database`. |
| `4be37e1` | `session::banner_tests::a_failing_banner_is_logged_once_with_its_address`, through `web::tests::info_lines`. |
| `e614a1c` | `discover::tests::without_records_the_gateway_itself_is_asked`. |
| `a90bb70` | `web::tests::pictures_go_through_the_proxy_named_for_each_hop`. |
| `c35bbb5` | `voelin-platform`'s `proxy::the_portal_names_the_proxy`. |
**The five flakes: all fixed, none recorded as known.** Two of the fixes are
rewrites of a test helper and a test, not one-line edits.
- `improve_level_keeps_the_key`: a fresh `Identity::create()` stops at the first
counter of level 8 or more and about one in 32 has 13 already, which
`improve_level` returns as it is. The test asks for three levels above what
its identity has. 8 failures in 300 runs of the single test before, 0 in 300
after.
- `contacts_are_kept_in_the_database`: 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
for the 5 s busy timeout only and fails with `DatabaseBusy` when a loaded
disk makes the close slower. A connection was still open (the `-wal` file
still there) in 23 of 24 instrumented runs, and 10 of those 24 (eight at a
time on a loaded machine) failed. The test now waits for the `-wal` file to
go (SQLite deletes it when the last connection closes) before it reopens.
With every fsync of the test process delayed by 6 s (`strace -f -e
inject=fsync,fdatasync:delay_enter=6000000`) the old test fails every time at
the reopen, and the new one passes.
- `a_failing_banner_is_logged_once_with_its_address` (`lines == []`):
`web::tests::info_lines` read the log with `tracing::subscriber::with_default`.
While that scoped subscriber is the only one alive, `tracing-core` registers
a callsite that another test's thread meets first against that thread's own
default (none) and the callsite stays disabled for every thread
(`callsite::Dispatchers::rebuilder`, `has_just_one`). Several tests of
`banner_tests` reach the same callsite through `image_finished`. The helper
now installs one recording subscriber as the global default the first time
and records into a buffer per thread. A new test (`info_lines_see_a_callsite_
another_thread_met_first`) fails with the old helper (`lines == []`, the
failure that was seen) and passes with the new one. The old helper failed 1 of
300 runs of `banner_tests`, the new one 0 of 600. The failure of the whole
suite did not occur in the twenty full runs below, so the evidence for this
fix is the mechanism, the new test and these rates.
- The two `localhost` tests fail where `localhost` resolves to `::1` only (the
servers of the tests listen on 127.0.0.1). The discovery test's `probing`
helper and the test SOCKS proxy dial `localhost` at 127.0.0.1; what the tests
check (the name the gateway is asked at, the name the proxy is given) is
unchanged.
- `the_portal_names_the_proxy` did not need `dbus-run-session` only: with a
session bus, on the desktop's or on a private one made by plain
`dbus-run-session`, it failed here three times out of three at "the portal
leaves the bus", because the bus can start the real `xdg-desktop-portal` by
name, which the first call after the stand-in has left does, and the real
one answers instead of the "missing for a minute" the test expects. The test
now runs itself again under `dbus-run-session` with a bus configuration of
its own, a session bus without service directories. Without
`dbus-run-session`, or when the bus does not come up, it prints "skipped,
nothing was checked" and the reason and passes. On the bus with the default
services the same test still fails (checked by hand).
**What ran.** The environment of 17.7, taken again: `nix shell` of `gcc cmake
gnumake pkg-config jq` and the `.dev` outputs of `alsa-lib openssl libvpx dav1d
pipewire fontconfig freetype libxkbcommon expat`, with `PKG_CONFIG_PATH` (the
`.dev` outputs), `LIBCLANG_PATH`, `BINDGEN_EXTRA_CLANG_ARGS` (`-isystem` the
`glibc.dev` headers: `libspa-sys` fails without) and, to run the binaries it
builds, `LD_LIBRARY_PATH` (the `.out` outputs of those: `libvpx.so.12`) set by
hand, and the 1.94 and nightly toolchains from their store paths in front of
`PATH`. The `dev rust-nightly` shell does not build here (`cargo-llvm-cov`).
With that, `cargo check --workspace --all-targets --locked` passes on 1.94, the
`voelin-ui`, `voelin-ui-vm`, `voelinctl`, `voelin-gateway` and `voelin-android`
targets included.
| Check | Result |
|---|---|
| `cargo fmt $(scripts/own-crates.sh) --check` | 1.94: clean at the head and at each of the nine commits, checked out detached one by one. `cargo fmt --all --check` as such is not clean at `c60acf9` on any toolchain: it includes the vendored `crates/proto`, which formats with upstream's nightly configuration, and the nightly `rustfmt` also reformats own files that 1.94's leaves alone (the CI runs the form above). |
| `cargo clippy -p voelin-core -p voelin-platform --all-targets --locked --no-deps -- -D warnings` | 1.94: clean at each of the nine commits, checked out detached one by one. |
| `cargo test -p voelin-core --locked --lib`, ten times in a row, no exclusions | Nightly: ten runs, each 252 passed, 2 ignored. 1.94: the same ten times. (The baseline of 17.5 and 17.7 had two failures in each run and needed `--skip`.) |
| `cargo test -p voelin-core --locked`, once | Both toolchains: green. Integration tests: `gateway` 9, `live` 6 and `stream_live` 3 (they skip without `VOELIN_LIVE`), `session_backends` 2, `session_fake` 20 passed and 2 ignored, `settings` 1, `voice_features` 3. |
| `cargo test -p voelin-platform --locked` | Both toolchains: 24 lib tests, `crash` 3, `proxy` 1 (on its own bus), `x11` 1 (skipped without a display), 2 doc tests. |
| `RUSTDOCFLAGS=-D warnings cargo doc --no-deps -p voelin-core --locked` | 1.94 and nightly: clean. |
| `Cargo.lock`, `THIRD_PARTY_NOTICES.md` | Unchanged: `git diff c60acf9 -- Cargo.lock Cargo.toml` is empty, so there was nothing to regenerate. |
| `scripts/it-smoke.sh ts3 ts6`, on `c60acf9` (before) and at the head (after) | The stack of `VoelinGateWay/dev/docker-compose.yml` as a compose project of its own (`voelin-seam-followups`), the state directory under the scratch directory. On a fresh stack each (`down -v`, `up -d` before each): both pass every per-server scenario of ts3 and ts6 (connect and tree, server and channel chat, voice tone, invisible presence, relay, gateway, history, pins and reactions, the engine's voice features, the TeamSpeak 6 streams), the TeamSpeak session module stage (12 passed, 2 ignored; 16.38 s before, 16.73 s after) and fail in the same place, the engine stage at `ts6_banners` (`live.rs:396`, 5 passed, 1 failed), the failure 17.5 and 17.7 record. Two more runs on the first stack, which was no longer fresh (before, then after), gave the same: the outputs have 100 lines each and differ only in ids, counters, tone ratios and the number of tests filtered out of the module stage (236 before, 240 after: this round's four unit tests). The very first run, on `c60acf9` on the first stack, stopped earlier, at the first gateway request of the admin identity of ts3 (`config_set` not answered, observe stayed `Connecting`); it did not repeat on the fresh stack at `c60acf9`, nor in any later run, and was not chased. |