fix(host): send an inbox answer's files to the service
Merged
DA
14d ago+38+38+01234567890123456789-0-0-0123456789
Summary
- Files attached to an Inbox answer never reached the service.
codingAgentInboxAnswerinpackages/host/src/host-operator.tssent the answer's reply, choices, values, note, and key to the gateway, but left out itsattachments, so the composer dropped them before they reachedHostedCodingAgentClient.answerInbox. It now sends them whenever the answer has any. - New test in
host-operator.test.ts: an answer with a file reaches the gateway call with the file included. It fails without the fix.
Found while building the desktop half of Inbox thread messages (stacked on #3469). Split out off main so it lands right away.
Evidence
- Platform-independent checks:
pnpm check:affectedpasses exceptsrc/main/app-menu.test.ts, which fails only because the sandbox has no Electron binary.
Invariants
-
./scripts/check.shgreen. (CI) - JSON Schema goldens unchanged (
LUKE_UPDATE_FIXTURESnot run, or diff explained line by line). (CI) - Every behavior change has, in this PR, the test that fails without it; no change-detector test added. (manual; root
AGENTS.md"Testing") - Gateway envelope goldens unchanged. (CI)
- No new
astype assertion outside the allowlisted files. (CI via anti-slop) - No
Effect.runPromise/runSync/runForkoutside the runtime edges and the shimstools/anti-slop/effect-edges.jsonrecords. (CI viaanti-slop/no-run-promise-outside-edges) - No new
setTimeout/setInterval/new Promise/AbortController/fs.watchoutside the filestools/anti-slop/effect-edges.jsonrecords. (CI viaanti-slop/no-raw-async-primitives) - No Effect, Stream, or Layer written as a statement and dropped; a description a caller walks past runs nothing. (CI via
pnpm discarded-effect) - Test count equals the pre-PR count or the delta is listed. (+1 in
host-operator.test.ts) - Each hand-rolled file the PR replaces is deleted, or the part that remains is a permanent adaptor named in root
AGENTS.md's "The permanent adaptors" with the reason it stays. - Every
CLAUDE.md/AGENTS.mdsentence naming a changed part is edited; root pair stays byte-identical. (CI for pair existence; manual for wording) -
PRIVACY.mdunchanged, or the change is a product decision called out in the PR body. - Package
package.jsondeps match what the sources import by bare specifier;effectviacatalog:. (CI) - Barrel/door rule: no Node-reaching Effect module (
@effect/platform-node,effect/sql) behind a barrel the renderer or a web function opens. (CI: existing renderernode:grep plus a new grep for those specifiers in renderer bundles)
Notes
- Blockers or follow-up verification: None
Made with Luke
Summary by cubic
Fixes inbox answer attachments never reaching the service. The host operator now forwards an answer's attachments to the gateway, so files attached to an answer arrive with its reply, note, and choices.
- Adds a test verifying an answer with a file includes the file in the gateway call.