summaryrefslogtreecommitdiffhomepage
path: root/backend-handoff.md
diff options
context:
space:
mode:
Diffstat (limited to 'backend-handoff.md')
-rw-r--r--backend-handoff.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/backend-handoff.md b/backend-handoff.md
index e6da7b9..d1d0756 100644
--- a/backend-handoff.md
+++ b/backend-handoff.md
@@ -648,3 +648,50 @@ changes, NO contract changes — the wire types and every endpoint consumed are
toggle default/reversibility/caching/fallback/mimeType); biome clean; `build` succeeds.
Manual browser sanity (paste a ~3MB PNG → staged size drops; uncheck → original;
re-check → no visible re-encode; send works) still needs a human at the page.
+
+## 2026-10-24 — feature/text-file-embeds
+
+Implemented saved text-file chat embeds using standalone `[Plan](text-file:notes/plan.md)`.
+Markdown renders inside a tool-call-style inset well with first/last six-source-line
+preview, Expand/Collapse, Refresh/Retry, loading/empty/error states. Other text/code
+files remain literal. Backend adds authoritative `/text-file-context` preflight and
+bounded `/text-file` read routes; `TextFileQuery`, `TextFileResponse`, and
+`TextFileContextResponse` are additive transport-contract0.26.0 exports mirrored in
+`.dispatch/transport-contract.reference.md` (local file dependency unchanged).
+Both guards are supplied; remote computer never falls back to local.
+
+256KiB strict UTF-8, regular local files only, no truncation/final symlinks, live
+current-disk views (not snapshots/watchers), no history injection/nested fetches.
+Cache per mounted chat:32 active paths/4 loads; max8 embeds/message. Existing
+Host/Origin trusted-network boundary retained (not new bearer/session auth).
+Initial guidance reaches custom/default newly constructed prompts; persisted old
+prompts unchanged until ordinary reconstruction. Warm parity verified. Explicit
+per-turn systemPrompt bypass preserved.
+
+Verification: typecheck0 errors/0warnings; Biome clean308 files; Vite build succeeds;
+2586 tests pass twice with `NODE_OPTIONS=--no-experimental-webstorage`; two real
+cross-repo ephemeral HTTP/Svelte integration tests pass opt-in. Plain Node26 test
+run has26 baseline localStorage failures independently reproduced on unmodified
+HEAD archive. Backend4277 Vitest/190 Bun green, typecheck/lint/standalone compile
+green; standard external-Claude bundle has existing missing @dispatch/kernel issue.
+No merge/push/deployment/shared restart. Full report:
+`notes/text-file-embeds-implementation.md`. Human graphical desktop/mobile check
+remains; no cross-repo contract asks open for this slice.
+
+### Bun-native verification correction (2026-10-24)
+
+Supersedes the Node-backed verification paragraph above: both repository test
+scripts now explicitly launch Vitest with Bun (`bun --bun .../vitest.mjs`).
+`bun run test` passes under Bun with no NODE_OPTIONS: frontend2587 passed/2
+opt-in skipped repeatedly; backend4278 passed/9 existing SSH skips twice;
+native Bun tests190 passed. `bun run test:text-file-live` passes2 against the
+real ephemeral HTTP transport. Bun-run typecheck/lint/build pass (FE309 files,
+backend754); existing build advisories/external-Claude wrapper limitation remain.
+
+Corrected pre-existing Bun test assumptions (Bun.serve spy instead of global
+replacement, directory ordering, homedir caching). Added prompt cycle detection
+in tool-call summary serialization plus shared-reference regression test; the
+Bun timeout is fixed, not increased. Live probe uses a native-signal jsdom
+environment instead of Node-only utility APIs. No production wire/feature
+semantics changed, no subagents/deployment/merge/push. Full final verification
+is in the Bun-native follow-up of notes/text-file-embeds-implementation.md.