diff --git a/.abcd/development/specs/open/spc-2610031016319710-alice-decides-who-on-her-mac-can-open-dessau-s-control-panel.md b/.abcd/development/specs/open/spc-2610031016319710-alice-decides-who-on-her-mac-can-open-dessau-s-control-panel.md index 13dc489d..d63dea92 100644 --- a/.abcd/development/specs/open/spc-2610031016319710-alice-decides-who-on-her-mac-can-open-dessau-s-control-panel.md +++ b/.abcd/development/specs/open/spc-2610031016319710-alice-decides-who-on-her-mac-can-open-dessau-s-control-panel.md @@ -53,6 +53,7 @@ same at the next start. Recovery never needs the panel. - packages: internal/gateway (a darwin-only peer lookup and its test) - tests: a loopback connection from this account is attributed; one from a process the test cannot inspect is not; the lookup's cost per connection - hand: on an Apple Silicon Mac, confirm connections from Safari, Chrome and Firefox, the menu-bar app and the `dessau` command are attributed to the serving account, and record the result in the spec before step 2; a Linux session can write the code but not run this + - spiked 2026-10-04 on the maintainer's Mac (Apple Silicon, macOS 27), with a throwaway probe that served loopback and called `peerIsThisAccount` on every connection, running as the browsers' account: **attributed** (ours) for Safari 27, Brave 154 (Chromium, in place of Chrome, which is not installed), Firefox 154, curl, and Go's HTTP client (the `dessau` command's stack), over both `127.0.0.1` and `::1`. Safari and Firefox sent `localhost` to `127.0.0.1` and Brave sent it to `::1`, so the loopback-only rule in step 2 must cover `::1`. **Not attributed** for curl run as another account (`sudo -u nobody`), with no error. The menu-bar app was not run in the browsers' account; it uses the same Go client. Lookup cost over 32 connections: median 0.34 ms, maximum 2.9 ms, the maximum being the other-account miss, which searches every inspectable process. Step 2 may start. 2. The setting and admission - packages: internal/config, internal/gateway, internal/ui - tests: refusal of a connection not ours under "account", today's behaviour under "machine", the untouched-field save, the change only from an attributed connection, unknown values fail closed, event streams closed on narrowing, the API unchanged, another machine refused as today, the three surfaces agree diff --git a/.abcd/work/CONTEXT.md b/.abcd/work/CONTEXT.md index c02717ce..fdedbc25 100644 --- a/.abcd/work/CONTEXT.md +++ b/.abcd/work/CONTEXT.md @@ -137,7 +137,9 @@ that failed #194's CI), #196 (the empty-prompt refusal). `internal/runtime/testdata/clef/`, PR 198), and the Swift client build (`client/build.sh` builds against the macOS 27 SDK; the four `client/tests` scripts pass, 46 checks). -- The panel's browser spike (itd-2610031004535845) before step 2 starts. +- Done 2026-10-04: the panel's browser spike (itd-2610031004535845): every + browser and client in the serving account is attributed, another account's + is not; step 2 may start (result in its spec). - The Swift client's open bugs (iss-2609200815308397, appearance switching, is major) — checked by hand in the built app. - The six live Discord checks (iss-2609190242198542) before the bridge is diff --git a/.abcd/work/DECISIONS.md b/.abcd/work/DECISIONS.md index a11b85d2..b5c71e31 100644 --- a/.abcd/work/DECISIONS.md +++ b/.abcd/work/DECISIONS.md @@ -442,3 +442,4 @@ - 2026-10-04 — **The gateway refuses a request with nothing to generate from, reading emptiness and nothing else** (iss-2610031758029994; adr-2610040749545010; branch `fix/refuse-empty-prompt`; `impact: breaking`). The Mac reproduction of 2026-10-03 settled the maintainer's REPRODUCE FIRST decision: one `/v1/completions` request with an empty prompt froze the model server on mlx-lm 0.32.0 — the process stayed up, Dessau reported the model loaded with nothing in flight, every later request hung, and only an unload recovered it. So the narrow exception the decision named lands: a `prompt` that is empty, only whitespace or an empty array, and an empty `messages` array, are refused with 400 before a model is resolved, on the network path and on the bridge's `Ask` for parity. The check is one file, `internal/gateway/emptyprompt.go`, admitted on the prompt-content readers' list, and the scan now also looks for the `prompt` field. Whitespace and empty `messages` are refused on the decision's terms, though the reproduction could not show whether they freeze the server alone (the server was already frozen). The severity is raised from minor to major, as the maintainer proposed. The independent adversarial review approved; its corrections are in (no claim that the model server refuses a non-string prompt, the reproduction's version stated, the ADR's supersedes a list, a duplicate-key and a statistics-class test), and its one finding outside the grant — an array-of-strings prompt reaches the generation thread — is captured for the maintainer's decision (iss-2610040805353721) rather than built, because refusing it reads more than emptiness. What would show this wrong: a request with anything in it refused as empty, or a frozen server after a request this check let through — which would point at the separate defect that a frozen server goes unnoticed. - 2026-10-04 — **The gateway may refuse a `/v1/completions` prompt that is not a JSON string** (iss-2610040805353721; `impact: internal` for this record; the fix is `breaking`). Reproduced on the Mac first, per the maintainer's REPRODUCE FIRST practice: on v0.9.3 with mlx-lm 0.32.0, `["hi"]` and `[""]` each froze the model server (no answer to it or to the normal prompt after it), while `[72,73]` was refused by mlx-lm with 404 and the server stayed healthy. That meets the condition the maintainer set on 2026-10-03 (refuse if it crashes the server), so the refusal goes ahead: a new ADR partly superseding adr-2610040749545010, reading the prompt's JSON kind and nothing else, and a gateway refusal with a 400 and a test that fails first. Built by the next session; nothing is built here. - 2026-10-04 — **The frozen-server measurement is done and the record closes** (iss-2610040752568866; `impact: internal`). A frozen mlx-lm 0.32.0 server answers `/health` with 503, and main's health watch (1ff92cc9) stops it within one tick; the failing request gets a 502 in 1.2 s, not a hang. Measured on a scratch build of main on the maintainer's Mac; details on the record. +- 2026-10-04 — **The panel's attribution spike passes, so step 2 of itd-2610031004535845 may start** (spc-2610031016319710; `impact: internal`). On the maintainer's Mac, `peerIsThisAccount` attributed Safari, Brave (for Chrome), Firefox, curl and Go's HTTP client in the browsers' own account over `127.0.0.1` and `::1`, and refused curl run as another account; median lookup 0.34 ms, maximum 2.9 ms (the other-account miss). Brave resolves `localhost` to `::1`, so step 2's loopback rule covers both families. Details in the spec.