v2.3 task 04: replacement ctxguard_router_test.go for the new refusal body; run notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 20:11:12 -07:00
co-authored by Claude Opus 5.5
parent d3f1d8e55a
commit ae7b10b4db
3 changed files with 123 additions and 5 deletions
+10 -3
View File
@@ -27,7 +27,7 @@ context refusal that is not llama-server's `exceed_context_size_error`.
`tools/smoke.sh` (v2: adds check 6, the dedicated listener).
- **04-ctx-error-docs** — the context refusal in llama-server's shape
`{"error":{"code":400,"type":"exceed_context_size_error","message":"prompt too large","n_prompt_tokens":N,"n_ctx":M}}`;
README. Given: replaces `proxy/ctxguard_test.go` (v2).
README. Given: replaces `proxy/ctxguard_test.go` (v2) and `proxy/ctxguard_router_test.go` (v2.1).
**Order matters:** 02's affinity test uses `/slots` (01); 03's listener test uses route affinity
(02). Each task is green on its own given tests plus all earlier ones.
@@ -49,8 +49,8 @@ the client's chat goes anyway, so this is the load the client asked for.
- Everything in `AGENTS.md`. Branch `v2.3` from `master`. One task, one fresh OpenCode session,
one commit. Given files are copied and never edited; earlier plans' given files stay protected,
except the four this plan replaces (`proxy/proxy_test.go`, `proxy/ctxguard_test.go`,
`example.toml`, `tools/smoke.sh`), whose v2.3 copies are then the protected ones.
except the five this plan replaces (`proxy/proxy_test.go`, `proxy/ctxguard_test.go`,
`proxy/ctxguard_router_test.go`, `example.toml`, `tools/smoke.sh`), whose v2.3 copies are then the protected ones.
## Changes during the run
@@ -65,3 +65,10 @@ the client's chat goes anyway, so this is the load the client asked for.
chunk, asserts the slot is still held; fails on the hack, passes without it). Owner removed the
`onFlush` hook and the `release` parameter from `forward`. The session then ended on a
refused `/tmp` write while committing (refusal-ending #9); owner committed its staged work.
- Task 03: first session emitted a stray `</tool_call>` after reading files and ended with no
change (model); restarted unchanged, done in 16 min (`fa1c398`).
- Task 04: **owner fault, correct stop.** The v2.1 given `ctxguard_router_test.go` also asserts
the refusal body (`e["max"]`); I grepped only for the `"prompt too large"` string when
writing the replacement list. Ornith implemented the new shape, saw the two protected tests
demand incompatible bodies, committed only its `stopped` row, and reported — exactly the
AGENTS.md rule. Replacement `ctxguard_router_test.go` (reads `error.n_ctx`) added.