From f192c40b2a3643a9ab97303310db8dbc7547ee35 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 14:59:31 +0100 Subject: Robustness: retry with backoff, explained errors, --list, --session creates - four attempts on 408/425/429/500/502/503/504 and transport errors, honouring Retry-After - backoff is interruptible so Ctrl-C is not held for up to 8s - context overflow, auth failure and rate limit messages say what to do - --list shows id/model/messages/age without needing a key - --session creates the session when the id does not exist - probes recorded: session header is mandatory, consecutive user messages allowed --- docs/PLAN.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/PLAN.md') diff --git a/docs/PLAN.md b/docs/PLAN.md index b1273b1..75fd25b 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -110,6 +110,23 @@ against the live API: streaming, tool calls, `reasoning_content`, usage and 2.0 MB stripped i686 binary, `GLIBC_2.34` required. Verified by running the whole acceptance test inside `--platform linux/386 debian:12`. +**M6 — Robustness.** ✅ Done. + +- Retries on 408/425/429/500/502/503/504 and on transport errors: four attempts, + 1 s / 2 s / 4 s backoff, `Retry-After` honoured, and the backoff is + interruptible so Ctrl-C does not wait it out. +- Provider errors explain themselves: context overflow says to start a new + session, 401/403 says where the key lives, 429 points at the plan limit and + `--model`. +- `--list` shows id, model, message count and age; `--session ` creates the + session when the id is new instead of erroring. + +Probed against the live gateway: `x-opencode-session` is mandatory (400 +`MissingSessionID` without it); two consecutive user messages are accepted, so a +turn that failed after writing its prompt can be resumed without editing the +transcript; and `deepseek-v4.1-flash` accepted a 500k-token prompt, so the +context ceiling is far higher than the 128k the plan assumed. + ## Acceptance test (v1) > "Make a simple calculator in C" — run on the i386 box, from an empty directory. -- cgit v1.2.3