Preference at /connections/preference; budget after the UX1 merge
/api/v1/preferences is the person's notes; the connection preference moves beside the connections. internal/equipo measured 13895 after the merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+15
−16
.rastrillo/budgets.txt+1 −1internal/equipo/chat/http.go+3 −3internal/headless/connections_test.go+1 −1internal/plan3test/person_api_contract_test.go+1 −1internal/runner/thin/connector_test.go+6 −7internal/thintest/client.go+2 −2internal/wire/connections.go+1 −1
CI failed — run details
Intent
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 06e464c1..f588108c 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -14,7 +14,7 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr |
| time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI. |
| time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage. |
| -size internal/equipo 13800 - Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here. |
| +size internal/equipo 14000 - Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here. |
| size internal/equipotest - 13400 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged. |
| time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded); 60s gives 34 percent headroom. Shared baseline capture reduces repeated Go runs; retain the CI allowance for sandbox sentinels, timeout and child cleanup. 2026-11-07: loaded CI (host load about 24) measured 66.5s with the package unchanged by thin v1 slice 4 beyond optional check mounts; 90s keeps 35 percent headroom. |
| time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s). Parallel plan graphs and removal of repeated progress floods reduced their local targeted run from 146.920s to 30.784s; the original bug graph retains volume coverage. Keep 330s for journal, proxy, recovery and namespace integration, with 13 percent headroom. |
diff --git a/internal/equipo/chat/http.go b/internal/equipo/chat/http.go| index 86039100..4841118f 100644 |
| --- a/internal/equipo/chat/http.go |
| +++ b/internal/equipo/chat/http.go |
| @@ -90,8 +90,8 @@ func (h *HTTP) Mount(r chi.Router) { |
| r.Post("/connections/{id}/cancel", h.bearer(h.cancelConnection)) |
| r.Delete("/connections/{id}", h.thinOr("DELETE /connections/{id}", thinConnection, h.bearer(h.signOut))) |
| r.Post("/connections/{id}/forget", h.bearer(h.forget)) |
| - r.Get("/preferences", h.bearer(h.preferences)) |
| - r.Put("/preferences", h.bearer(h.setPreferences)) |
| + r.Get("/connections/preference", h.bearer(h.preferences)) |
| + r.Put("/connections/preference", h.bearer(h.setPreferences)) |
| r.Get("/events", h.events) |
| } |
| @@ -161,7 +161,7 @@ func (h *HTTP) preferences(w http.ResponseWriter, r *http.Request, p personapi.P |
| writeJSON(w, 200, out) |
| } |
| -// setPreferences is PUT /api/v1/preferences {provider, revision}: 409 |
| +// setPreferences is PUT /api/v1/connections/preference {provider, revision}: 409 |
| // when the revision moved. |
| func (h *HTTP) setPreferences(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) { |
| var in wire.Preferences |
diff --git a/internal/headless/connections_test.go b/internal/headless/connections_test.go| index 9a1f6927..a8cc77a9 100644 |
| --- a/internal/headless/connections_test.go |
| +++ b/internal/headless/connections_test.go |
| @@ -852,7 +852,7 @@ func connPreference(t *testing.T, env *Env, inst *thintest.Instance, r *localRun |
| t.Fatal(err) |
| } |
| time.Sleep(2 * time.Second) |
| - held := s.send(t, "Limited now. limit:" + second) |
| + held := s.send(t, "Limited now. limit:"+second) |
| replyOf(t, s, held.Turn.ID) |
| if c := s.conv.Turns[held.Turn.ID].Connection; c != "claude-1" { |
| t.Fatalf("a limited preferred connection answered: %s", c) |
diff --git a/internal/plan3test/person_api_contract_test.go b/internal/plan3test/person_api_contract_test.go| index 7d5d6ef5..95069a0f 100644 |
| --- a/internal/plan3test/person_api_contract_test.go |
| +++ b/internal/plan3test/person_api_contract_test.go |
| @@ -56,7 +56,7 @@ func personAPIContractCoverage(t *testing.T) { |
| f := newFixture(t) |
| registered := map[string]bool{} |
| // Thin v1 conversation routes are contracted by internal/wire fixtures. |
| - thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true} |
| + thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true, "POST /connections/{id}/forget": true, "GET /connections/preference": true, "PUT /connections/preference": true} |
| must(t, chi.Walk(f.Store.PersonAPIHandler().(chi.Routes), func(method, path string, _ http.Handler, _ ...func(http.Handler) http.Handler) error { |
| if thin[method+" "+path] { |
| return nil |
diff --git a/internal/runner/thin/connector_test.go b/internal/runner/thin/connector_test.go| index b4ce6bb5..9cc65b0e 100644 |
| --- a/internal/runner/thin/connector_test.go |
| +++ b/internal/runner/thin/connector_test.go |
| @@ -19,13 +19,12 @@ const connPerson = "p@example.com" |
| // connection of the person's (codex-1, its home under the accounts |
| // root) and a connector over them that a test can restart. |
| type connectorRig struct { |
| - t *testing.T |
| - state *State |
| - bindings, root string |
| - home string |
| - conns *Conns |
| - cfg runner.Config |
| - identity, bindingJ map[string]any |
| + t *testing.T |
| + state *State |
| + bindings, root string |
| + home string |
| + conns *Conns |
| + cfg runner.Config |
| } |
| func newConnectorRig(t *testing.T) *connectorRig { |
diff --git a/internal/thintest/client.go b/internal/thintest/client.go| index 95cd031c..759e5324 100644 |
| --- a/internal/thintest/client.go |
| +++ b/internal/thintest/client.go |
| @@ -195,12 +195,12 @@ func (c *Client) SignOut(ctx context.Context, id string) (out wire.Connection, e |
| // Preferences reads the person's preference. |
| func (c *Client) Preferences(ctx context.Context) (out wire.Preferences, err error) { |
| - return out, c.do(ctx, "GET", "/api/v1/preferences", nil, &out) |
| + return out, c.do(ctx, "GET", "/api/v1/connections/preference", nil, &out) |
| } |
| // SetPreferences changes it, against the revision read. |
| func (c *Client) SetPreferences(ctx context.Context, in wire.Preferences) (out wire.Preferences, err error) { |
| - return out, c.do(ctx, "PUT", "/api/v1/preferences", in, &out) |
| + return out, c.do(ctx, "PUT", "/api/v1/connections/preference", in, &out) |
| } |
| // Forget removes a signed-out connection's record. |
diff --git a/internal/wire/connections.go b/internal/wire/connections.go| index 93003744..e2011da2 100644 |
| --- a/internal/wire/connections.go |
| +++ b/internal/wire/connections.go |
| @@ -129,7 +129,7 @@ const ( |
| FramePreference = "preference" |
| ) |
| -// Preferences is GET and PUT /api/v1/preferences: the provider the |
| +// Preferences is GET and PUT /api/v1/connections/preference: the provider the |
| // person prefers to answer, "" for Automatic. A preference orders the |
| // choice among connections that can answer now; it never overrides |
| // health, and a coordinator session moves to it only at the start of a |