The checks action exports it through GITHUB_ENV, which depends on the runner
handing a composite action's environment file on to the later steps of the
job. If a runner did not, Cargo would silently go back to its built-in git
client, which cannot use the deploy key's IdentityFile, and fail with a
confusing authentication error in the first cargo command. The workflow-level
env does not depend on that, so both are set; the access check step still
exercises the key, the host key and the ssh configuration through git.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/ci.md gets a "VoelinProtocol access" section: why every cargo command
needs the access (Cargo resolves the whole workspace, so the gateway image
needs it too), the deploy key and the repository secret
VOELIN_PROTOCOL_DEPLOY_KEY, what the checks action, the release workflow and
the Dockerfiles do with it, why Cargo is told to use the system git, the
committed host key line with its fingerprint and the two commands that
re-check it, the effect on fork pull requests, and what each failure message
means. The runner setup no longer says that a fresh checkout does not build
there. docs/building.md says that the Docker builds need an ssh-agent with a
key that can read VoelinProtocol (--ssh default) and summarises the CI setup;
the plain docker build commands in it and in docs/gateway-admin.md gain
--ssh default, without which they would now stop at the cargo step.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every cargo command in the images (linux, windows, android and the gateway
image) failed for the same reason as the CI job: Cargo resolves the whole
workspace, which includes the git dependency voelin-identity on the private
Voelin/VoelinProtocol repository, and the images had no SSH access to it. The
crates that depend on voelin-identity are voelin-store and, through it,
voelin-core, voelin-ui, voelin-ui-vm, voelin-android and voelinctl; the
gateway crate does not, but `cargo build -p voelin-gateway` fails without
access too (checked with an empty CARGO_HOME), so its Dockerfile needs the
same.
Each cargo RUN gets --mount=type=ssh,required=true: the build is handed the
caller's ssh-agent (docker build --ssh default), the key stays in the agent
and never reaches a layer or the build context, and a build without --ssh
fails at that step with "unset ssh forward key default". The build stage
copies the host key committed in .gitea/known_hosts to
/etc/ssh/ssh_known_hosts and sets CARGO_NET_GIT_FETCH_WITH_CLI=true, so that
Cargo uses the system git and ssh. The toolchain stages install git and
openssh-client where they were missing; the gateway Dockerfile gets the
syntax directive the others already have. scripts/docker-build.sh passes
--ssh default and stops early, with a message, when ssh-add -l shows no agent
or no key.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Docker builds run cargo, which has to fetch the private VoelinProtocol
repository over SSH. After checkout the workflow now loads the deploy key
(secret VOELIN_PROTOCOL_DEPLOY_KEY) into a new ssh-agent through stdin, so
the key is never written to the runner's disk and never reaches an image
layer, and exports SSH_AUTH_SOCK and SSH_AGENT_PID for the later steps. The
agent is started with a nine hour key lifetime and stopped by a last step
that runs even after a failure, because the release runner is a persistent
host. The gateway image, which is built with a plain docker build and not
through scripts/docker-build.sh, gets --ssh default; the Dockerfiles use it
in the next commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The workspace depends on voelin-identity from Voelin/VoelinProtocol over SSH,
and the job container had no key and no known_hosts, so the first cargo
command failed with "unknown SSH host key" (runs 1037 and 1050).
The checks action takes the private half of a read-only deploy key as the
input protocol-deploy-key (secrets are not visible inside a composite action,
so ci.yml passes ${{ secrets.VOELIN_PROTOCOL_DEPLOY_KEY }}). Its first step
fails at once, with a message that names the secret, when the input is empty
or not a private key; it writes the key to ~/.ssh/voelin_protocol (0600),
appends the host key line committed in .gitea/known_hosts, writes a Host
block for git.faumaray.com (User gitea, IdentityFile, IdentitiesOnly,
StrictHostKeyChecking yes) and sets CARGO_NET_GIT_FETCH_WITH_CLI=true and
GIT_SSH_COMMAND for the rest of the job: Cargo's built-in git client cannot
use an IdentityFile, the system git and ssh can. The key reaches the step
through the environment only, is never echoed, and only the public
fingerprint is printed. A second step, after the system packages, runs
git ls-remote against VoelinProtocol, so a wrong key or a changed host key
fails there and not minutes later inside a cargo command.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cargo reaches the private VoelinProtocol repository over SSH and, in a fresh
job container or image, has no known_hosts: every cargo command failed with
"unknown SSH host key" (runs 1037 and 1050). The server (Gitea's built-in SSH,
SSH-2.0-Go) offers an RSA host key only; the line is committed here, after
checking its fingerprint (SHA256:fugBYnqAnqmTLsGpafVgQF9gPQzJqps7uHvs48blg2A)
against ssh-keyscan and Cargo's own report, so that jobs trust the reviewed
key instead of fetching one while they run. The next commits use it in the
checks action, the release workflow and the Dockerfiles.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Shared view-model types (ImageSource, Rgb, list diffing), the view models,
the BBCode reader and the Twemoji archive, SessionView/Tab/Msg and the App
state moved out of the Slint crate into voelin-ui-vm; the Slint crate keeps
adapters and bindings (studio and settings split into logic and bind).
Opus gate accepted with five minors left as follow-ups (server_tint falls
back to black, ImageSource::size reads headers only, convert::image does
not check the RGBA length, docs/ui.md metric wording, field docs on the
mirrored bridge structs).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The items moved from a private module of voelin-ui, where they needed none;
as public API of the new crate they get a line each. The fields of the bridge
structs, which mirror bridge.slint field by field (module docs), and a few
self-describing fields and variants are left as they are.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The text said 49 (the plan's figure); bridge.rs has 51 and studio_bridge.rs
10, and MytsBadge and MytsForm stay in Slint.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The asset list in about-assets.md (and the copy appended to
THIRD_PARTY_NOTICES.md) put all bundled assets in crates/voelin-ui; the
archive moved with the emoji reader. Cargo.lock only gained the own crate,
so no third-party entry changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Newer clippy (nightly) reports explicit_counter_loop for the sample
messages' id in dev.rs, which failed `cargo clippy -D warnings` on nightly
for voelin-ui. Same ids, 1 upwards.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/ui.md: the structure of voelin-ui-vm and voelin-ui, a "Two crates"
section (values, lists, conversion, state, logic/bind) and the written list
of the controllers that still interleave logic with Bridge writes, with
their .set_ counts, for the next round; the pointers to the moved files
(Twemoji archive, BBCode reader, settings pages, studio) are corrected.
docs/architecture.md: the crate table has voelin-ui-vm. README.md and
CHANGELOG.md name the new crate. Module comments that pointed at studio.rs
and vm/ point at studio/ and the crate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
studio.rs (62 Bridge writes) is split like the settings pages. What the
studio decides lives in voelin_ui_vm::studio::logic:
- StudioData, the state apart from the running parts (settings, scenes,
status, statistics, destination, stream, pickers, overlays), with the
bitrate and layers a stream starts with, the hidden-tick counter, the
preview size, the destination choice, the stream settings form and the
header/bottom-bar status (status_view, with the front end's side passed
in as a StatusContext), the overlays the switches ask for;
- where the stream goes (destinations, their names and rows, the channel
tab of the stream chat), the stream settings panel's edits, the output,
the layer, source, picker and mixer controls (source_action,
source_change, camera/screen/audio pickers, main_source_changes), the
studio settings dialog, event and ending texts;
- the studio's own settings type and key (StudioUi, STUDIO_UI), the demo
studio's sample scenes, viewers, stream and chat message.
voelin-ui keeps studio/mod.rs (StudioState: the models, the running
studio, the windows, the mixer handles, plus StudioData) and studio/bind.rs
(the engine tasks, the preview, the encoder, the two windows' StudioBridge
writes, the camera and screen listing, the chat and stream commands). The
demo settings return their problems instead of logging them. SessionView
and Tab methods that need no Default list type no longer ask for one.
28 new tests cover the logic.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
settings_pages.rs had 52 Bridge writes interleaved with what the pages
show and change. The decisions now live in
voelin_ui_vm::settings_pages::logic and work on the settings service, the
AppState and the plain bridge rows:
- the forms read from the settings (video, streaming, notifications,
privacy, advanced), the layer and audio-source rows and the filtered list
of all settings;
- the settings written from the forms (apply_video, apply_streaming,
layer, audio source, SRTP profile, notification, privacy and advanced
edits), each returning the messages for the status line instead of
writing them;
- the Integrations rows (gateways, configuration keys, permission rules,
encoders and decoders with their status texts) and the Profiles rows
(identities, bookmark pickers, what an import found, the account form);
- the pages' own state (PagesState, Improving), the layer, preset and
codec helpers, allowed_index/of and origin_label, with the tests that
went with them and tests for each of the above.
voelin-ui keeps settings_pages/{mod,bind}.rs: Pages (PagesState plus the
camera preview and the audio-app watcher), the Bridge and model writes, and
what a change sets going (camera, engine, identity store, threads). A
message the logic returns is logged and shown as before; the one visible
difference is that the "A layer needs a size" hint is logged with it.
serde_json becomes a regular dependency of voelin-ui-vm (the JSON typed into
the Advanced list); the lock file is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A sign-out finishes when a row's binding columns cannot be read; deleted
keys are overwritten (secure_delete) and the log is truncated once per
sign-out with a short wait; the device key refuses a synced binding; the
unbind step keeps non-text data byte for byte; rustls and yoke-derive
updated, wasapi ignored until 2026-12-20. Two Opus gates accepted; the
last left two minors (wording of where deleted bytes may stay; a test
that counts the checkpoint) as follow-ups.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sessions and their chat tabs, the downloads, pins and linked pictures,
and the data the screens share (the servers, the settings, the dialogs'
targets, the share and watch bookkeeping) no longer live in the Slint
crate. `SessionView<L>` and `Tab<L>` are generic over the list type of a
tab's chat lines: the Slint app plugs in `Rows<ChatLine>`
(`app::ChatRows`), a GPUI view can use a plain `Vec`. `App` keeps one
`AppState` in `state` and the Slint models; every `self.sessions`,
`self.current`, `self.bookmarks`, ... becomes `self.state.<field>`.
server_icon and server_icon_for stay with the session: `ImageRef` is
toolkit-free now, so they need no adapter. Tests for the tab and session
logic (private chat focus, tab removal, read markers, the divider) are
new, since that logic could not be tested without the Slint crate before.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KeyStore::get reads a data column that is a BLOB, or TEXT of bytes that are no
UTF-8, as text with the odd bytes replaced. The sign-out's unbind step puts that
text back with the binding removed; REBIND (data = ?3) matches nothing for such
a row, so put fell through to the full write: the lossy string replaced the
original bytes (invalid UTF-8 became U+FFFD, a BLOB became TEXT), and for a
TeamSpeak row the replaced text is no identity, so check_teamspeak refused it
and the sign-out could never finish for that row.
- put() now tries a second statement when REBIND changed nothing:
rebind_stored_bytes reads the stored data raw and, if it reads (lossy_text) as
exactly the blob's JSON, updates only the four binding columns by (kind, uid)
(REBIND_BYTES) and returns without check_teamspeak, so the original bytes are
kept and the TeamSpeak case unsticks. Any other JSON is a new identity for the
uid, checked and stored as before.
- The doc sentences at the top of keystore.rs (what a binding-only put and a
non-text data column mean) and docs/architecture.md are narrowed to what holds:
the bytes are kept for the text get returned, any other text replaces them.
Tests: the gate's probe (a bound voelin row with data x'7b2276223aff317d', two
future-kind rows, one a BLOB and one TEXT of no UTF-8, and two TeamSpeak BLOB
rows, one of a good identity and one of garbage): sign_out(Auto) and
sign_out(Forget) are Ok and every data value is byte-identical afterwards; a put
of what get read changes the binding and keeps the bytes; a put of other data is
checked and replaces them. The three tests fail on the previous code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Store::truncate_wal ran PRAGMA wal_checkpoint(TRUNCATE) with the connection's
busy timeout of five seconds. A checkpoint that truncates holds the writer lock
of the log while it waits for readers, so a reader that kept a snapshot made
every removed row cost the whole timeout with the store's mutex held, and other
writers failed with "database is locked" meanwhile. KeyStore::sign_out removes
up to four rows (the synced copies, the device key, the record) and ran the
checkpoint after each: 20 s and failing writers in the gate's probe.
- truncate_wal now sets a busy timeout of 150 ms (CHECKPOINT_WAIT) around the
pragma and restores the timeout the connection had (read back with PRAGMA
busy_timeout, so a value set by a caller survives) whatever the checkpoint
returned. A blocked checkpoint still leaves the delete standing and warns.
- SqliteKeyStore overrides sign_out: the trait's own steps run on a private
SignOutPass whose remove deletes the row and notes it, and the sign-out
truncates the log once after its last step (also when a step failed, the
removals before it have happened). KeyStore::remove on its own still
truncates after the row it removed.
- The three sentences that said the bytes "stay in the log until the next
checkpoint" (keystore.rs, Store::truncate_wal, docs/architecture.md) are
corrected: they go when a later checkpoint truncates the log, later writes
overwrite those frames, or the last connection closes and the log is deleted.
Tests: with a raw connection holding a read snapshot, a sign-out with four
removals returns in about 170 ms (it took 20 s) while a writer on another
connection with a one-second busy timeout writes throughout without an error
(it got "database is locked" nineteen times), and the next removal after the
reader is gone truncates the log again; a unit test shows a blocked
truncate_wal returns in under a second, leaves the log, and restores a
non-default busy timeout, and that the same call truncates once the reader is
gone. Both tests fail on the previous code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
vm/{avatar,tree,servers,streams,home,chat,social,studio} and the UI
settings (settings.rs: keys, UiSettings, LastVoice, ClientPlaybackMap,
the audio form) move into voelin-ui-vm with their tests (102 there now;
the 86 view-model tests of voelin-ui all survive, the old list::sync test
became the list::diff tests). They produce the plain bridge structs, with
Rgb for colours and ImageRef for pictures:
- a file picture is ImageSource::File { path, stamp }: the engine writes
a picture that arrives again into the same file, so the length and
write time are part of the reference and a changed file redraws its
row; size() reads the header once per stamp (no toolkit decoder);
- pictures held in memory (chat previews) are ImageSource::Memory;
- the line cache of the chat no longer keeps Slint models alive for
pointer equality: plain lines compare by value, so an unchanged
message makes the same line with or without the cache.
voelin-ui keeps every model as bind::rows::Rows<T>: the plain rows last
shown plus the VecModel, synced with list::diff, converting only the rows
that changed (bind/convert has the From impls). The controllers hand the
view-model rows to Rows::sync and convert forms at the bridge
(`.into()`); crate::vm is now `voelin_ui_vm as vm`, so paths stay.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both are pure (no Slint): vm/bbcode.rs and emoji.rs with their tests and
the packed archive (assets/twemoji.bin, with its license note; the
packing script writes it there). voelin-ui keeps the paths
crate::vm::bbcode and crate::emoji as re-exports until the callers move.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New crate voelin-ui-vm with no UI toolkit in its tree: ImageRef
(Arc<ImageSource>: File, Rgba, Svg, Memory, None, with size()), Rgb for
colours, list::diff(old, new) -> Changes (updates, removals and
insertions by index) and the bridge structs as plain Clone + PartialEq
values (the 51 of bridge.slint without the account's two, and the 10 of
studio-bridge.slint). Strings are Arc<str>, lists Vec.
voelin-ui keeps the temporary seam: From impls between every bridge
struct and its Slint twin (bind/convert), and bind/rows.rs, which applies
Changes to a VecModel and converts only the rows that changed. The
viewer's quality list is the first model on it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cargo deny check failed on the advisories of the base lock:
- rustls 0.23.45 (RUSTSEC-2026-0346 to 0349: Debug output of client session
values, buffered data after ECH rejection, unbounded brotli certificate
decompression, ServerHello downgrade): cargo update -p rustls --precise
0.23.46, which the advisories name as the fix.
- yoke-derive 0.8.3 was yanked: cargo update -p yoke-derive --precise 0.8.4.
- wasapi 0.24.0 (RUSTSEC-2026-0332, unsound WaveFormat::parse): the fix is
wasapi 0.25.0, a breaking release of a Windows-only dependency of
voelin-media, which the Linux CI can neither build nor test, so it is not a
semver update. voelin-media never calls WaveFormat::parse (it only builds
formats with WaveFormat::new). deny.toml ignores the advisory with that
reason and a date: remove by 2026-12-20, by upgrading wasapi on a Windows
machine. cargo-deny cannot enforce the date; the comment and the reason say it.
Cargo.lock changes only those two packages (cargo's re-resolution also moved
tempfile to getrandom 0.3.4; that is put back to 0.4.3 by hand so the diff is
the advisories' and nothing else; cargo metadata --locked accepts it).
THIRD_PARTY_NOTICES.md is regenerated (scripts/notices.sh, cargo-about 0.9.2)
for the two version numbers.
cargo deny --locked --workspace check: advisories, bans, licenses and sources
ok.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KeyStore::sign_out deletes every identity bound with synced = true in its
first step, before it reads the account record that says which Voelin key is
the device key and whether it predates the account. A device key stored with
synced = true was therefore deleted even where the record says to keep it.
Nothing in this crate stored such a key, but the store accepted it.
SqliteKeyStore::put now refuses, with an error that names the key and the
record and says why, a voelin blob with synced = true while an account record
names its uid as the device key, and also while an account record cannot be
read (it may name the key, and the sign-out would delete it on that guess).
The state is also reached from the other side, so a put of an account record
whose device key is already stored as a synced copy is refused as well. A
binding with synced = false is accepted: a sign-out unbinds it and then follows
the record. The check runs before the binding-only fast path, so a put of the
key's own data cannot rebind it as synced.
Documented in keystore.rs and docs/architecture.md. Tests cover the refusal
for records that keep and that delete the key (the error text, the row left
untouched, the sign-out still following the record), another key that may be
synced, no record or a record naming another key, a record put naming a synced
copy, and unreadable records; the three refusal tests fail without the check.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SQLite's secure_delete was off: a deleted row stayed in the free space of its
page, and the frame of the write-ahead log that held that page kept the key
until the log was reset. Every connection (Store::init) now sets
secure_delete = ON next to foreign_keys, and Store::delete_identity and
KeyStore::remove (how a sign-out deletes the device key, the synced copies and
the account record) run PRAGMA wal_checkpoint(TRUNCATE) after a row was
deleted, so the page with the overwritten row is copied into client.db and the
log is empty.
The truncate is best effort: the delete has happened and a sign-out must still
finish, so a checkpoint that another connection blocks, or that fails, only
logs a warning that the bytes stay in the log until the next checkpoint.
Keys deleted before this change stay in the free pages until a VACUUM; the
architecture notes say so.
Tests read client.db and client.db-wal as bytes: the PKCS#8 text of a Voelin
device key (sign-out with Auto, and with Forget), a synced TeamSpeak copy's key,
a TeamSpeak identity deleted by Store::delete_identity and a key removed
through KeyStore::remove are present before and in neither file after, another
key is still stored and the log is empty; and secure_delete reads 1 on every
connection. Each raw-file test fails with either measure taken out.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SqliteKeyStore::list() failed on the first row whose binding columns were
damaged outside this crate (synced = 2 on the account record, say), and
KeyStore::sign_out starts with list() through bound_to(): it never reached the
record, so it could never finish, and DeviceKeyChoice::Forget did not delete
the key it was given either. get() failed the same way where sign_out reads
the record and the device key.
A row whose binding columns cannot be read (refused by
AccountBinding::from_columns, or a value of the wrong type) is now listed and
read as unbound, with a tracing warning that names the row and the reason and
quotes no content. Unbound is the reading that never deletes on a guess: such
a row is not deleted as a synced copy, and a put of it writes four good
columns. A data column that is not text is read as text with the odd bytes
replaced, so a record that cannot be read is deleted by the trait's sign_out
instead of its read failing; a row whose kind or uid is not text cannot be
addressed and the list leaves it out with a warning. list() now fails only
when the database does.
Tests: the gate's probe (UPDATE identities SET synced = 2 WHERE kind =
'account', then sign_out with Auto and with Forget on a store with
bound_existing_key true and false), more damage to the record row, the device
key row and a synced copy, and the unreadable data and kind/uid cases; the
test that asserted the old precise errors of get() and list() now asserts the
unbound reading. The six new tests fail on the previous keystore.rs.
voelin-store gets the tracing dependency (already in the lock); Cargo.lock
changes, THIRD_PARTY_NOTICES.md is unchanged by it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voelin-identity from VoelinProtocol as a git dependency pinned by rev;
the identity migrations as schema versions 6 and 7 (kind column, account
binding columns); voelin_identity::KeyStore on the identities table with
bindings and the account sign-out rules; notices regenerated; the sibling
checkout recipe in docs/building.md. Opus gate accepted with three minors
(damaged binding columns block sign-out, secure_delete off, one commit red
on the notices job) left as follow-ups. Building now needs read access to
the private VoelinProtocol repository (docs/building.md, docs/ci.md).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
architecture.md: a refused TeamSpeak blob says only that it is refused, never
its JSON (a private key), and a put that changes only a row's binding does not
read the JSON again, so a damaged row cannot keep a sign-out from unbinding
it. building.md: moving the protocol pin commits Cargo.lock together with the
notices scripts/notices.sh regenerates; the CI notices job fails on a stale
THIRD_PARTY_NOTICES.md, which is what 015c938 did.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KeyStore::sign_out unbinds a device-only secret by get() and put() of the
same blob with the binding cleared. put() ran check_teamspeak on the data
first, so a bound row whose JSON had been damaged outside this crate made the
put fail on every call: the account record was never reached, and with
DeviceKeyChoice::Forget the order of the sign-out kept the named key from
being deleted by the retry loop the module doc promised was unnecessary.
put() now first tries a statement that rewrites only the four binding columns
of the row of the same (kind, uid) whose data equals the blob's, and returns
if it changed a row. Anything else, a new row or other data, goes through the
check and the upsert as before: damage is not replaced by more damage, a
stranger's key still cannot take over a uid, and another kind's put of a held
uid is still refused. Nothing but the binding of the row is written, so the
name, origin, default flag and creation time stay as they were.
Tests: sign_out (Auto, and Forget with and without bound_existing_key)
completes on a damaged bound row, deletes the record, unbinds the row and
leaves its data as it was; the put cases above; each fails on the previous
commit. The scratch directories of the test file are unique per call now, as
two tests that pass the same name run side by side.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SqliteKeyStore::put checked a TeamSpeak blob by parsing its JSON as a
tsproto::Identity and forwarded serde's error. tsproto's key visitor answers
a key it cannot decode with invalid_value(Unexpected::Str(key)), so the
message read `invalid value: string "<the key text>", expected a P256 private
ecc key`: the private key reached Display and Debug of the KeyStoreError, and
so any log line that reports it.
check_teamspeak now drops the serde error and returns a Backend error of
fixed text (Refused::NotATeamSpeakIdentity). The test puts a blob with a
malformed key string, first checks that serde does quote it (so the case
proves something), and asserts that neither Display, Debug nor pretty Debug
of the error or of any error in its source chain contains the string.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/building.md tells developers to put a [patch] to a sibling
VoelinProtocol checkout in .cargo/config.toml. It is git-ignored but was not
in .dockerignore, so it was sent to the daemon with every docker build and
could redirect the dependency to a path that does not exist in the image.
Only the root .cargo is excluded: third_party/dimpl/.cargo is committed and
stays.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
015c938 changed Cargo.lock without regenerating THIRD_PARTY_NOTICES.md, so
the third-party notices job (scripts/notices.sh --check) failed on this
branch. voelin-identity brings x509-cert 0.3 and der_derive 0.8, both MIT
OR Apache-2.0: two more crates under the MIT License row of the summary,
and two names on existing "Used by" lines. Regenerated with cargo-about
0.9.2, the version the script requires. The protocol crates themselves are
publish = false and left out by about.toml, like the client's own.
015c938 on its own is still red on that job: history is not rewritten, and
this commit is the fix that follows it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new Identities section says what the identities table holds now (the kinds,
the binding, the two schema versions and whose SQL they are), what Store and
SqliteKeyStore each do with it, what the TeamSpeak level and the sign-out
mean on this table, and that the engine and the UI do not use the key store
yet. The voelin-store row of the workspace table names the new content, and
the changelog notes the migration and the new access requirement for the
private protocol repository.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KeyStore::sign_out is voelin-identity's, generic over the trait, so the
store uses it as it is and these tests run it on the SQLite table, each case
of the protocol's section 13.6 as its own test:
- the account record and the synced copies are removed and the unsynced bound
identities are left unbound, byte for byte;
- the device key is kept, unbound and byte for byte (the stored blob is
equal, the key signs the same bytes), when the record says
bound_existing_key, and deleted when it does not;
- DeviceKeyChoice::Forget(device uid) deletes the key it names in both
cases and no other, and a uid that is not stored deletes nothing;
- a record without the flag keeps the key;
- an unreadable record (unknown version, damaged JSON, an empty object) is
deleted before the error is reported; with Forget the named key is deleted
even then; a second call completes without bringing the key back;
- a sign-out that stopped half way can be run again;
- the result is durable in the file, and the kept key's row has no account.
The five hand-made mutants of the protocol's own acceptance (Auto always
deleting, Forget keeping, a missing flag reading false, the unreadable record
left behind, Forget deleting only after the record was read) were applied to
a copy of voelin-identity through the documented [patch] recipe, and each is
caught by these tests.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SqliteKeyStore is the identities table as a KeyStore: every kind (TeamSpeak,
a Voelin key, the account record, an unknown kind that passes through) with
the account binding of the columns that ADD_ACCOUNT_COLUMNS added. It owns a
Store behind a mutex, because a KeyStore is Sync and a connection is not;
with_store runs the TeamSpeak methods on the same connection. The trait's
provided methods (bound_to, account_record, put_account_record, sign_out)
are used as they are.
- put is one upsert; a replaced row keeps its name, origin, default flag and
creation time, and a blob without a binding unbinds the row. The uid is
UNIQUE across kinds, so a uid another kind holds is a backend error that
replaces nothing; get and remove are addressed by kind and uid.
- The TeamSpeak level stays computed from the key and counter, as before; the
level of a blob that is put is not stored. A TeamSpeak row whose JSON was
damaged outside this crate lists and reads with level 0.
- A TeamSpeak blob is stored only if its JSON is a tsproto identity and its
key has the uid the blob names. Without the first one bad row breaks the
list of TeamSpeak identities; without the second a blob could replace, by
its uid, the key of a different identity.
Tests copy the exercise() cases of voelin-identity's tests/storage.rs into
the client (with the two deviations of a SQLite store, marked), round-trip
bound and synced entries through the table and a reopen with their raw
columns, and load a client.db migrated from schema versions 5 and 6 through
the key store: kind teamspeak, no binding, JSON byte for byte, origin and
default flag kept.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ADD_KIND_COLUMN and then ADD_ACCOUNT_COLUMNS are the next two entries of the
user_version list, in the order the protocol's Phase 2 tasks 7 and 28 give.
Every identity that exists stays what it was: kind teamspeak, unbound, its
JSON untouched, its origin and default flag kept, and the level still
computed from the key.
The TeamSpeak methods of Store (identities, identity, update, rename, delete,
set_default) now act on rows of kind teamspeak only, so that a Voelin key or
the account record in the same table can never be listed as a tsproto
identity (listing would fail on its JSON) or renamed, changed or deleted by
the old API. Their signatures are unchanged.
Tests build a client.db at the current schema (version 5) and at version 6
from the migration list itself, open it, and check both steps: the fixture
row (the real tsproto serialization, its uid and level checked against
tsproto), a second generated identity, the raw columns, the old API, and a
reopen that runs nothing twice. A test pins the SQL of both migrations
against the protocol's strings so that a newer protocol revision cannot
change a shipped version.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voelin-store will keep Voelin identities and the signed-in account next to
the TeamSpeak ones (Phase 4 step 2, protocol Phase 2 tasks 7 and 28), through
the identity blobs and the KeyStore trait of voelin-identity.
The dependency is a workspace git dependency on the SSH URL that the
protocol's docs/development.md names, pinned by commit (64808cc, the head of
its main when task 28 was accepted), so that a per-developer
.cargo/config.toml [patch] can redirect it to a sibling checkout. The recipe
is in docs/building.md; .cargo/ is ignored so it is never committed.
deny.toml allows that one git source. CI and the Docker builds need read
access to the private repository (a deploy key or a token); docs/ci.md and
docs/building.md say so.
Cargo.lock gains voelin-identity, voelin-proto, x509-cert 0.3 and
der_derive 0.8.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The user asked for xhigh as the maximum effort. The designer and the
Opus reviewer drop from max to xhigh, and settings.json sets
maxEffortLevel so nothing in this repository exceeds it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- jitter.rs: short_packet_fuzz takes payloads of 0..=100 bytes (was under
12) and 3000 iterations (was 500).
- ui-review.md: the whisper row pointed at voelin-audio/src/encode.rs:90;
the C2S-only packet is built by out_audio in voelin-core/src/voice.rs.
- mixer.rs: the module doc's first paragraph is reflowed, and
Mixer::set_priority names its parameter talkers, not clients.
- stream.rs: api_types_convert_at_the_boundary asserts the remaining
variants: every ViewerState, StreamKind (both ways) and LeaveReason
(alone and inside EndReason::Removed).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
link.rs and architecture.md now list every part of the ServerLink seam that
still has TeamSpeak types or shape: ConnectOptions.identity and
client_version, the account proof in LinkCtx, the u16 client ids, the
Presence snapshots, and the stream vocabulary of voelin-stream (PeerConfig,
MediaFrame, VideoFormat, VideoCodec, FrameSource). StreamAudioEnded joins the
event list.
Disconnected is no longer promised to be the last event: the stream task is a
task of its own that winds down after the connection, so OwnStream(Ended) and
StreamAudioEnded may follow it. The docs say TsLink ends the stream task as
the connection's loop ends (usually before Disconnected, not always) and that
the session does not depend on the order: it ends our stream and the watched
audio itself on Disconnected and ignores what the link says after it. The
reconnect order (StreamCmd::Shutdown before Disconnect) is documented too.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The session ends the streams of a connection it replaces by sending
StreamCmd::Shutdown through that connection and only then Disconnect; a link
that stops reading commands at Disconnect (TsLink) relies on it. The new test
connects with streams, takes the directory, connects again and asserts the old
connection is given Shutdown before Disconnect. Swapping the two sends in
Session::command makes it fail.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The ConnectionStreams guard was dropped only after shutdown_connection, which
can wait up to three seconds. The loop no longer reads commands once it has
broken, so a StreamCmd::Shutdown the session sent in that window never
reached the stream task; the task ran on until the guard dropped. Drop the
guard right after the loop. The stream task's shutdown needs nothing of the
connection (it reports to the session's channels), so nothing relied on the
late drop.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The stream-types commit shortened a let-chain in tools/voelinctl/src/engine.rs
that rustfmt 1.94 (the CI toolchain) lays out differently from nightly.
`cargo fmt --check` over scripts/own-crates.sh now passes on 1.94.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The session no longer spawns the TeamSpeak connection itself. link.rs adds
ServerLink (spawn(options, ctx, cmds, events)) with LinkCmd and LinkEvent,
VoiceCmd and VoiceEvent moved and renamed, plus ConnectOptions (VoiceOptions
stays as its name for the app), LinkCtx and Remote. TsLink (ts_link.rs) is
the TeamSpeak implementation and the engine's default; Engine::start_with_link
takes another.
The stream task moves inside the connection: voice.rs spawns it when the
server has streams, feeds it the server's notifications and the clients'
channels, and sends its requests. The session reaches it only through
LinkCmd::Stream(StreamCmd) and hears of our own stream (OwnStream) and the
audio of watched streams (StreamAudio) as link events, so the link holds no
handle on the audio thread. stream.rs keeps its tests, adapted to the split
of StreamInput into StreamCmd and the link-private input.
tests/link_fake.rs drives the session with an in-memory link: connect,
presence, commands, a message sent and echoed, a message that comes twice,
history, and a replaced connection, without a TeamSpeak crate. The
architecture doc describes ServerLink and the planned move of TsLink to
VoelinGateWay and the QUIC link of VoelinProtocol.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Command and Event no longer carry voelin-stream's types. voelin-core owns
StreamInfo, ViewerInfo, StreamSetup, StreamKind, ViewerState, EndReason and
LeaveReason (stream_types.rs) with u16 client ids, a viewer's SRTP profile
as its name and its codec as voelin_media::Codec; stream.rs converts at the
boundary. Command::SetSrtpProfiles takes profile names, which the stream
task parses.
EncodedFrame, LayerSpec, LayerId and LayerSet move into voelin-media
(stream::EncodedFrame, layer); voelin-stream depends on it and re-exports
them, so the engine, the stream sessions and voelinctl share one type. The
crate is now a plain dependency of voelin-core (feature media keeps the
module and WHIP), and its str0m feature is gone with str0m always there.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Event::ServerInfo carried voelin_model::ServerFlavor, a TeamSpeak notion. It
now carries backend: BackendInfo { product, version } (plain strings, with
label() for a sentence) next to the capabilities. The voice source decides
the flavor from the version string (voice.rs backend_of) and puts the
backend and capabilities in VoiceEvent::Connected; session.rs forwards them
and no longer classifies anything.
The UI reads backend.product for a server's chip (ServerItem.flavor becomes
product, as does the session view's field) and backend.label() for the
"Connected to ..." status line; the sample data builds its own backend and
the TeamSpeak 6 capabilities, pinned against the flavor's by a test.
voelinctl's engine mode prints the label. ServerFlavor stays in voelin-model
for the gateway and the voice source.
Shown text is unchanged. New tests: the voice source's backend for TS3, TS6
and an unrecognised version, BackendInfo::label, the status line, the sample
servers' backends, and the server item's product.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
voelin-audio no longer depends on tsclientlib or tsproto-packets. Its
boundary is now plain types in packet.rs: TalkerId, VoiceCodec, VoicePacket
(talker, seq, codec, whisper, payload) and EncodedVoice (codec, payload; an
empty payload ends the transmission). The jitter buffer moves from
tsclientlib::audio into jitter.rs and reads VoicePacket fields; the encoder
returns EncodedVoice and the mixer is keyed by TalkerId.
In voelin-core, voice.rs is the only place that wraps EncodedVoice into a
TeamSpeak audio packet and reads one into a VoicePacket (codecs other than
Opus are dropped there, where the jitter buffer rejected them before);
audio.rs and session.rs work on the new types. voelinctl converts at its
own edge. Behaviour is unchanged: the one-hour drift simulation gives the
same latencies as before.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The public client repository must not carry third_party/schema-api:
TeamSpeak's non-public myTeamSpeak API protocol definitions, which came
without a licence. The account sign-in built on them (crates/voelin-myts)
goes with it, since nothing else in the client used that snapshot.
Removed: third_party/schema-api, crates/voelin-myts, the account module of
voelin-ui (sign-in, saved session, profile, avatar, badges, User Tag), the
login page at start and the live account test of voelin-core. The workspace
members, default-members and exclude lists, both manifests and Cargo.lock
no longer name them (tonic, prost-build and their dependencies drop out of
the lock file and THIRD_PARTY_NOTICES.md; about.hbs has no schema-api
section).
Settings -> My Account keeps the identity in use and shows a note that
account sign-in is not available in this build. The Slint account screens
stay, fed neutral values (Bridge.myts keeps its default: signed out, not
available, no prompt), so the account can return without redoing them. The
TeamSpeak protocol parts in tsproto/tsclientlib (myTS ID, other users'
badges and avatars) are untouched.
The account returns later through the gateway library (VoelinGateWay); the
research notes in docs/research/myteamspeak.md stay and say so. CHANGELOG,
docs/ui.md, docs/identity.md and SECURITY.md no longer describe the account
as present. A session an earlier build saved stays in the system keyring
(item myts/session) until the user deletes it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The agent definition is shared by all Voelin repositories; the way to list
a repository's own crates belongs in that repository's CLAUDE.md.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Root CLAUDE.md scopes the orchestration rules to the main session
(decompose, delegate, track attempts, escalate after 3 failures, review
chain with fresh Sonnet and Opus reviewers, Gitea instead of GitHub).
.claude/agents/ defines mao-designer (opus/max), mao-implementer
(sonnet/xhigh), mao-sonnet-reviewer (sonnet/xhigh), mao-opus-reviewer
(opus/max) and mao-helper (haiku). .claude/settings.json sets the session
default model (fable) and effort (xhigh: this build's settings schema has no
"max" for effortLevel; the agents that need max carry it in their
frontmatter).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>