Commit Graph
107 Commits
Author SHA1 Message Date
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
kyle 9fa8f0abed proto: sha1, for the WebSocket handshake check
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 19:15:01 -07:00
kyleandClaude Opus 5.5 a43362edb4 Review M3b tasks 14 to 17: accept; M3b done
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 16:42:22 -07:00
kyle 9662966b45 toolkit: no thread panic in http_fetch, no casts, exact egress-proxy form
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 16:13:43 -07:00
kyle e69ba632e6 brokerd: escape container errors in the log; prefix and quote two messages
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 16:10:54 -07:00
kyle 93539dbead brokerd: start pipe threads safely and collect output within a grace period
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 16:07:15 -07:00
kyle c87aff0793 brokerd: move the container's pipe handling into pipes.rs 2026-09-23 15:59:44 -07:00
kyleandClaude Opus 5.5 a57a1305e7 M3b plan: follow-up tasks 14 to 17 for the review's lower findings
14 moves the pipe handling out of container.rs (a pure move, replayed on its
own); 15 starts threads with Builder and bounds output collection with a 2 s
grace period; 16 escapes container errors in the log and fixes two texts; 17
fixes toolkit's thread start, casts and the egress-proxy form. Each checked
against a reference, which is not kept. Tips T24 to T26 from this run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 15:33:23 -07:00
kyleandClaude Opus 5.5 c3aaecdae2 M3b review fixes by the design model: curl --globoff, podman --pull=never
Review findings 1 and 2, both plan defects. curl gains --globoff and a
leading --disable; both podman runs gain --pull=never. The given fetch.rs and
the six golden files change with them. Checked on straylight with a rebuilt
image: a glob URL is one request, a missing image fails at once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 15:25:51 -07:00
kyleandClaude Opus 5.5 75c2f1adbf Review M3b: accept with follow-ups; add the Nix expression for the image
On straylight, with real containers from deploy/tools-image.nix, every claim
held: no network without a grant, the limits, the file tools, http_fetch's
host checks including a redirect and a tailnet name, and no leftovers. Two
plan defects found there (curl globbing, podman pulling a missing image),
five lower findings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 11:48:31 -07:00
kyle feb50abc88 brokerd serve: run tools in containers when [runner] is set
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 09:35:46 -07:00
kyle e6081a2177 brokerd: start and remove the egress proxy for http_fetch
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 09:22:24 -07:00
kyle cfe13787b0 brokerd: the Podman runtime
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 08:51:44 -07:00
kyle 49ac8d72d2 brokerd: the podman argument lists
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 01:13:25 -07:00
kyle 81ce5a3345 brokerd: the [runner] section
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 01:07:21 -07:00
kyle 95872d94b8 toolkit: the egress proxy
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 01:01:13 -07:00
kyle 74da0c9d96 toolkit: is_public, the addresses the egress proxy may reach
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 00:19:18 -07:00
kyle adf6713866 toolkit: http_fetch through curl
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 00:14:16 -07:00
kyle ac1ecacadc toolkit: shell
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 00:06:44 -07:00
kyle 0d444dd5bf toolkit: the tool program, read_file and write_file
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-23 00:00:03 -07:00
kyle 644fda14da Refuse grant paths that cannot be mounted
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-22 23:06:09 -07:00
kyle bf9e79ac21 Seal the fetch target: one value holds the URL and its host
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-22 23:03:49 -07:00
kyle f095cca1ee Move the tools' arguments and the host rules to proto
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-22 22:59:40 -07:00
kyleandClaude Opus 5.5 d988edac4a Implementer log: record which model did each M3a task; repair the rows
Models from the owner: Ornith for tasks 01 to 18, Ornith then Grok 4.6 for
19, Grok 4.6 for 20 to 22. Future and late dates set to the commit dates;
notes pasted into the wrong rows moved back; every row has eight cells.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 22:01:14 -07:00
kyleandClaude Opus 5.5 f0b39a4766 Record the second review of task 23 and the findings first left out
The review table gains findings 16 to 20, which the two review agents
reported and the first write-up dropped. The independent review of the fix
commits, and what was changed for it, is recorded; task 23's claims about
its tests are corrected. The spec and decisions record the day-long cap, the
ttl_ms bound, the socket-directory rule and the listener's retry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 21:54:28 -07:00
kyleandClaude Opus 5.5 b1afcd5734 Record task 23: the M3a review fixes, done by the design model
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 21:12:22 -07:00
kyleandClaude Opus 5 22a26aad45 Review M3a: accept with fifteen findings; record the server change
Two medium findings in the audit writer (a startup panic on a record-less
log file, and a log-name filter that disagrees with bxctl's), one in the
missing runbook pointers for startup failures, and twelve low ones. Lessons
I14 and T21, T22; two new AGENTS rules; m3a's T18 renumbered to T20 so
master's T18 and T19 survive the merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 20:48:43 -07:00
kyle ffbff501d6 Record Grok 4.6 as the model for M3a tasks 20-22
Implemented-By: Grok 4.6
2026-09-22 20:25:50 -07:00
kyle 2249f7fd91 Add the end-to-end test: loopd against the real brokerd binary
Implemented-By: Grok 4.6
2026-09-22 20:25:40 -07:00
kyle 1828048564 Check that every runbook pointer has an entry
Implemented-By: Grok 4.6
2026-09-22 20:25:40 -07:00
kyle f1f17a171f Show and answer approvals in bxctl chat
Implemented-By: Grok 4.6
2026-09-22 20:25:40 -07:00
kyleandClaude Opus 5.5 0a9df81fe4 Record the resolution of the M3a "fsync stall": a macOS socket rule
The handoff and the two stopped rows blamed an environment fsync stall.
The cause was macOS refusing socket options after the peer closes, in
loopd and in the brokerd test client. The handoff now opens with the
resolution, the log gets a review note (the stopped rows are kept as
written), and the lessons gain I13 (measure what you blame, and name
the machine) and T18 (the gate must pass on Talos and on the Mac).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 18:35:30 -07:00
kyle a6d81d941b DEBUG-HANDOFF.md: confirm brokerd admin fsync stall is environment-level
Investigated the brokerd admin test hang described in docs/M3a/DEBUG-HANDOFF.md.
The hold_open fix is already implemented and eliminates the EINVAL. 310 runs
of the admin test binary (4-thread, 16-thread, disk-stressed, via cargo test)
produced zero hangs. The ~7-12% fsync stall cannot be reproduced in this
environment. Per AGENTS.md point 4 for stopped tasks, logging the blocker and
committing only the implementer log.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-22 13:41:13 -07:00
kyle 2408e2c622 Add bxctl audit verify
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-21 01:35:08 -07:00
kyle 56e5363109 Stop: bxctl audit verify not wired in main.rs (task M3a/19)
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-21 00:20:15 -07:00
kyle 2d94067b52 Add bxctl approvals, approve, refuse and grants check
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 23:25:05 -07:00
kyle 469be2c0a1 Add BrokerPort: loopd asks brokerd for every tool call
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 19:40:35 -07:00
kyle 1ceaa36b9b Give loopd's tool port approvals, its own clock and plain denials
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 17:43:05 -07:00
kyle 3ecaef3c8b Add brokerd serve: startup, both sockets, and the expiry thread
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 17:24:57 -07:00
kyle d250678355 Handle approvals, refusals and grant checks on admin.sock
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 13:54:01 -07:00
kyle e68e626cd7 Handle a tool request from decision to answer
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 12:59:42 -07:00
kyle cff22ce579 Add the ledger: the audit writer and session state behind one lock
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-20 03:30:37 -07:00
kyle caf8fd6eca Add the table of pending approvals
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 16:48:09 -07:00