mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-28 02:34:59 +08:00
roadmap: #290 filed
This commit is contained in:
12
ROADMAP.md
12
ROADMAP.md
@@ -17309,3 +17309,15 @@ Gap. Compaction lacks diagnostic receipts: input message count, compactable pref
|
||||
Required fix shape: (a) extend `CompactionResult` with `skip_reason: Option<CompactionSkipReason>`, `estimated_session_tokens`, `estimated_compactable_tokens`, `message_count`, `compactable_message_count`, `preserve_recent_messages`, `max_estimated_tokens`, `existing_summary_present`, and `boundary_adjusted`; (b) make text output report the real reason instead of always “below threshold”; (c) make resumed `/compact` JSON include the same diagnostics; (d) align live and resumed manual compact defaults or explicitly report the config difference; (e) regression-test skipped cases for too-few messages, already-compacted session, below-token-threshold, and boundary-preserved tool pairs. Acceptance: a skipped `/compact` tells the user and automation exactly why no messages were removed and whether another recovery path is needed.
|
||||
|
||||
**Status:** Open. No source code changed. Filed 2026-04-26 19:33 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `a6565ae` before filing. Cluster delta: session-continuity-auto-compaction-semantics 2→3 (#287 timing + #288 failure receipt + #289 manual compact skip diagnostics). Concrete delta this cycle: ROADMAP-only pinpoint appended from manual `/compact` code audit.
|
||||
|
||||
## Pinpoint #290 — Upstream stream-init failures (`empty_stream`) bypass typed JSON envelope
|
||||
|
||||
Dogfooded 2026-04-26 21:30 KST from live gaebal-gajae session evidence: `500 empty_stream: upstream stream closed before first payload` hit 4 times in ~25 min on the same CCAPI/Anthropic routing. When upstream provider closes the stream before the first payload byte arrives, claw-code surfaces the failure as a bare-string error — not as a typed JSON envelope with `failure_class`, retry recommendation, or upstream provider attribution. `--output-format json` callers receive unstructured text; automation cannot distinguish stream-init failure from mid-stream disconnection, from context-window failure, or from network timeout.
|
||||
|
||||
Concrete failure mode: gaebal-gajae's sessions fail repeatedly with `500 empty_stream: upstream stream closed before first payload`. Under `--output-format json` the output is not `{ kind: "error", failure_class: "upstream_stream_init", cause_class: "stream_closed_before_first_payload", upstream_provider: "anthropic", recommended_retry: true, recommended_backoff_ms: <int> }` — it is a bare formatted string. A claw-driven orchestrator cannot safely distinguish "retry immediately" (transient stream-init) from "do not retry" (context-window exceeded) or "wait before retry" (rate-limit). The visible result is repeated 500s with no structured recovery path and no auto-retry guidance.
|
||||
|
||||
Gap. Stream-init error paths (pre-first-payload provider failure) are not covered by the JSON envelope contract. This is distinct from: #266 (typed-error-kind taxonomy — covers provider error categorization broadly but does not enumerate `upstream_stream_init` as a discriminant class); #287 (auto-compaction reactive — session-size-driven; this is transport-init failure); #288 (JSON envelope failure-path coverage — covers context-window failures specifically; #290 generalizes to ALL stream-init failure classes and adds retry/backoff guidance that #288 does not address).
|
||||
|
||||
Required fix shape: (a) classify `empty_stream` / stream-closed-before-first-payload as `failure_class=upstream_stream_init` in the JSON error envelope; (b) include `cause_class=stream_closed_before_first_payload`, upstream provider name and endpoint in the envelope; (c) include `recommended_retry: true/false` and `recommended_backoff_ms: <int>` for transient stream-init classes; (d) add a live recovery hint in text output ("upstream provider transient; retry in N seconds"); (e) regression-test `--output-format json` with a synthetic upstream-stream-init failure to assert parseable JSON with the correct discriminant fields. Acceptance: any stream-init failure is machine-readable and gives both humans and orchestrators an unambiguous retry/backoff signal.
|
||||
|
||||
**Status:** Open. No source code changed. Filed 2026-04-26 21:31 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `096f155` before filing. Live evidence: gaebal-gajae 4× `500 empty_stream` in ~25 min, 2026-04-26 KST evening. Cluster delta: json-envelope-failure-path +1 (stream-init variant). Concrete delta this cycle: ROADMAP-only pinpoint appended from live gaebal-gajae session evidence.
|
||||
|
||||
Reference in New Issue
Block a user