diff --git a/docs/session-seam.md b/docs/session-seam.md index 7f11c9c..26c7ee0 100644 --- a/docs/session-seam.md +++ b/docs/session-seam.md @@ -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 @@ -1823,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. |