COMPOSER-PROGRESS, copy inventory, budgets; the live witness test
Records for the attachment code (chat 10600, thin 12100) and perf skips for the four attachment GET routes; exact dead-reference allowances for three DOM template lines. TestLiveAttachment (gated, not in CI) runs this build's runner against a local instance with a real connection: Codex on paul@tito.io answered "Red." to a red square. Chips wrap; feed thumbnails have a minimum size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+355
−4
.rastrillo/budgets.txt+6 −2docs/superpowers/plans/COMPOSER-PROGRESS.md+180 −0docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+14 −1internal/headless/live_attach_test.go+133 −0internal/thintest/settings_browser_test.go+1 −1scripts/runner-reference-allowlist.json+21 −0
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index cc56585b..4f1faaea 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -35,7 +35,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full |
| perf GET /releases/* skip Verified runner release file downloads, not browser GET screens. |
| time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s; niced serial reruns measured 5.773s and 5.750s. The added coordinator mount check has no repeated launches to remove; 15s leaves 38 percent headroom for namespace, process-exit and recovery assertions. |
| time internal/tryequipo 30s Release starter-set controller K3 records CI runs of 10.8s and 13.1s; 30s retains the guide integration checks with headroom on the shared runner. |
| -size internal/runner/thin 11500 - Connections slice 1 Astra round 1 adds the Codex step path (codexstep.go: Engineering and Review on the pinned app-server in the implement and inspect containment, about 300 lines); measured 11345. Connections slice 1 (after Astra round 1) also keeps a durable ledger of each turn's write tools so a later attempt never repeats one (effects.go), the waiting state between attempts and usage rows per attempt, about 500 lines more; measured 10590 before gate 1d. Connections slice 1 adds the Codex coordinator beside the Claude one (codex.go: the pinned app-server over JSON-RPC in the converse containment, sharing the coordinator base, desk, tool socket and session table), the connection registry over the bindings with health and provider limits (conns.go), in-app sign-in attempts (connector.go) and turn failover and holding (failover.go), about 1500 lines; the pure parts (the choice function, limit parsing, the app-server client, the sign-in flows) live in internal/runner/connect. Measured 10097. Thin v1 UX1 adds step activity lines from the specialist's stream, the repository head and checks gate in the index and project-tagged notes (about 120 lines); measured 8615 with slice 4c's review fixes. Thin v1 slice 4c adds the merge step (mergestep.go, about 190 lines) and the rebase round beside the slice 4b ask fixes. Thin v1 slice 3 adds Engineering steps beside the coordinator: the durable step state and engine (step.go) and the executor that checks out the task tree, runs the CLI in the implement containment, commits and pushes (engineer.go), about 800 lines sharing the coordinator's launch, tool socket and account selection. Measured 5686 source lines. Splitting would export the launch internals; revisit at the slice 7 sweep. Slice 4 adds checks and review on a candidate (judge.go) and the merge watch (merge.go), about 800 lines, sharing the Engineer launch path; measured 6808, 7035 after review round 1 (branch head watch, deadlines, streamed outputs). Slice 4b keeps Engineering and Review sessions and answers the creator's questions from them (ask.go: kept-session and ask state, read-only git tools, the answer stream), about 700 lines on the same launch path. |
| +size internal/runner/thin 12100 - Composer attachments add the chunked receipt with exactly-once writes, the read-only desk delivery and its checks (files.go, about 230 lines), image blocks and localImage inputs, the attachment read through read_file; measured 11736. Connections slice 1 Astra round 1 adds the Codex step path (codexstep.go: Engineering and Review on the pinned app-server in the implement and inspect containment, about 300 lines); measured 11345. Connections slice 1 (after Astra round 1) also keeps a durable ledger of each turn's write tools so a later attempt never repeats one (effects.go), the waiting state between attempts and usage rows per attempt, about 500 lines more; measured 10590 before gate 1d. Connections slice 1 adds the Codex coordinator beside the Claude one (codex.go: the pinned app-server over JSON-RPC in the converse containment, sharing the coordinator base, desk, tool socket and session table), the connection registry over the bindings with health and provider limits (conns.go), in-app sign-in attempts (connector.go) and turn failover and holding (failover.go), about 1500 lines; the pure parts (the choice function, limit parsing, the app-server client, the sign-in flows) live in internal/runner/connect. Measured 10097. Thin v1 UX1 adds step activity lines from the specialist's stream, the repository head and checks gate in the index and project-tagged notes (about 120 lines); measured 8615 with slice 4c's review fixes. Thin v1 slice 4c adds the merge step (mergestep.go, about 190 lines) and the rebase round beside the slice 4b ask fixes. Thin v1 slice 3 adds Engineering steps beside the coordinator: the durable step state and engine (step.go) and the executor that checks out the task tree, runs the CLI in the implement containment, commits and pushes (engineer.go), about 800 lines sharing the coordinator's launch, tool socket and account selection. Measured 5686 source lines. Splitting would export the launch internals; revisit at the slice 7 sweep. Slice 4 adds checks and review on a candidate (judge.go) and the merge watch (merge.go), about 800 lines, sharing the Engineer launch path; measured 6808, 7035 after review round 1 (branch head watch, deadlines, streamed outputs). Slice 4b keeps Engineering and Review sessions and answers the creator's questions from them (ask.go: kept-session and ask state, read-only git tools, the answer stream), about 700 lines on the same launch path. |
| time internal/thintest 75s Housekeeping slice 1 adds six contract tests (combine, Undo round trips and the race, Pause, auto-disable, quiet hours, restart while claimed; about 6s); the package measured 67.7s beside other packages locally, so 75s. Thin v1 slice 4c adds the merge, adoption, cancel and retention contract tests (CI measured 35.7s). Thin v1 contract tests: a real instance and a scripted runner per test, fixtures replayed against every request, frame and event. Slice 3 adds the task, step-sync and grant contracts; CI measured 14.805s. 30s keeps room for the slice 4 review contracts. UX1 adds step activity, task source and duplicates, coordinator merging and project facts (four contracts, about 6s); the package measured 34s locally under load, so 40s. UX1's inner screens gallery (two owners, seven tasks, every page) adds about 3s; measured 40.9s locally under load, so 60s. |
| time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s). Measured 17.8s locally under load. Slice 4b review adds a 16 MiB git output bound, an injected index-pack failure and stall (3s deadline) and held-answer tests; measured 30.3s locally under load. 45s keeps 33 percent headroom. |
| time internal/headless 480s Connections slice 1 after Astra round 1 adds attempts that wait for a connection, Review on a refused credential, Codex Engineering and Review and the preference (about 90s more; loaded CI measured 6m42s). It first adds TestHeadlessConnections (usage rows, failover, Codex coordinator, device code, Claude sign-in, failure kinds, cancel and sign-out, writes replayed, Engineering and Review moving connection, the waiting turn): eleven scenarios, about 55 to 100s locally. Thin v1 headless suite: real instance, runner and bubblewrap per scenario (spec 7, under two minutes). Slice 4 adds the review and checks scenarios (4_review with its fix rounds, branch move and merge; 4_checks_honest); loaded CI measured 170s on 2026-11-07. Slice 4b adds 4b_ask (about 12s); loaded CI measured 182.9s. 240s keeps 30 percent headroom. |
| @@ -49,9 +49,13 @@ perf GET /api/v1/notebook skip Thin v1 person API: bearer-only JSON for devices; |
| perf GET /api/v1/thinking skip Thin v1 person API: bearer-only JSON for devices; the browser reads thinking words on /settings/thinking. |
| perf GET /api/v1/tasks skip Thin v1 person API: bearer-only JSON for devices; the browser reads tasks through /tasks. |
| perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads a task through /tasks/{id}. |
| -size internal/equipo/chat 10000 - Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. |
| +size internal/equipo/chat 10600 - Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. |
| perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}. |
| perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}. |
| perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections. |
| perf GET /api/v1/housekeeping skip Housekeeping slice 1 person API: bearer-only JSON for devices; the browser reads it through /housekeeping. |
| perf GET /api/v1/housekeeping/actions skip Housekeeping slice 1 person API: bearer-only JSON for devices; the browser reads actions on /housekeeping. |
| +perf GET /api/v1/attachments/{id} skip Composer attachments: bearer-only bytes of one upload for devices; a file, not a screen. |
| +perf GET /api/v1/attachments/{id}/preview skip Composer attachments: bearer-only image thumbnail for devices; a file, not a screen. |
| +perf GET /conversation/attachments/{id} skip Composer attachments: the bytes of one upload, shown inside the conversation; a file, not a screen. |
| +perf GET /conversation/attachments/{id}/preview skip Composer attachments: an image thumbnail inside the conversation; a file, not a screen. |
diff --git a/docs/superpowers/plans/COMPOSER-PROGRESS.md b/docs/superpowers/plans/COMPOSER-PROGRESS.md| index 3dc01d3a..bad258b3 100644 |
| --- a/docs/superpowers/plans/COMPOSER-PROGRESS.md |
| +++ b/docs/superpowers/plans/COMPOSER-PROGRESS.md |
| @@ -95,14 +95,194 @@ per action is unchanged. |
| ## Done |
| +1. `internal/attach` (pure): `Inspect` (sniff, limits, safe name, |
| + location stripped), `Dimensions` (WebP by its header), `Preview` |
| + (1024 px JPEG, upright) and `ForModel` (1568 px, 1.5 MB, upright; a |
| + large WebP has no decoder and goes by path only). `attachtest` makes a |
| + phone-style JPEG with EXIF orientation and GPS for the other tests. |
| +2. Wire: `MessageAttachment`, `Message.attachments` (omitted when none), |
| + `SendMessage.attachments`, `AttachmentRef`, `AttachmentChunk`, frame |
| + `attachment` (durable), `MessageCommand.attachments`, reason |
| + `attachment_unavailable`. Fixtures: `api/attachment.json`, |
| + `send-request-attachments.json`, `messages-attachments.json`, |
| + `error-attachment.json`, `frames/attachment.json`, |
| + `frames/message-attachments.json`. |
| +3. Instance (`chat/attachments.go`, `attachments_http.go`, migration |
| + 0053): `Upload`, the send's link (the person's own unsent uploads |
| + only), `relayFiles` at dispatch (chunk commands before the message |
| + command, bytes read by `Pending` when sent), `AttachmentData`, the |
| + sweep of unsent uploads after a day (at most 20 waiting). API v1 routes |
| + and the page routes (`/conversation/attachments`, same-origin only). |
| +4. Runner (`thin/files.go`): `Files.Accept` writes each chunk at its |
| + offset into `incoming/<id>.part`, records frame and index in one |
| + transaction, then acks; a whole file is hash-checked and moved |
| + read-only to `desk/attachments/<id>/<name>`; old ones pruned after 14 |
| + days. `heldFiles` checks every file again before a turn. Claude: image |
| + content blocks (`claude.UserContent`); Codex: `localImage` inputs |
| + (`codex.TurnParamsWithImages`); every file listed with its path and |
| + the data-not-instructions line; `read_file` with repo `attachments` |
| + reads the person's own desk (text numbered, images and PDFs named). |
| +5. Composer (`chat.html`, `chat-compose.js`, `chat-attach.js`, |
| + `chat-stream.js`, `equipo.css`): the round + (44 px) with its menu |
| + (Photo or image with `accept="image/*"`, File; keyboard: Enter opens at |
| + the first item, arrows, Escape returns to the +), a pill that grows to |
| + six lines then scrolls, chips above the words inside the pill (upload |
| + progress, Remove, errors in words), paste and drop, and a 44 px round |
| + send arrow that scales and fades in only with words or an attachment |
| + (hidden from the tab order otherwise; still under reduced motion). |
| + Enter sends on a keyboard, Shift+Enter starts a line; on touch Return |
| + starts a line and the arrow sends. Placeholder "Message". The dock, |
| + click-to-focus and the iOS keyboard fix are kept. A send waits for |
| + uploads still going; the message shows at once from local copies. |
| +6. Feed: the person's own message keeps its bubble and gains its |
| + attachments above the words: an image thumbnail (the preview, with its |
| + size so nothing jumps; tap opens it full size in the page, tap or |
| + Escape closes) or a file chip (name, size). A message with only |
| + attachments shows no empty bubble. |
| +7. Task thread: the same pill and arrow for Questions and notes, the |
| + "Asking Engineering · change" line below; no attachments (decision). |
| +8. Settings (coordinator, Paul: "Choosing a different option in settings |
| + causes the sliding nav to repeat"): `settings.js` saves Thinking words, |
| + Prefer, Pause and Resume and quiet hours with fetch, reads the page |
| + again and swaps only the part that changed, with a quiet "Saved" tick |
| + by the section's heading. No navigation, so Rastrillo's slide does not |
| + replay (upstream: rastrillo discussion 263). The native forms remain |
| + the no-script path. The composer already sent in the background. |
| +9. Budgets: `internal/equipo/chat` 10600 and `internal/runner/thin` |
| + 12100 with reasons; perf skips for the four attachment GET routes |
| + (bytes, not screens); exact dead-reference allowances for three DOM |
| + `cloneNode`/`importNode` lines. |
| + |
| ## Tests |
| +- Unit (`attach`): `TestInspectTypes` (every allowed type, HEIC by bytes, |
| + name and declared type, mismatched extensions and declared types, size, |
| + empty, Latin-1 text), `TestStripLocationJPEG` (GPS zeroed, XMP and IPTC |
| + dropped, orientation kept, still decodes, big-endian EXIF, a truncated |
| + file refused), `TestStripLocationPNGAndWebP`, `TestSafeName`, |
| + `TestRenditions` (scaled, upright by orientation 6, preview). |
| +- Contract (`thintest`): `TestContractAttachments`: upload shape, the |
| + kept photo without GPS and its hash, served with nosniff and a sandbox |
| + CSP, HEIC, too large and binary refused with codes, a teammate can |
| + neither read nor send someone's upload, six refused, words optional, |
| + idempotent resend, same key with other files 409, an attachment sent |
| + twice 422, the chunk frames before the message frame (shapes against |
| + the fixtures, bytes rebuild the files), and exactly once across a |
| + reconnect: two chunks acked, the stream dropped, only the two unacked |
| + chunks and the same message frame resent. |
| +- Runner (`thin`): `TestRunnerAttachmentExactlyOnce` (chunks acked one by |
| + one, the stream drops, everything resent, the file assembled once, |
| + 0400, no parts or chunk rows left, the turn runs once with it, resent |
| + frames after the turn are no-ops), `TestAttachmentIntegrity` (a hash |
| + mismatch discarded, invalid chunks refused, a file changed on disk |
| + refused before the turn). |
| +- Headless (real instance, runner, bubblewrap, fake CLIs): |
| + `TestHeadlessAttachments` F1 (Claude gets the photo as an image block, |
| + upright as the runner made it; both files readable at their paths and |
| + neither writable nor writable beside), F2 (Codex gets `localImage` by |
| + path and reads it), F3 (a prompt-injection file read with `read_file` |
| + and obeyed by a gullible fake: the notebook refuses it as the person's |
| + words and as a repo note, `submit_review` and `git_diff` are refused, |
| + the notebook holds nothing from it), F4 (sent while the runner is |
| + away, relayed on connect, answered once; a restart runs nothing again). |
| +- Browser (`-tags browser`): `TestBrowserComposer` at 1280 (mouse) and |
| + 390 (touch), light and dark: 44 px targets, one centre line, the arrow |
| + only with content, Enter and Shift+Enter, Return on touch, the menu by |
| + click and keyboard, a picked image as a chip then a thumbnail in the |
| + feed that reached the fake coordinator and opens full size, a file chip |
| + removed, too large and binary errors in words, paste and drop, six |
| + lines then scrolling, reduced motion. `TestBrowserComposerFocus` and |
| + `TestBrowserComposerDock` updated for the pill (the + and the arrow keep |
| + their clicks; a tap in the 12 px gap beside the + lands on the + on |
| + touch, so that point is desktop only). `TestBrowserSettingsStayOnPage` |
| + (1280 and 390: each change saves with a tick, no navigation, no page |
| + swap or reveal, the nav the same node, the server has it); |
| + `TestBrowserThinkingWords` and `TestBrowserHousekeeping` now expect the |
| + in-place save. `TestWebKitKeyboard` (WebKit 1.63, `EQUIPO_PLAYWRIGHT_CORE`) |
| + passes: chat, dark, empty and the task thread. |
| +- Mutations, each observed failing a test (log kept under |
| + `~/.cache/tmp/equipo-composer/` while working): GPS directory kept, |
| + IPTC kept, extension mismatch allowed, PNG eXIf kept (attach); desk |
| + mounted writable (F1: "CREATABLE"), no Claude image block (F1), no |
| + Codex localImage (F2), person provenance unchecked (F3), no relay (F4); |
| + chunks sent without bytes, anyone's upload linkable (contract); no |
| + SHA-256 check on arrival, none before the turn (integrity); the arrow |
| + never shown, always shown, Return sending on touch, paste ignored, |
| + attachments not posted (browser); Settings posting natively (settings). |
| + Two survive by design: the runner's frame-id record (chunk writes are |
| + idempotent by index), and the browser's early size refusal (the server |
| + refuses with the same words). |
| +- Seen, not caused here: `TestBrowserTaskThread` fails at its answered |
| + question on 321413d too (UX1 logged it at fa3860a). |
| + |
| ## Decisions |
| +- Person scoped, as messages are: only the message's person reads an |
| + attachment (the brief's "and their team" matches nothing today: a |
| + conversation is one person's). |
| +- HEIC is refused in words, not converted: no pure-Go decoder with |
| + `CGO_ENABLED=0`, and Safari already sends a JPEG for `accept="image/*"`. |
| +- Any valid UTF-8 text is a text file (`.md`, `.csv`, `.json` named so; |
| + the rest text/plain), so logs and code snippets with other extensions |
| + work; images, PDF and HEIC are by magic number only. |
| +- The relay is chunk frames in the mailbox, not a runner download: the |
| + same ack, resend and generation rules as every frame, and a 50 MB |
| + message never sits in the commands table (rows hold no bytes). A |
| + failover or retry dispatches the chunks again; the runner acks a |
| + delivered file's chunks without writing. |
| +- Text never reaches the model inlined; PDFs are named by path only (no |
| + text extraction here; the model says so if it needs one). |
| +- Claude gets images scaled to the API's own bound (1568 px) and 1.5 MB, |
| + upright; Codex gets the original path and scales it itself. |
| +- The task thread composer has no attachments: questions to a specialist |
| + and notes go through the thread's own path, which carries none; the |
| + conversation is where things are attached. |
| +- Chips wrap rather than scroll sideways (at most five). |
| +- The feed keeps the bubbles as they are; a message with only |
| + attachments hides its empty bubble (the retry button still shows). |
| + |
| ## Open issues |
| +- Version skew at deploy, as before: an old runner refuses the new |
| + `attachment` frame and the message frame's `attachments` field; |
| + install runners right after the instance. |
| +- A message whose files all fail to upload, with no words, sends nothing |
| + and says "Could not upload. Try again." under the composer. |
| +- PDFs are not read by the coordinator yet. |
| +- Live Claude image blocks are unwitnessed (Claude limited until |
| + 2026-11-10 21:00Z); the shape follows the Agent SDK's streaming input |
| + docs and the fake checks it. |
| + |
| ## Copy for review |
| +Accepted for now with the marker in `copy.go` and listed in the plan 3 |
| +inventory ("Composer and attachments (2026-11-08)"): |
| +- `conversation.placeholder` "Message" (was "Ask for a fix, a feature, |
| + or what’s next") |
| +- `chat.attach.add` "Attach", `.image` "Photo or image", `.file` |
| + "File", `.list` "Attachments", `.remove` "Remove %s", `.uploading` |
| + "Uploading…", `.failed` "Could not upload. Try again.", `.too_many` |
| + "At most 5 files in one message." |
| +- `api.attachment_too_large` "That file is over 10 MB.", |
| + `api.attachment_type` "Equipo takes images (PNG, JPEG, WebP, GIF) and |
| + text, Markdown, CSV, JSON, log and PDF files.", `api.attachment_heic` |
| + "HEIC photos cannot be read yet. Share it as a JPEG and try again.", |
| + `api.attachment_limit` "Too many files are waiting to send. Send or |
| + remove some first." |
| +- `settings.saved` "Saved" |
| +- Model-facing (not person copy): the attachment note in the turn and |
| + the `read_file` attachment answers in `thin`. |
| + |
| +## Live runs (budget: 2 coordinator turns, paul@tito.io homes only) |
| + |
| +Used: 1. `TestLiveAttachment` (gated by `EQUIPO_ATTACH_LIVE=1`, not in |
| +CI): this build's runner in real bubblewrap against a local instance on |
| +127.0.0.1, the staging runner's `codex-1` binding (paul@tito.io) through |
| +the runner's own lock and runtime copy, the pinned Codex 0.165.0. One |
| +256 px PNG (a red square) with "What colour is the shape in this image? |
| +Answer in at most five words.": replied "Red." on codex-1, attempt 1. |
| +Claude not tried (limited until 2026-11-10 21:00Z). |
| + |
| ## Staging |
| Not restaged (the controller sequences it). |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index bb4ef4d2..ae847350 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -5139,6 +5139,19 @@ records remain unchanged. |
| | `chat.connections.reason.identity_mismatch` | The sign-in did not match an account. | Connections slice 1 (Connections page) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.connections.reason.already_connected` | That account is already connected. | Connections slice 1 (Connections page) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.connections.offline` | Your runner is offline. Start it to add a connection. | Connections slice 1 (Connections page) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| +| `chat.attach.add` | Attach | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.image` | Photo or image | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.file` | File | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.list` | Attachments | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.remove` | Remove %s | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.uploading` | Uploading… | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.failed` | Could not upload. Try again. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `chat.attach.too_many` | At most 5 files in one message. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `api.attachment_too_large` | That file is over 10 MB. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `api.attachment_type` | Equipo takes images (PNG, JPEG, WebP, GIF) and text, Markdown, CSV, JSON, log and PDF files. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `api.attachment_heic` | HEIC photos cannot be read yet. Share it as a JPEG and try again. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `api.attachment_limit` | Too many files are waiting to send. Send or remove some first. | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| +| `settings.saved` | Saved | Composer and attachments (2026-11-08) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| | `chat.housekeeping.link` | Housekeeping | Housekeeping slice 1 (Housekeeping view, digest, receipts) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.housekeeping.digest_one` | Tidied 1 thing. | Housekeeping slice 1 (Housekeeping view, digest, receipts) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.housekeeping.digest` | Tidied %d things. | Housekeeping slice 1 (Housekeeping view, digest, receipts) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| @@ -5315,7 +5328,7 @@ records remain unchanged. |
| | `nav.switch` | switch | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `nav.idle` | idle | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `nav.waiting` | waiting | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| -| `conversation.placeholder` | Ask for a fix, a feature, or what’s next | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| +| `conversation.placeholder` | Message | Composer (2026-11-08; was "Ask for a fix, a feature, or what’s next") | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-08; iterate in context) | |
| | `conversation.today` | Today | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `conversation.message_actions` | Message actions | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `conversation.any_project` | Any project | Chat UI round 2 | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
diff --git a/internal/headless/live_attach_test.go b/internal/headless/live_attach_test.go| new file mode 100644 |
| index 00000000..71b6df11 |
| --- /dev/null |
| +++ b/internal/headless/live_attach_test.go |
| @@ -0,0 +1,133 @@ |
| +package headless |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "encoding/json" |
| + "image" |
| + "image/color" |
| + "image/png" |
| + "io" |
| + "log/slog" |
| + "os" |
| + "path/filepath" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/oficina/equipo/internal/runner" |
| + "amadan.net/oficina/equipo/internal/runner/thin" |
| + "amadan.net/oficina/equipo/internal/thintest" |
| + "amadan.net/oficina/equipo/internal/wire" |
| +) |
| + |
| +// TestLiveAttachment is the live witness for attachments (not in CI): one |
| +// coordinator turn with one image, on a real connection, through this |
| +// build's runner in real bubblewrap against a local instance. Set |
| +// EQUIPO_ATTACH_LIVE=1, EQUIPO_LIVE_BINDINGS to a runner's bindings file, |
| +// EQUIPO_LIVE_BINDING to the binding's id, and EQUIPO_LIVE_CODEX_PATH and |
| +// EQUIPO_LIVE_CODEX_HOST_PATH (or EQUIPO_LIVE_CLAUDE_PATH) to the pinned |
| +// CLIs. The binding's home is used through the runner's own lock and |
| +// runtime copy; nothing here reads or prints it. |
| +func TestLiveAttachment(t *testing.T) { |
| + if os.Getenv("EQUIPO_ATTACH_LIVE") != "1" { |
| + t.Skip("EQUIPO_ATTACH_LIVE is not set") |
| + } |
| + raw, err := os.ReadFile(os.Getenv("EQUIPO_LIVE_BINDINGS")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var all []map[string]any |
| + if err := json.Unmarshal(raw, &all); err != nil { |
| + t.Fatal(err) |
| + } |
| + var b map[string]any |
| + for _, x := range all { |
| + if x["id"] == os.Getenv("EQUIPO_LIVE_BINDING") { |
| + b = x |
| + } |
| + } |
| + if b == nil { |
| + t.Fatal("no such binding") |
| + } |
| + b["person_id"] = thintest.Owner |
| + inst := thintest.StartInstance(t) |
| + token := inst.DeviceToken(t) |
| + cred := inst.EnrolRunner(t) |
| + root, err := os.MkdirTemp("", "eqlive-") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(func() { os.RemoveAll(root) }) |
| + private(t, root) |
| + state := private(t, filepath.Join(root, "state")) |
| + if err := thintest.WriteRunnerCredential(state, cred); err != nil { |
| + t.Fatal(err) |
| + } |
| + config := private(t, filepath.Join(root, "config")) |
| + writeJSON(t, filepath.Join(config, "bindings.json"), []map[string]any{b}) |
| + bin := private(t, filepath.Join(root, "bin")) |
| + copyExecutable(t, filepath.Join(bin, "equipo-tool-proxy")) |
| + self, _ := os.Executable() |
| + cfg := runner.Config{Origin: inst.URL, InstanceID: inst.TeamID, StateDir: state, AccountBindingsPath: filepath.Join(config, "bindings.json"), AmadanCredentialPath: filepath.Join(config, "amadan.json"), ClaudePath: os.Getenv("EQUIPO_LIVE_CLAUDE_PATH"), CodexPath: os.Getenv("EQUIPO_LIVE_CODEX_PATH"), CodexCodeModeHostPath: os.Getenv("EQUIPO_LIVE_CODEX_HOST_PATH"), BwrapPath: "/usr/bin/bwrap", GoRoot: filepath.Join(root, "go"), GoBinary: filepath.Join(root, "go", "bin", "go"), WorkspaceRoot: filepath.Join(root, "work"), ScratchRoot: filepath.Join(root, "scratch"), GitPath: "/usr/bin/git", AmadanPath: "/bin/false", ToolProxyPath: filepath.Join(bin, "equipo-tool-proxy"), Executable: self} |
| + logger := slog.New(slog.NewTextHandler(io.Discard, nil)) |
| + r := &localRunner{inst: inst, root: root, cfg: cfg, opts: thin.Options{Version: "live", Logger: logger, Forge: newLocalForge(t, root), NoMoveIn: true, AccountsRoot: filepath.Join(root, "accounts")}} |
| + t.Cleanup(func() { r.stop(t) }) |
| + r.start(t) |
| + client := thintest.NewClient(inst.URL, token) |
| + client.HTTP.Timeout = 2 * time.Minute |
| + ctx, cancel := context.WithTimeout(context.Background(), 8*time.Minute) |
| + defer cancel() |
| + |
| + // One image whose answer is unmistakable: a red square on white. |
| + img := image.NewRGBA(image.Rect(0, 0, 256, 256)) |
| + for y := 0; y < 256; y++ { |
| + for x := 0; x < 256; x++ { |
| + c := color.RGBA{255, 255, 255, 255} |
| + if x > 48 && x < 208 && y > 48 && y < 208 { |
| + c = color.RGBA{220, 20, 30, 255} |
| + } |
| + img.Set(x, y, c) |
| + } |
| + } |
| + var buf bytes.Buffer |
| + if err := png.Encode(&buf, img); err != nil { |
| + t.Fatal(err) |
| + } |
| + a, err := client.Upload(ctx, "square.png", "image/png", buf.Bytes()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + sent, err := client.SendWith(ctx, "What colour is the shape in this image? Answer in at most five words.", "live-1", []string{a.ID}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var reply wire.Message |
| + for reply.ID == "" { |
| + page, err := client.Messages(ctx, "", 10) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, m := range page.Items { |
| + if m.Role == wire.RoleCoordinator && m.TurnID == sent.Turn.ID { |
| + reply = m |
| + } |
| + } |
| + turn, err := client.Turn(ctx, sent.Turn.ID) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if turn.State == wire.TurnFailed || turn.State == wire.TurnCancelled { |
| + t.Fatalf("turn %s: %s", turn.State, turn.Reason) |
| + } |
| + if ctx.Err() != nil { |
| + t.Fatal("no reply") |
| + } |
| + time.Sleep(time.Second) |
| + } |
| + turn, _ := client.Turn(ctx, sent.Turn.ID) |
| + t.Logf("reply on %s (attempt %d): %q", turn.Connection, turn.Attempt, reply.Text) |
| + if !strings.Contains(strings.ToLower(reply.Text), "red") { |
| + t.Fatalf("the model did not see the image: %q", reply.Text) |
| + } |
| +} |
diff --git a/internal/thintest/settings_browser_test.go b/internal/thintest/settings_browser_test.go| index 2c075ae5..26807e5f 100644 |
| --- a/internal/thintest/settings_browser_test.go |
| +++ b/internal/thintest/settings_browser_test.go |
| @@ -11,7 +11,7 @@ import ( |
| // option in settings causes the sliding nav to repeat." Every Settings |
| // change (Thinking words, Prefer, Pause and Resume, quiet hours) saves in |
| // the background and shows a quiet Saved tick: no navigation, no page |
| -// swap or reveal, the shell (and its nav) the same nodes, at 1280 with a |
| +// swap or reveal, the shell and its nav untouched, at 1280 with a |
| // mouse and 390 on touch. The server has each change. |
| func TestBrowserSettingsStayOnPage(t *testing.T) { |
| r := newToolRig(t) |
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json| index 9c879bca..0f2a4565 100644 |
| --- a/scripts/runner-reference-allowlist.json |
| +++ b/scripts/runner-reference-allowlist.json |
| @@ -10722,5 +10722,26 @@ |
| "match": "Node", |
| "count": 1, |
| "reason": "DOM API name (cloneNode, parentNode, selectNodeContents) in the Connections page script, not Node.js" |
| + }, |
| + { |
| + "path": "internal/equipo/static/chat-attach.js", |
| + "line_sha256": "13b42d119a97079d5d233745514ba4fbce10204eb4af4195f3ba095bef49b159", |
| + "match": "Node", |
| + "count": 1, |
| + "reason": "The DOM's cloneNode method copies a page template in the browser; not Node.js." |
| + }, |
| + { |
| + "path": "internal/equipo/static/settings.js", |
| + "line_sha256": "9766c2fbf47dd9b4b981941e6f60fbd0ca22471d2cdfef0434477f95335b3327", |
| + "match": "Node", |
| + "count": 1, |
| + "reason": "The DOM's importNode method adopts a node read from a fetched page; not Node.js." |
| + }, |
| + { |
| + "path": "internal/equipo/static/settings.js", |
| + "line_sha256": "fc61c1362dd13715a2b8713b393691d122c12ef5d3b55dd501e7b969a629cf1a", |
| + "match": "Node", |
| + "count": 1, |
| + "reason": "The DOM's cloneNode method copies a page template in the browser; not Node.js." |
| } |
| ] |