diff --git a/docs/decisions.md b/docs/decisions.md index 380aab1..d46b869 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -26,6 +26,7 @@ Approved by the owner on 2026-09-17. One commit each. | # | Change | Evidence | |---|---|---| | P1 | Inference contract 6: the `tools` array is fixed per epoch. `find_tool` returns schemas as a tool result and the model calls them through a `call_tool(name, arguments)` meta-tool. Never instruct the model to call an undeclared tool. | M0 (h): adding a tool re-read the whole prompt; undeclared calls were coerced into `write_file`. | +| P2 | Inference contract 2: the session log stores assistant messages exactly as returned, including `reasoning_content`, and replays them unchanged. Remove the "known risk" about dropped thinking blocks. | M0 (e): Ornith's template keeps every think block. | ## Proposed changes to the design brief @@ -33,7 +34,6 @@ From M0 and the kickoff review. None is applied yet. Each lands as its own commi | # | Change | Evidence | |---|---|---| -| P2 | Inference contract 2: the session log stores assistant messages exactly as returned, including `reasoning_content`, and replays them unchanged. Remove the "known risk" about dropped thinking blocks. | M0 (e): Ornith's template keeps every think block. | | P3 | Inference contract 7: requests set `return_progress: true`; progress events count as liveness. | M0 (i): otherwise the stream is silent during prefill. | | P4 | Inference contract 8: the thinking cap uses `reasoning_control` and the control endpoint. | README b10809. Not yet exercised. | | P5 | Settle the open question: chat-completions with server-side tool parsing. | M0 (b), (c). | diff --git a/docs/design.md b/docs/design.md index a1fcd29..8a8eebf 100644 --- a/docs/design.md +++ b/docs/design.md @@ -84,7 +84,10 @@ ordinary outbound networking can reach the whole tailnet and the internet as the measured with the server's tokenizer, enforced by a test. 2. **Append-only.** The request for turn N+1 is a strict extension of the request for turn N. Nothing volatile (time, heartbeat notes, memory refreshes) goes anywhere but the newest message. - Enforced by a property test on the serialized message array. + Enforced by a property test on the serialized message array. The session log stores each + assistant message exactly as the server returned it (`content`, `reasoning_content`, + `tool_calls`) and replays it unchanged. Ornith's template keeps every thinking block, so + dropping or editing one changes the prefix. 3. **No in-place pruning.** Tool results are size-capped when first appended, never trimmed later. 4. **Compaction is an epoch change.** It happens only when the session is idle, writes a summary, and starts a new epoch whose prefix is the baseline plus the summary. The old log is kept. @@ -109,9 +112,7 @@ ordinary outbound networking can reach the whole tailnet and the internet as the Open question settled by measurement in M0: use the server's chat-completions endpoint with server-side tool parsing, or render the template in-process for byte-exact prefix control. Default -to chat-completions. Switch only if the M0 cache measurements fail. Known risk: Qwen-style -templates drop earlier thinking blocks from history, which changes the rendered prefix at the last -assistant turn. +to chat-completions. Switch only if the M0 cache measurements fail. ## Authority contract