serve: start the chat side #41
Loading…
Reference in a new issue
No description provided.
Delete branch "wire-chat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On 0.2.0
roomcity servermounts the three services and the transcripts' page and nothing ofinternal/chat: no room appears and the homeserver's transactions get 404.With
[matrix]inroomcity.toml,serve.Runnow makes the Matrix driver from it and the tokens inas_token_fileandhs_token_file(the files the Secretmatrixis mounted as in the pod; where they are is[matrix]'s keys), mounts the driver's handler at/_matrix/app/on the network listener, and runs the chat service beside the server with the owners, the city's name and the transcripts' address of[chat]. An error of the service ends the server, as a listener's does. The start fails before anything listens when[chat]has holders, a name or an address and there is no[matrix], and when a token file cannot be read. A homeserver that is down at start is not an error: the rooms are made, again and again, when it is back, and logged.Tested against the local Tuwunel 2.0.0 (and in CI, which runs it):
TestServeWholeMakesTheRoomsOfTheCityOnTheHomeserverstartsserve.Runwhole, starts an always-on session through the runtime, and sees the space, the journal and the agent's room made, and a holder's message in the room reach the session as a prompt, which it can only if the transactions arrive.TestServeRefusesAChatWithoutItsMatrixAndATokenItCannotReadcovers the two refusals.For 0.2.1.
Review for the wiring of the chat side, of
4418bb8. The content holds; the pull request cannot merge as it is, for two reasons that are not about the wiring: Forgejo reports conflicts withmain(#39 went in), andtest / gois red.The red check is a port two packages share.
go test ./...runs packages side by side. The driver's tests ininternal/chat/matrixand this test ininternal/serveboth take the address of the city's transactions fromROOMCITY_TEST_LISTEN, which is the one address the test Tuwunel's registration names. Give the serve test a registration and a port of its own inscripts/tuwunel-test.sh(a second city), so that the two packages cannot meet; running the packages one at a time would only hide it.What I was asked to look at, and found right:
/_matrix/app/. In mautrix 0.32.0 every handler under it (transactions, the two queries, ping) checks the homeserver's token first; the router's two health paths are outside that prefix and so are not mounted.Run.Runends with an error only when the registry's watch ends, and then the server is not usable anyway. So a passing failure of Matrix does not take the runtime down.matrixis mounted at/run/roomcity/secrets/matrixwith the keysas-tokenandhs-token, androomcity.tomlin saraksh/kube names those two paths.Reported to specs-18, not a change here: a session's frames from before its room exists are not shown in the room, since the room subscribes from now; they are in the transcript.
4418bb8da3bcbab7dd0f