Commit Graph
35 Commits
Author SHA1 Message Date
kyleandornith-1.5-35b-a3b 7cbc1d7342 brokerd, memoryd, gatewayd: a lock file keeps each to one instance
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
2026-09-27 19:08:42 -07:00
kyleandornith-1.5-35b-a3b 648469cd67 gatewayd: images, and links in untrusted replies, are posted as code
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
2026-09-27 19:08:42 -07:00
kyleandornith-1.5-35b-a3b 0d3048c3c4 bxcore, loopd: TurnDone says whether the session has read untrusted content
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
2026-09-27 19:08:42 -07:00
kyleandornith-1.5-35b-a3b f594e0d9d4 bxcore, gatewayd, loopd: the secret store moves to bxcore::secrets
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
2026-09-27 19:08:42 -07:00
kyleandClaude Opus 5.5 2b3ae080b4 proto becomes bxcore, the one shared crate (M5b task 00)
Done the way the owner asked and the spike mapped: the crate and the
manifests renamed, then what the build reported fixed. Layers: 138
"proto unresolved" errors across 169 files; cargo fmt reordering
imports; six fixture paths built as strings in brokerd's and bxctl's
tests, which the compiler cannot see, and comments naming
crates/proto/; the crate-dependency check and its self-test. One more
the spike did not reach: a `\nproto =` key inside a printf format in
the self-test, which a word-boundary replacement skips because `n` and
`p` are both word characters.

make gate: gate: ok, 944 tests; no new entry in /tmp.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 01:48:38 -07:00
kyleandClaude Opus 5.5 a15c428ea6 tests: every temporary path is removed by a guard; no leftovers in /tmp
About 10,000 test leftovers had built up in titan's /tmp. loopd's Home
and FakeServer, its fake broker's socket, bxctl's temp sockets, fake
loopd and command homes, inferproxy's socket, and a few brokerd and
toolkit tests created uniquely named directories or sockets and never
removed them, or removed them by hand at the end, which a failing test
skips. Each is now a guard removed on drop (bxctl gains
tests/support/temp.rs). Two races also left gatewayd homes behind: the
test Running only signalled its server to stop, and two Stage structs
declared the home first, so it was removed while the server could still
write into it. Running's drop now waits for the thread (with a 5-second
limit), and every home is declared last.

Checked: make gate twice, then the gate and three rounds of gatewayd and
loopd tests; no new entry in /tmp; 944 tests pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 01:29:32 -07:00
kyleandClaude Opus 5.5 d80b0b3d8a gatewayd: serve_answers waits for every reply it reads
nobody_else_and_nothing_else_answers_it read five replies after
waiting only for the first, so it failed whenever the other four were
not posted yet. It failed once in a full `make gate` run, when many
test binaries ran at once. The helper now waits for as many posts as
the test reads.

The M4b plan's copy is left as it was handed over.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 14:56:58 -07:00
kyleandClaude Opus 5.5 a43d9979c8 gatewayd: serve_restart takes the two caught-up turns in either order
The two posts caught up at restart are two top-level posts, so two
sessions, and their turns run on their own threads. gatewayd starts
them in order, but which one reaches loopd first is up to the
scheduler. Under load the test failed about 1 run in 60; task 18's
session hit it once. mm_json.rs already checks the order of catch-up
(reversing the sort fails there), so this test now compares the two
turns as a set. It passed 100 of 100 runs under load.

The M4a plan's copy is left as it was handed over.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 12:22:10 -07:00
kyle e10d93c3e8 gatewayd: approvals asked by non-approvers in direct messages go to an approver
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 12:07:06 -07:00
kyle 989548419d gatewayd: the texts that say who asked for a redirected approval
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 11:51:43 -07:00
kyle edf9ba3515 gatewayd: approvals answered from Mattermost; typing paused; the notice
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 10:19:41 -07:00
kyle c38e450f44 gatewayd: serve, posting approvals, marking them, and the listener
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 05:07:50 -07:00
kyle a33ff240c4 gatewayd: gateway, the gateway.sock listener and one thread per connection
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:59:02 -07:00
kyle 07e4e16270 gatewayd: state, the posts of open approvals, and the turn of a session
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:50:54 -07:00
kyle c5df86d13d gatewayd: approvals, the registry and the judging of commands
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:48:06 -07:00
kyle d9f8fa9331 gatewayd: approvals::text, the posts that show an approval
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:42:37 -07:00
kyle 18791ab389 gatewayd: mm, patch_post and username
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:36:45 -07:00
kyle 365e50081d gatewayd: strip a leading mention of this bot; recognise approval commands 2026-09-24 04:33:03 -07:00
kyle b45ca14c14 gatewayd: config, [approvals] users and socket
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 04:28:26 -07:00
kyle 10c80b74f3 gatewayd: read a secret file from the file that was checked
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 01:33:36 -07:00
kyleandClaude Opus 5.5 0081f24b70 gatewayd: strict status lines and chunk lines; no as casts (M4a review, findings 1 and 3)
A status line splits on single spaces only, and every chunk line must end in CRLF. The bounded
`as` casts in http.rs, handshake.rs and proto's sha1.rs become try_from and from.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 01:23:51 -07:00
kyle 09b074c121 gatewayd: main, serve --config with its start checks
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 01:00:22 -07:00
kyle ed361db718 gatewayd: serve, the event loop, typing, catch-up and reconnecting
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-24 00:55:58 -07:00
kyle d1d8531495 gatewayd: deliver, turns on loop.sock and answers posted in their thread
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 21:34:34 -07:00
kyle 24cac6a4eb gatewayd: state, what was handled, our threads and turns in flight
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 21:23:49 -07:00
kyle fc32144048 gatewayd: sessions, routing posts to sessions, commands and the queue
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 21:17:17 -07:00
kyle 18fddd03d9 gatewayd: mm, Mattermost's events and REST calls, typed
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 21:04:00 -07:00
kyle 74e08a5b1a gatewayd: ws conn, messages, pings, closing and a dead peer
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 20:54:38 -07:00
kyle f649ca9e3d gatewayd: ws frames, a strict decoder and a masked encoder
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 20:50:00 -07:00
kyle d56fcf8611 gatewayd: ws, the WebSocket error type and the opening handshake
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:55:22 -07:00
kyle 3a5b693878 gatewayd: http, requests over a stream with size caps and rate-limit waits
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:51:00 -07:00
kyle e8311aeb54 gatewayd: net, TCP or verified TLS to the Mattermost server
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:41:08 -07:00
kyle 608d426f95 gatewayd: secrets from a credential, the environment or a file; runbook entries
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:37:12 -07:00
kyle ede25312b3 gatewayd: config, gatewayd.toml into a checked Config
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:27:43 -07:00
kyle 64b34f48d6 gatewayd: dependencies for TLS and secrets; test-only certificates
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:17:51 -07:00