diff --git a/docs/handoffs/chicorytv-issue-queue.md b/docs/handoffs/chicorytv-issue-queue.md index c60dc3c23..191f19c1a 100644 --- a/docs/handoffs/chicorytv-issue-queue.md +++ b/docs/handoffs/chicorytv-issue-queue.md @@ -258,3 +258,27 @@ HARD CONSTRAINTS: (2026-07-08) predates all of #253 (`git merge-base --is-ancestor v26.6.0` → NOT an ancestor), so "one release soaks" hasn't begun; resolve any "after a release soaks" against the actual deployed tag, not wall-clock. But that's the narrow reason PR4 is blocked, not why the gate barely matters. +- **Harden a soon-to-grow feature with a runtime *posture/toggle*, not a hardcoded clamp** (2026-07-12, #289). + The MCP verb-guard finding said "assert `HttpMethod.Get`", but the MCP's *final* design (#58) is read+write, so + a hardcoded GET-clamp would just be ripped out later. Shipped a runtime **read-only posture** + (`ERSATZTV_ALLOW_WRITES`, default false) enforced in the executor instead — same runtime backstop (a wrong + catalog entry can't mutate), but the toggle IS the seam the future write tools slot behind. General rule: when + a security fix constrains a capability the roadmap will later want, make the safe state the *default of a + switch*, not a wall. Check the feature's tracking issue for its end-state before choosing the shape of a guard. +- **Fixing onto an unmerged feature branch (not `main`): branch off it, land by FF-push, never touch a sibling + worktree that has it checked out** (2026-07-12, #289 → PR #76's `issue58-mcp`). Worked in a fresh worktree off + `origin/issue58-mcp`, then landed with `git push origin fix/289:issue58-mcp` (pure fast-forward — verify with + `git merge-base --is-ancestor`). The owning session's local `issue58-mcp` worktree just pulls; you never commit + inside a checkout you didn't create. **Gotcha that bit me:** I did recon by `Read`ing files from the + *pre-existing* `ersatztv-issue58-mcp` sibling worktree, so my later `Edit`s carried those paths and landed + there — while `dotnet` built the fresh worktree (unchanged) → "0 new tests" tipped it off. After creating a new + worktree, do the first `Edit`/`Read` against ITS absolute paths and `git status` the new worktree before + building; don't let a recon-worktree path leak into the implementation. +- **`HttpCompletionOption.ResponseHeadersRead` moves the body read OUTSIDE `HttpClient.Timeout`** (2026-07-12, + #289, cold-fork-caught HIGH regression). Switching to `ResponseHeadersRead` to stream+cap a response body + silently drops the body read out of `HttpClient.Timeout`'s coverage; if the read token is `None`, a slow-drip + upstream hangs forever. Fix = a per-request linked `CancellationTokenSource.CancelAfter(timeout)` threaded into + BOTH `SendAsync` and the stream reads, with `HttpClient.Timeout = InfiniteTimeSpan` so one timer owns it. And: + transport/timeout exceptions must be caught and turned into a response (a `-32603`), else the failure escapes + the handler and the client hangs awaiting a reply that never comes. Proved live with a black-hole socket + (accept, never respond) → 1s timeout → error in ~1s, no hang.