Write down the complete edge list between the engine and src/ts for H9
17.6 of docs/session-seam.md named two engine-to-ts edges; the Opus gate of the merge found the rest. Each line was checked with rg and cargo tree: - the engine into src/ts: Backends::default and register_teamspeak, the uid and id rule of the projection, gateway.rs from_blob/to_blob (H5), the public voelin_core::ts paths and their users in voelinctl and the UI crates, the API docs that link into ts, and the test-only edges; - what a TeamSpeak connector in another crate cannot do with Backends::register (no LocalCtx, no StreamPort): streams across the crate boundary need H2 or a public extension trait; - src/ts into engine-private items (link, stream, files, offline, the crate root, settings), with the conclusion that the "by git tag" step needs H1 and H2 or a shared vocabulary crate, else voelin-core and voelin-gateway-ts form a cycle; - what else keeps tsclientlib and tsproto in voelin-core's tree, so that the exit check needs H5 too, and voelin-store, voelin-stream and voelin-gateway-proto lose the dependency; - the split of stream.rs; - the same key-quoting leak in voelin-store's Store::identity, not closed. The H9 row of 11.2 points to the list and no longer says the exit check holds after H1-H3 alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
563482db72
commit
96ff0e0028
1 file changed
+107
-4
+107
-4
@@ -929,7 +929,7 @@ Nothing here blocks this half: each has a workaround above.
|
||||
| H6 | Avatars and icons as attachments (`Image.attachment_id`, content-addressed cache) instead of channel-0 paths. |
|
||||
| H7 | The UI on the replica (Phase 5): the old-model projection and F1-F10 go; `u16` client ids widen to `u32` participants. |
|
||||
| H8 | Reconnect with backoff, resume tokens and persisted cursors move to `voelin-sdk` once it exists; the engine consumes the SDK. |
|
||||
| H9 | Move `src/ts/` (with its live tests) to `voelin-gateway-ts` (features `basic`, `streams`), first behind a `ts` feature of `voelin-core`, then by git tag; the exit check of plan step 6, `cargo tree -p voelin-core -e normal \| grep -E 'tsclientlib\|tsproto'` empty, holds after H1-H3 and this. Two edges run from the engine into `src/ts/` and have to be cut first: `Backends::default` registers `ts::TsConnector` (the `ts` feature makes it optional), and `link/project.rs` and `link/session_link.rs` import `ts::ts_session::{entities::user_uid, ids}`, the id and uid rule that the projection undoes the synthetic ids with (it moves to the engine side, or into `voelin-model`'s replica conversion, which already has `uid_text`). |
|
||||
| H9 | Move `src/ts/` (with its live tests) to `voelin-gateway-ts` (features `basic`, `streams`), first behind a `ts` feature of `voelin-core`, then by git tag; the exit check of plan step 6, `cargo tree -p voelin-core -e normal \| grep -E 'tsclientlib\|tsproto'` empty, holds after H1-H3, H5 and this (17.6 has the complete list of the edges between the engine and `src/ts/`, the stream split and the other crates that carry `tsclientlib`). The first two to cut run from the engine into `src/ts/`: `Backends::default` registers `ts::TsConnector` (the `ts` feature makes it optional), and `link/project.rs` and `link/session_link.rs` import `ts::ts_session::{entities::user_uid, ids}`, the id and uid rule that the projection undoes the synthetic ids with (it moves to the engine side, or into `voelin-model`'s replica conversion, which already has `uid_text`). |
|
||||
|
||||
### 11.3 Coordination
|
||||
|
||||
@@ -1634,9 +1634,112 @@ were fresh compose projects (`down -v`, `up -d`) for each smoke run.
|
||||
|
||||
### 17.6 Follow-ups
|
||||
|
||||
- **H9 gains two edges to cut** (11.2): `Backends::default` and the use of
|
||||
`ts::ts_session::{entities::user_uid, ids}` in `link/project.rs` and
|
||||
`link/session_link.rs`.
|
||||
- **H9 starts from the complete edge list below.** The Opus gate of the merge
|
||||
(2026-10-24) found that 11.2 names two edges and the tree has more. Each
|
||||
line was checked with `rg` and `cargo tree` on the tree of the follow-up
|
||||
round (`phase4/seam-followups`); file lines are given where the file did not
|
||||
change in the round, items by name where it did.
|
||||
|
||||
1. **From the engine into `src/ts/`**: what has to be cut or moved before
|
||||
`ts` can leave the crate.
|
||||
|
||||
| Where | What | Goes with |
|
||||
|---|---|---|
|
||||
| `link/backends.rs` | `use crate::ts::TsConnector`; `Backends::default` registers `TsConnector::new()`; `Backends::register_teamspeak(TsConnector)` is the only public way to register an in-process connector and goes through the crate-private `register_local(Arc<dyn LocalConnector>)` | H9: the `ts` feature makes `default` optional |
|
||||
| `link/project.rs:20-21`, `link/session_link.rs:565, 973, 1328` | `ts::ts_session::entities::user_uid` and `ts::ts_session::ids::{self, FOREIGN_SYSTEM}`: the id and uid rule the projection undoes the synthetic ids with | H9: to the engine side, or into `voelin-model`'s replica conversion (`uid_text`) |
|
||||
| `gateway.rs:98, 1209` | `ts::identity::{from_blob, to_blob}`: 98 is `login_identity` (the blob to the `tsclientlib::Identity` the gateway login is made of), 1209 is a test | H5: the gateway becomes a `Session` and takes the blob as a credential |
|
||||
| `lib.rs:69` | `pub mod ts`: the public paths `voelin_core::ts::{identity, versions, TsConnector}` | H9: they move or are re-exported |
|
||||
| outside the crate: `tools/voelinctl/src/{engine,identity,versions,client}.rs`, `crates/voelin-ui/src/{app,servers}.rs` and `settings_pages/bind.rs`, `crates/voelin-ui-vm/src/settings_pages/logic.rs`, `crates/voelin-core/tests/gateway.rs` | users of `voelin_core::ts::identity::*` and `ts::versions::*` (`to_blob`, `Found`, `import`, `import_new`, `discover`, `read`, `write_export`, `improve_level`, `LaunchImport`, `DEFAULT_NICKNAME`, `resolve`, `native_version`, `known_versions`, `client_metadata`) | H9: re-point to the new crate (`crates/voelin-ui*` belong to `phase5/ui-vm-2`) |
|
||||
| docs: `lib.rs:8` (`ts::TsConnector`), `lib.rs:129` (`Command::ObserveGateway`: `ts::identity::to_blob`), `gateway.rs:103` (`to_blob`), `settings.rs:1138` (`import_new`); in `link/mod.rs` the module doc (`TsConnector`), `VoiceOptions::identity` (`to_blob`) and `VoiceOptions::client_version` (`ts::versions::resolve`) | intra-doc links into `ts`, which `cargo doc` with `-D warnings` resolves only while `ts` is in the crate | H9: reworded, or pointed at the new crate's docs |
|
||||
|
||||
A TeamSpeak connector in another crate has only
|
||||
`Backends::register(Arc<dyn Connector>)`: `register_teamspeak` takes the
|
||||
crate's own `TsConnector`, and `LocalConnector`, `LocalCtx`,
|
||||
`LocalConnected` and `StreamPort` are crate-private. A plain `Connector`
|
||||
is handed neither the `LocalCtx` (the event bus, `audio`, `stream_peer`)
|
||||
nor a `StreamPort` (`Backends::connect` makes its `LocalConnected` with
|
||||
`streams: None`), so its sessions have no TeamSpeak 6 streams. Streams
|
||||
across the crate boundary need H2 first, or a public extension trait that
|
||||
takes the place of `LocalConnector`.
|
||||
|
||||
*Test-only* edges, which move with the tests of each side:
|
||||
`link/tests.rs` and `link/fake_link_tests.rs` (lines 30-31 of both) use
|
||||
`ts::ts_session::LinkConnector` and `ts::{ConnectOptions, ServerLink}`;
|
||||
the tests of `link/session_link.rs` use `ts_session::{backend_to_v1,
|
||||
features_of}`; `link/tests.rs` uses the helpers
|
||||
`ts::identity::{json_with_a_cut_key, assert_holds_no_piece_of}` and
|
||||
`tests/session_fake.rs` builds a `tsclientlib::Identity` and runs
|
||||
`Backends::default()` in one test (both from this round, with the gate's
|
||||
minor).
|
||||
|
||||
2. **From `src/ts/` into engine-private items**: the reverse edges.
|
||||
|
||||
| Module of the engine | Items `src/ts/` uses |
|
||||
|---|---|
|
||||
| `crate::link` | `LinkCmd`, `LinkEvent`, `LinkCtx` (its `session`, `events`, `frames`, `settings`, `emit`, `done`), `Remote`, `BoxRead`, `BoxDuplex` (`ts/voice.rs`, `ts/ts_link.rs`, `ts/ts_session/driver.rs`); `LocalConnector`, `LocalCtx`, `LocalConnected`, `StreamPort`, `VERSION_PARAM`, `without_query` (`ts/ts_session/mod.rs`); `StreamEvent` (`driver.rs`) |
|
||||
| `crate::stream` | `StreamCmd` (`voice.rs`, `driver.rs`), `StreamHandle`, `StreamInput` (`voice.rs`) |
|
||||
| `crate::files` | `FileEntry`, `RequestId`, `TransferState`, and the functions `normalize_dir` and `join_path` (`voice.rs`, `driver.rs`) |
|
||||
| `crate::offline` | `OfflineMessage`, `OfflineMessageInfo` (`voice.rs`, `driver.rs`) |
|
||||
| the crate root | `Event`, `JoinFailure`, `BackendInfo`, `POKE_MESSAGE_MAX` |
|
||||
| `crate::settings` | `SharedSettings`, through `LinkCtx.settings`, which `voice.rs` hands to the stream task |
|
||||
| tests only | `crate::link::{Backends, VoiceOptions, connect_params}` (`ts_session/mod.rs`, `live_tests.rs`), `crate::link::media::TalkTracker` and `crate::link::project::{View, presence}` (`ts/book.rs`), `crate::settings::{SharedSettings, Settings}` and `crate::files::{Report, Sink}` (`ts/voice.rs`) |
|
||||
|
||||
Together with the first list this is a cycle: `voelin-core` would need
|
||||
`voelin-gateway-ts` for `TsConnector` and the uid rule, and
|
||||
`voelin-gateway-ts` needs `voelin-core` for every item above. So the "by
|
||||
git tag" step of H9 needs **H1 and H2** (the TeamSpeak side speaks v1
|
||||
through `Session`, which takes the place of `LinkCmd`, `LinkEvent`,
|
||||
`LinkCtx`, `StreamPort` and the stream task's input) **or a shared
|
||||
vocabulary crate** that holds the items above for both sides. Without
|
||||
one of the two, only the first step, the `ts` feature of `voelin-core`,
|
||||
is possible.
|
||||
|
||||
3. **What else keeps `tsclientlib` and `tsproto` in the tree.** The exit
|
||||
check (`cargo tree -p voelin-core -e normal | grep -E 'tsclientlib|tsproto'`
|
||||
empty) is not met by moving `src/ts/` alone:
|
||||
- `voelin-core` itself: its four direct dependencies (`tsclientlib`,
|
||||
`tsproto`, `tsproto-packets`, `tsproto-types`) leave with `src/ts/`,
|
||||
but `gateway.rs` uses `tsclientlib::Identity` (`login_identity`,
|
||||
`connect_watched`, `attempt`: H5) and `stream.rs` uses
|
||||
`tsclientlib::ClientId` (item 4).
|
||||
- Three more crates of `voelin-core`'s tree carry the dependency:
|
||||
`voelin-store` (`store.rs` and `keystore.rs` take, read and check a
|
||||
`tsclientlib::Identity`), `voelin-stream` (`proto.rs`, `session.rs`,
|
||||
`discovery.rs`: `tsclientlib::{ClientId, InMessage, messages::c2s}` and
|
||||
`tsproto_packets::packets::OutCommand`; H3 splits it) and
|
||||
`voelin-gateway-proto` (`auth.rs`, `client.rs`:
|
||||
`tsproto_types::crypto::EccKeyPrivP256`, the key of the gateway login;
|
||||
H5). `cargo tree -p <crate> -e normal` shows it for each of the three.
|
||||
- `voelin-query` and `voelin-observer` have none, so `query.rs` using
|
||||
`voelin_query` is not an edge of the exit check; it goes with H5
|
||||
because the query observer becomes a `Session` of a gateway daemon.
|
||||
- So the exit check needs H1-H3, **H5**, a way for `voelin-store` to
|
||||
handle a TeamSpeak identity without `tsclientlib`'s type, and H9.
|
||||
|
||||
4. **`stream.rs` must be split.** Stays with the engine: `StreamState`,
|
||||
`WatchState`, `StreamFrame`, `StreamSink` and `LayerFormat` (public API),
|
||||
`StreamCmd`, `OwnStreamEvent`, `kind_name`, `parse_kind` and
|
||||
`parse_srtp_profiles` (`session.rs`), `media_codec` (`media.rs`) and the
|
||||
re-exports of `stream_types` (`StreamInfo`, `StreamKind`, `StreamSetup`,
|
||||
`ViewerInfo`, ...). Goes with the TeamSpeak 6 task: `StreamHandle`,
|
||||
`StreamTask` and its helpers, `StreamInput`, the `StreamLookup` over the
|
||||
gateway directory, and every use of `tsclientlib::ClientId` (the engine's
|
||||
own ids are `u16`; `stream.rs` wraps them for `voelin-stream`).
|
||||
|
||||
5. **The engine API docs that link into `ts` move with it** (the last row of
|
||||
the table of item 1): `VoiceOptions::identity` and
|
||||
`Command::ObserveGateway` link `ts::identity::to_blob`,
|
||||
`VoiceOptions::client_version` links `ts::versions::resolve`.
|
||||
|
||||
- **The same leak in `voelin-store`, not closed.** `Store::identity` and
|
||||
`Store::identities` read the stored JSON of a TeamSpeak identity with `?`, so
|
||||
an `Error::Json` whose text is the `serde_json` message, which quotes a key
|
||||
that does not import, as the gate's minor did in the connector. The rows are
|
||||
written from a `tsclientlib::Identity` (`add_identity`), so a damaged
|
||||
database is the only way to such a row; the key store (`keystore.rs`) drops
|
||||
the parse error for the same reason. `ts::identity::from_json` cannot be
|
||||
used there (`voelin-core` depends on `voelin-store`); the fix is the same
|
||||
classification in `voelin-store`, or `from_json` moved down.
|
||||
- The bookmark tests of `link/connect.rs` that still sit in
|
||||
`ts/ts_session/mod.rs` (17.2) belong next to it.
|
||||
- `QueryLogin.allowlisted` goes with the query observer (H5), which becomes a
|
||||
|
||||
Reference in new issue
Block a user