wiki: mirror docs/ of main at b08bda5

faumaray committed 2026-10-28 04:27:16 +03:00
1 parent 0e31bc949c
commit eaa976f4ec
23 files changed
+332 -101

No files matched your search

+1 -1
@@ -154,7 +154,7 @@ Security issues: see [SECURITY.md](https://git.faumaray.com/Voelin/VoelinClient/
## Documentation pages
Mirror of `docs/` on `main` (`0d44148`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`.
Mirror of `docs/` on `main` (`b08bda5`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`.
- [android.md](android): Android app
- [architecture.md](architecture): Architecture
+1 -1
@@ -237,4 +237,4 @@ the source then says why).
---
*Mirrored from [`docs/android.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/android.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/android.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/android.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -754,4 +754,4 @@ are defined in the core, which reads them on every use.
---
*Mirrored from [`docs/architecture.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/architecture.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/architecture.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/architecture.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -135,4 +135,4 @@ of it reappearing). The audio thread reports these changes as session errors.
---
*Mirrored from [`docs/audio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/audio.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/audio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/audio.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+16 -11
@@ -86,7 +86,8 @@ The same with plain Docker, e.g. `docker build --ssh default -f docker/linux.Doc
**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
build, in a `RUN cargo fetch` of its own: the build after it has no agent and is
offline. 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
@@ -183,15 +184,19 @@ 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 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 and the Docker builds read it with a read-only SSH deploy key, and only to
fetch.** The key is registered on VoelinProtocol and stored as the repository
secret `VOELIN_PROTOCOL_DEPLOY_KEY`. The CI job writes it to a directory of its
own (nothing in `~/.ssh`), runs `cargo fetch --locked` with it as the one
`ssh -i` of that step, deletes it, and runs every later cargo command
`--offline`; the release builds load it into an ssh-agent, and each Dockerfile
gives the agent to a `RUN cargo fetch` only, the `cargo build --offline` after it
has none. 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 cannot use a key file. The Docker builds use the
same key through `docker build --ssh default` (see above). What was set up, the
order of the steps, why a runner that may print the key does not get it, how to
re-check the host key's fingerprint and what each failure means:
[ci.md](ci#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
@@ -229,4 +234,4 @@ voelin-model = { path = "../VoelinProtocol/crates/voelin-model" }
---
*Mirrored from [`docs/building.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/building.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/building.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/building.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+285 -69
@@ -2,8 +2,9 @@
GitHub Actions runs `.github/workflows/ci.yml`, including Linux checks,
Windows and Android Clippy, and TeamSpeak integration smoke tests. Automatic
runs are off: CI, the dependency audit and fuzzing run only by hand
(Actions → the workflow → Run workflow; the same on Gitea). Only the package
runs are off there: CI, the dependency audit and fuzzing run only by hand
(Actions → the workflow → Run workflow). On Gitea, CI also runs on pushes to
`main` and on pull requests ([Gitea Actions](#gitea-actions)). Only the package
builds run by themselves, on `v*` tags, and they run none of these checks.
Both GitHub and Gitea provide release packaging; see [release.md](release)
and [building.md](building).
@@ -22,10 +23,18 @@ runtime performance has not been benchmarked for this change.
## Gitea Actions
`.gitea/workflows/ci.yml` runs a single Linux job when dispatched by hand
(automatic runs on pushes and pull requests are off).
`.gitea/workflows/ci.yml` runs a single Linux job on pushes to `main`, on pull
requests (not when only `docs/` or Markdown files change, apart from
`THIRD_PARTY_NOTICES.md`) and when dispatched by hand.
The job runs:
Before any check the job fetches every dependency with the read-only deploy key
with which Cargo reads the private VoelinProtocol repository, and deletes the key
again; the checks run `--offline`, in a job that holds no key
([VoelinProtocol access](#voelinprotocol-access)). The repository secret
`VOELIN_PROTOCOL_DEPLOY_KEY` is needed for it, and the job refuses a runner that
may print it and a fork's pull request.
The checks are:
- formatting and warnings-as-errors Clippy for our crates;
- workspace Clippy (vendored warnings are reported, compilation errors fail);
@@ -64,8 +73,10 @@ the separate `release.yml` workflow below.
(`voelin-identity`, `voelin-proto` and `voelin-model` at its release tag,
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.
[VoelinProtocol access](#voelinprotocol-access). A runner needs nothing for
it beyond the network access and the image tools above, **and a version that
masks multi-line secrets in the job log** (3.1.0 or newer): the workflows do
not give the key to an older runner and fail the job instead.
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
@@ -91,8 +102,10 @@ the separate `release.yml` workflow below.
The workflow shares the repository's local system-dependencies action with
GitHub CI and bootstraps rustup if absent, then installs the toolchain and
components pinned in `rust-toolchain.toml` (1.95: a channel change there is all
the runner needs). Checkout uses a fully qualified GitHub action URL rather
than depending on the instance's action-source configuration.
the runner needs); these are steps of `ci.yml`, and the composite action
`.gitea/actions/checks` holds the checks that run after the fetch. Checkout uses
a fully qualified GitHub action URL rather than depending on the instance's
action-source configuration.
No GitHub cache/artifact service or reusable-workflow support is required.
The job does not need a Docker socket mounted inside its container; the
@@ -200,60 +213,145 @@ from the **private** repository `Voelin/VoelinProtocol`, as git dependencies ove
SSH, pinned by its release tag `v0.2.0`
([building.md](building#depending-on-voelinprotocol)). The tag is read over
the same SSH access as the commit it replaced (Cargo fetches it through the
system `git`, like any ref), so the deploy key, the host key and the read check
of the step below are as they were. 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).
system `git`, like any ref). Cargo resolves the whole workspace before it builds
anything, so *every* cargo command needs that access until the sources are on
disk: 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). The workflows therefore fetch
first, with the key, and build afterwards without it.
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`.
`Voelin/VoelinProtocol` (Settings → Deploy Keys, write access off; deploy key
**id 7**, "VoelinClient CI (read-only)", made on 2026-10-28,
`SHA256:TWpZx3NgSMKTBkNLfp0C+Q1/DPD0E44Gy+GiHwK/zpI`). It has no other use and no
access to any other repository. It replaced this repository's first deploy key
(the secret of 2026-10-24), which a job log had shown in clear
([The key and the runners](#the-key-and-the-runners)); that key is deleted, and so
are the runs that printed it. The 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. The key step prints the public fingerprint on every run,
to compare with the Deploy Keys page of VoelinProtocol. 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 and look at the fingerprint the key step prints, then delete the old deploy
key and `key`. If the old key may have been seen, delete the runs that could
have shown it and count the lines in the logs that remain
([Looking at a run](#looking-at-a-run)).
- **CI** (`ci.yml`). In order; the key exists only between steps 3 and 4:
1. **Check that this job may hold the VoelinProtocol deploy key.** It reads
`GITEA_ACTIONS_RUNNER_VERSION`; a plain `X.Y.Z` (an optional leading `v`) of
`MIN_MASKING_RUNNER_VERSION` (3.1.0) or more passes the runner part. A lower
version, no version, or anything else (`3.1.0-rc1`) fails it. For a pull
request it also asks whether the PR's head is in this repository (below). If
both hold it writes `VOELIN_KEY_ALLOWED=yes` to `GITHUB_ENV`; otherwise it
prints each reason as an error and **fails the job**: the key is not optional
(nothing builds without `voelin-identity`), and a green job that checked
nothing would be worse than a red one that says why. Run it again to be given
another runner.
2. The system packages (the `system-deps` action, apt) and the pinned Rust
toolchain. No key yet.
3. **Install the VoelinProtocol deploy key.** The secret is the `env:` of this
one step, through `${{ env.VOELIN_KEY_ALLOWED == 'yes' && secrets.VOELIN_PROTOCOL_DEPLOY_KEY || '' }}`,
and the step has `if: env.VOELIN_KEY_ALLOWED == 'yes'`: both ask for the
positive flag, so a runner that is not trusted, or one whose expression
context does not hold what an earlier step wrote to `GITHUB_ENV`, leaves the
step not started and the variable empty. The script never prints the key and
has no `set -x`. It writes the key to `id` (mode 0600) in a directory of the
job's own, `mktemp -d "$RUNNER_TEMP/voelin-protocol-key.XXXXXX"` (mode 0700;
the name goes to `GITHUB_ENV` first so that the cleanup finds it even if this
step is killed), checks it with `ssh-keygen -y` and prints the fingerprint. From
the `mktemp` on, the step removes the directory itself on every way out but
the last line (an `EXIT` trap: a key that is not a key, a full disk, a
termination). It writes nothing to `~/.ssh`: no key file, no `known_hosts`,
no config block.
4. **Fetch the dependencies with the deploy key.** The only step that uses the
key, and the only one that sets `GIT_SSH_COMMAND` (not in `GITHUB_ENV`, so no
other step has it):
`ssh -F /dev/null -i <dir>/id -o IdentitiesOnly=yes -o IdentityAgent=none -o UserKnownHostsFile=<workspace>/.gitea/known_hosts -o GlobalKnownHostsFile=/dev/null -o StrictHostKeyChecking=yes -o BatchMode=yes -o ConnectTimeout=30`.
`-F /dev/null` leaves out every ssh config file, the identity is that file and
nothing from an agent, and the host key accepted is the committed line and no
other (a changed or unknown host key fails rather than asks). The paths are
absolute because Cargo runs git in its own directory, not in the checkout.
The step runs `git ls-remote` on VoelinProtocol first, so a wrong key or host
key fails there, with the reason, and not inside Cargo; then
`cargo fetch --locked`, which downloads every package of `Cargo.lock` (all
targets, because cargo-deny and cargo-about read the whole graph) and runs **no
build script, procedural macro or test**; then it deletes the directory (on
every way out of the step, a failed fetch included) and checks that it is
gone.
5. **Delete the deploy key**, `if: always()`: removes the directory if it is
still there (the key step failed after creating it, the job was cancelled) and
says so, or says that none is left. It runs right after the fetch, so the
checks never start with a key in the job.
6. **The checks** (`.gitea/actions/checks`): formatting, Clippy, the build, the
tests under Xvfb, cargo-deny, the notices check and the release tooling tests.
The action has **no input and no secret**: the secret is never handed to the
steps that run the repository's build scripts and tests. Every cargo command
in it is `--offline` (with `--locked`), and the steps that start cargo through
a script or plugin (`scripts/own-crates.sh`, `cargo fmt`, `cargo deny`,
`scripts/notices.sh`) have `CARGO_NET_OFFLINE=true`. cargo-deny's own
`--offline` is not used: it would also stop it fetching the RustSec database
(from github.com, no key), which the check needs; the variable keeps its
`cargo metadata` offline and leaves the fetch alone. The only cargo commands
that go online are the two `cargo install` of cargo-deny and cargo-about, which
read no manifest of this workspace. A dependency added later that Cargo could
not get from `cargo fetch` fails these steps with an offline error instead of
waiting for an ssh key that is not there.
- **A fork's pull request.** A pull request gets the key only when its head branch
is in this repository. The job-level `env` of `ci.yml` asks
`github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository`:
Gitea's event payload names, in `pull_request.head.repo.full_name`, the repository
that holds the branch to be merged. That is `Voelin/VoelinClient` for a branch
pushed here and the fork's own name (`someone/VoelinClient`) for a fork; any other
event has no pull request, and the first operand is true. An absent or different
name reads `no`, and step 1 treats everything but `yes` as no (the same
fail-closed direction as the runner version). Step 1 also asks the question
again in its script, from the name itself: for a `pull_request` event (and for any
event that carries a head repository) it requires `PR_HEAD_REPO`, the same payload
field, to be non-empty and equal to `GITHUB_REPOSITORY`, so a mistake in the
expression or in the script alone does not hand the key to a fork's code. A fork's
pull request therefore fails at step 1 with the reason and the head repository's
name, without a key, as it failed before (at the empty secret). Gitea gives such a
run no secrets in any case; the check also keeps a same-looking head from being
trusted by accident. It does not make a same-repository branch safe: code of a
branch pushed here runs the build scripts and tests with no key (it is gone by
then), but a branch that changes the workflow itself is a change of the workflow
([below](#what-this-does-not-do)).
- **Release** (`release.yml`). A step after the checkout checks the runner as
step 1 above does (a release has no pull request). The step that starts an
`ssh-agent` on the release host has the same flag guard, loads the key into the
agent from stdin (it is never written to disk) and exports `SSH_AUTH_SOCK`; the
agent forgets the key after nine hours. The builds pass the agent on with
`docker build --ssh default` (`scripts/docker-build.sh` does it for the three
packages, the Android one twice, as the debug APK and as the signed release APK;
the gateway image step does it itself). A step directly after the last build,
`if: always()`, stops the agent and empties `SSH_AUTH_SOCK`, so the artifact
upload and the release draft have neither the key nor the socket.
- **The images.** In `docker/linux.Dockerfile`, `docker/windows.Dockerfile`,
`docker/android.Dockerfile` and `crates/voelin-gateway/Dockerfile` only a
`RUN cargo fetch --locked` has `--mount=type=ssh,required=true`; the build after
it has no ssh mount and is offline: `cargo build --release --locked --offline`
in three of them, `CARGO_NET_OFFLINE=true` in the Android one, whose Gradle task
starts cargo-ndk and cargo (the task itself is left as it is, because a
developer's own build has network and no `cargo fetch`). The key exists inside
the fetch only, through the agent socket, and never reaches a layer, a build
argument or the cache; the code that the build compiles and runs (build scripts,
procedural macros, Gradle) has no agent socket in reach. A build without `--ssh`
stops at the fetch with `unset ssh forward key default`. The build stage copies
`.gitea/known_hosts` to `/etc/ssh/ssh_known_hosts` and sets
`CARGO_NET_GIT_FETCH_WITH_CLI=true`; the images install `git` and `openssh-client`
in their build stage. The fetched git checkout of VoelinProtocol stays in the
layer of the fetch step, the registry in the cache mount that the build step
shares (the three package images; the gateway image has no cache mount, its
registry stays in the layer too).
- **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.
Cargo's built-in git client does not run `ssh -i` (so it cannot use a key file),
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 the command in
`GIT_SSH_COMMAND`, so the same command serves the access check and Cargo.
- **The host key** is committed in [`.gitea/known_hosts`](https://git.faumaray.com/Voelin/VoelinClient/src/branch/main/.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`
@@ -270,21 +368,135 @@ What is set up:
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.
VoelinGateWay, VoelinProtocol and VoelinServer keep the same line.
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.
#### The key and the runners
Gitea has more than one runner with the same labels (`ubuntu-latest`,
`voelin-release`, `ubuntu-24.04`, `ubuntu-22.04`, `echoion-release-serial`), so
`runs-on` cannot choose between them, and they do not log alike. A runner prints
the `env:` of a step in the job log when the step starts. "Perfrormance Runner"
(act_runner, reports `v3.1.0`, the one that is online) masks a multi-line secret
line by line (`***`). The runner **gitea-runner-docker v0.6.1 (id 1, offline on
2026-10-28) printed the whole private key in clear**, on one line with the line
ends shown as `\n`, in the logs of runs of this repository, of VoelinGateWay and of
VoelinServer on 2026-10-27. On 2026-10-28 every deploy key was rotated and the
runs that printed one were deleted.
What follows from it, in the workflows:
- **The key is not given to such a runner.** Step 1 of the job (and the check in
`release.yml`) writes the flag only for a runner whose reported version is
`MIN_MASKING_RUNNER_VERSION` (3.1.0, the oldest one seen masking) or more; for any
other the job fails there, before any step names the secret, and the key step is
not started. This is a gate on the version number and no test of masking: a
runner that reports 3.1.0 or more is trusted by its number, and a version
that a runner does not report is not trusted. It was **rehearsed** with a
stand-in for the runner (the step script with the reported version set to
`v0.6.1`, to nothing, to `3.0.9`, to `v3.1.0-rc1`, to `3.1` and to a word: the job
fails with the reason and no flag is written; `v3.1.0`, `3.1.0`, `v3.1.1`,
`v10.0.0` pass) and **has not been seen on gitea-runner-docker itself**, because
it is offline, and what that runner reports in `GITEA_ACTIONS_RUNNER_VERSION` is
not known. To let the gate admit an older runner, lower
`MIN_MASKING_RUNNER_VERSION` (in `ci.yml` and in `release.yml`) only after a
canary secret of several lines has been shown masked in the log of that runner.
- **The cause is the runner**, and the fix that covers every secret of every
repository is there: upgrade gitea-runner-docker to a version that masks
multi-line secrets, retire it, or register it with labels no workflow asks for.
- The log of a run that did hold the key shows the step headers with `***` for
each line of the secret; nothing else prints it.
#### What has been seen, and what has not
Seen on a real runner ("Perfrormance Runner", reports `v3.1.0`), by dispatching
`ci.yml` on the branch that introduced this order of steps:
- **Run 1226, the full path, green** (36 minutes). The check passes ("Runner …
reports version v3.1.0, which masks secrets in the log"; "Event
workflow_dispatch: no pull request"); the key step's header shows
`PROTOCOL_DEPLOY_KEY: ***` and one `***` for each further line of the key, and
prints `Deploy key installed: 256 SHA256:TWpZx3NgSMKTBkNLfp0C+Q1/DPD0E44Gy+GiHwK/zpI`
(deploy key id 7); the fetch step reads VoelinProtocol, runs `cargo fetch --locked`
(some eighteen seconds) and prints "The deploy key is removed from the job."; the
cleanup step prints "No deploy key is left in the job."; the checks run
`--offline`; the only `Updating crates.io index` after the fetch are the two
`cargo install` steps. The log of the job has no line with `PRIVATE KEY`.
- **Run 1225, the gate refusing, red by design.** A temporary commit raised
`MIN_MASKING_RUNNER_VERSION` to `99.0.0` (reverted by the next commit): the check
failed the job with "… the runner (Perfrormance Runner) reports version 'v3.1.0',
and only a runner of version 99.0.0 or newer …"; the system packages, the
toolchain, the key step, the fetch and the checks were not started and left no
line in the log (so the secret was named nowhere), the cleanup step ran and said
that no key is left, and the log has no `PRIVATE KEY` line and no mention of the
secret.
- Run 1224, of the same workflow as run 1226, was cancelled four minutes in, as
1225 was started on the same branch (a run started on a branch cancels the one
still running there, so dispatch the next only when the last has ended): the
key step, the fetch and the cleanup had run as in 1226 and the offline Clippy had
started. It shows nothing more.
Rehearsed with stand-ins, not seen on a runner: the runner check of `ci.yml` and of
`release.yml` for the reported versions above, and the pull request rule of
`ci.yml` (head repository empty, another one, equal to the repository, with the
expression's answer yes, no or missing: only equal and named passes); the key step
with a text that is no key, with an empty one and with a failing `GITHUB_ENV` (the
`EXIT` trap removes the directory) and with a key whose lines end in CR (it stays for
the fetch); the fetch step with a key that VoelinProtocol does not know (`Permission
denied (publickey)` from the server whose host key `.gitea/known_hosts` holds, the
directory removed by the step's trap); the cleanup step with and without a
directory; the ssh-agent step of `release.yml` with a key (the fingerprint, the
variables) and its stop step (the agent is gone, the variables are emptied).
Not seen: a job on gitea-runner-docker (offline; the gate is rehearsed with a
stand-in for the runner, above); a `pull_request` run, so neither the same-repository
head (`yes`) nor a fork's (`no`) has been read from a real event payload (the field
is the one that Gitea's API gives as `head.repo.full_name` of a pull request, which
reads `Voelin/VoelinClient` for a branch of this repository, and an absent field
fails closed); `release.yml` on a runner; the four Dockerfiles built (they pass
`docker build --check` with no warning, and the `cargo fetch` then `cargo build
--offline` split is that of VoelinGateWay's `docker/linux.Dockerfile`, which was
built with `docker build --ssh default`; the Android Gradle task with
`CARGO_NET_OFFLINE` has not been run). The first release or image build is the
check.
#### Looking at a run
The fingerprint of the key step, and the proof that no log holds a private key
(the job ids are in `GET .../actions/runs/<run id>/jobs`):
```sh
curl -s -H "Authorization: token $TOKEN" "https://git.faumaray.com/api/v1/repos/Voelin/VoelinClient/actions/jobs/<job id>/logs" | grep -c 'PRIVATE KEY' # 0
```
#### What this does not do
- Anyone who can change a workflow of this repository, or run code in one of its
jobs, can read the key: a branch pushed here that prints it in the key step, or
that lowers `MIN_MASKING_RUNNER_VERSION`, or that adds a step. The key can only
read VoelinProtocol and is replaced as above; keep the CI runner isolated, as said
above. What the hardening does is keep the *code* of a change (build scripts,
procedural macros, tests, tools installed by cargo) away from the key while the
workflow is the reviewed one.
- `cargo fetch` reads the checkout's `Cargo.toml` and `Cargo.lock` files,
`rust-toolchain.toml` and a `.cargo/config.toml` if there is one (there is none
at the root today), and runs the toolchain's `rustc -vV`. A branch that adds a
Cargo configuration with a `build.rustc` or `build.rustc-wrapper` program would
run it while the key exists. That is a change of the build configuration, to be
reviewed as one.
- The job token that `actions/checkout` leaves in the checkout's git configuration
is not touched by this.
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) |
| `The VoelinProtocol deploy key is not given to this job: the runner (…) reports version …` | the job landed on a runner that is not known to mask the key in the log (gitea-runner-docker v0.6.1, or one that reports no version): run it again |
| `… the pull request's head repository is '…'` | a fork's pull request, or an event that did not name the head: push the branch to this repository |
| `The VoelinProtocol deploy key is empty` | the secret is missing or empty |
| `… 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 |
| `Permission denied (publickey)` in "Fetch the dependencies with the deploy key" | 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 |
| an offline error ("no matching package", "can't update … in offline mode") in a check step | a dependency changed after the fetch, or `cargo fetch --locked` did not get something the checks need: fix the fetch step, do not give the checks a key |
| `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
@@ -302,9 +514,13 @@ voelin-release:host
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
**a runner that reports 3.1.0 or newer** (the key gate refuses older ones;
0.2.7 is only the artifact action's minimum; prefer the latest maintained
release), or gitea-runner 2+. Older act_runner does not provide
`ACTIONS_RESULTS_URL`, which the pinned artifact action needs. The workflow also
gives the deploy key only to a runner that reports version 3.1.0 or newer in
`GITEA_ACTIONS_RUNNER_VERSION` ([VoelinProtocol access](#voelinprotocol-access)),
so on a lower one the release stops at its first check. 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.
The shared checks install native build dependencies
@@ -357,4 +573,4 @@ runner; local shell/API fixtures do not establish deployment acceptance.
---
*Mirrored from [`docs/ci.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/ci.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/ci.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/ci.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -733,4 +733,4 @@ it now does not.
---
*Mirrored from [`docs/design/gpui-spikes.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/design/gpui-spikes.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/design/gpui-spikes.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/design/gpui-spikes.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -456,4 +456,4 @@ with what they store locally.
---
*Mirrored from [`docs/gateway-admin.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/gateway-admin.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/gateway-admin.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/gateway-admin.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -194,4 +194,4 @@ for `react`, `pin`, `create_topic`, `create_event`, `rsvp`, `stream`,
---
*Mirrored from [`docs/gateway-protocol.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/gateway-protocol.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/gateway-protocol.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/gateway-protocol.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -141,4 +141,4 @@ therefore the translations. Texts outside Slint need their own mechanism:
---
*Mirrored from [`docs/i18n.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/i18n.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/i18n.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/i18n.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -253,4 +253,4 @@ the repository. Every fixture in the tests is generated by
---
*Mirrored from [`docs/identity.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/identity.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/identity.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/identity.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -1460,4 +1460,4 @@ has not run on Windows yet.
---
*Mirrored from [`docs/media.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/media.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/media.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/media.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -426,4 +426,4 @@ itself with these decoders is still to be confirmed.
---
*Mirrored from [`docs/protocol-notes/ts6-streaming.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/protocol-notes/ts6-streaming.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/protocol-notes/ts6-streaming.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/protocol-notes/ts6-streaming.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+11 -1
@@ -35,6 +35,16 @@ HTTPS and never uses GitHub's release API. On this instance the server URL
is `https://git.faumaray.ru`. No registry credentials are needed: the gateway
image is attached as `tsgw-image.tar.gz`, not pushed to an OCI registry.
The builds also read the private VoelinProtocol repository
(`voelin-identity`, `voelin-proto`, `voelin-model`): the repository secret
`VOELIN_PROTOCOL_DEPLOY_KEY`, the read-only deploy key of that repository, is
loaded into an ssh-agent for the Docker builds, given to the `cargo fetch` of each
Dockerfile only, and the agent is stopped right after the last build
([ci.md](ci#voelinprotocol-access)). The workflow gives the key only to a
runner of version 3.1.0 or newer (an older one may print it in the job log) and
stops at that check otherwise; without the secret it stops at its ssh-agent step,
naming the secret.
Retries update only a matching **draft**, replacing same-named assets.
Published releases are not changed; a failed upload leaves a partial draft
for retry. Do not publish or modify a draft while the workflow runs. Gitea
@@ -238,4 +248,4 @@ After:
---
*Mirrored from [`docs/release.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/release.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/release.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/release.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -423,4 +423,4 @@ Voelin does needs them.
---
*Mirrored from [`docs/research/myteamspeak.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/research/myteamspeak.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/research/myteamspeak.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/research/myteamspeak.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -82,4 +82,4 @@ repository.
---
*Mirrored from [`docs/research/stream-fps.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/research/stream-fps.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/research/stream-fps.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/research/stream-fps.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -239,4 +239,4 @@ between Voelin clients.
---
*Mirrored from [`docs/research/ts6-late-join.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/research/ts6-late-join.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/research/ts6-late-join.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/research/ts6-late-join.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -349,4 +349,4 @@ Discord:
---
*Mirrored from [`docs/research/ui-review.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/research/ui-review.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/research/ui-review.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/research/ui-review.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -2042,4 +2042,4 @@ fenix of `spikes/gpui/shell.sh`), on a machine at a load average of about 40.
---
*Mirrored from [`docs/session-seam.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/session-seam.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/session-seam.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/session-seam.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -376,4 +376,4 @@ two threads) takes about 3 ms at its own rate (15 fps by default).
---
*Mirrored from [`docs/studio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/studio.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/studio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/studio.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -262,4 +262,4 @@ What the smoke still does not do reliably, and was not changed for:
---
*Mirrored from [`docs/testing/load.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/testing/load.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/testing/load.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/testing/load.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -224,4 +224,4 @@ noted.
---
*Mirrored from [`docs/testing/manual-matrix.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/testing/manual-matrix.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/testing/manual-matrix.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/testing/manual-matrix.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -1635,4 +1635,4 @@ the slices that meet it; none of it is a defect of what exists today.
---
*Mirrored from [`docs/ui.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/0d44148ef5f76d01f21b115a5a9656439cadd160/docs/ui.md) at `0d44148` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/ui.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/b08bda599dcc451b9b0ab81a0e20eeeea1c81d51/docs/ui.md) at `b08bda5` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*