mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-07 00:24:50 +08:00
Keep resumed JSON command surfaces machine-readable
Resumed slash dispatch was still dropping back to prose for several JSON-capable local commands, which forced automation to special-case direct CLI invocations versus --resume flows. This routes resumed local-command handlers through the same structured JSON payloads used by direct status, sandbox, inventory, version, and init commands, and records the inventory parity audit result in the roadmap. Constraint: Text-mode resumed output must stay unchanged for existing shell users Rejected: Teach callers to scrape resumed text output | brittle and defeats the JSON contract Confidence: high Scope-risk: narrow Reversibility: clean Directive: When a direct local command has a JSON renderer, keep resumed slash dispatch on the same serializer instead of adding one-off format branches Tested: cargo fmt --check; cargo test --workspace; cargo clippy --workspace --all-targets -- -D warnings Not-tested: Live provider-backed REPL resume flows outside the local test harness
This commit is contained in:
@@ -311,6 +311,8 @@ Priority order: P0 = blocks CI/green state, P1 = blocks integration wiring, P2 =
|
||||
22. **Opaque failure surface for session/runtime crashes** — repeated dogfood-facing failures can currently collapse to generic wrappers like `Something went wrong while processing your request. Please try again, or use /new to start a fresh session.` without exposing whether the fault was provider auth, session corruption, slash-command dispatch, render failure, or transport/runtime panic. This blocks fast self-recovery and turns actionable clawability bugs into blind retries. **Action:** preserve a short user-safe failure class (`provider_auth`, `session_load`, `command_dispatch`, `render`, `runtime_panic`, etc.), attach a local trace/session id, and ensure operators can jump from the chat-visible error to the exact failure log quickly.
|
||||
23. **`doctor --output-format json` check-level structure gap** — **done**: `claw doctor --output-format json` now keeps the human-readable `message`/`report` while also emitting structured per-check diagnostics (`name`, `status`, `summary`, `details`, plus typed fields like workspace paths and sandbox fallback data), with regression coverage in `output_format_contract.rs`.
|
||||
24. **Plugin lifecycle init/shutdown test flakes under workspace-parallel execution** — dogfooding surfaced that `build_runtime_runs_plugin_lifecycle_init_and_shutdown` can fail under `cargo test --workspace` while passing in isolation because sibling tests race on tempdir-backed shell init script paths. This is test brittleness rather than a code-path regression, but it still destabilizes CI confidence and wastes diagnosis cycles. **Action:** isolate temp resources per test robustly (unique dirs + no shared cwd assumptions), audit cleanup timing, and add a regression guard so the plugin lifecycle test remains stable under parallel workspace execution.
|
||||
26. **Resumed `/sandbox` JSON parity gap** — **done**: direct `claw sandbox --output-format json` already emitted structured JSON, but resumed `claw --output-format json --resume <session> /sandbox` still fell back to prose because resumed slash dispatch only emitted JSON for `/status`. The resumed `/sandbox` path now reuses the same JSON envelope as the direct CLI command, with regression coverage in `rust/crates/rusty-claude-cli/tests/resume_slash_commands.rs`.
|
||||
27. **Resumed inventory JSON parity gap for `/mcp` and `/skills`** — **done**: resumed slash-command inventory calls now honor `--output-format json` via the same structured renderers as direct `claw mcp` / `claw skills`, with regression coverage for resumed `list` output under an isolated config home.
|
||||
**P3 — Swarm efficiency**
|
||||
13. Swarm branch-lock protocol — **done**: `branch_lock::detect_branch_lock_collisions()` now detects same-branch/same-scope and nested-module collisions before parallel lanes drift into duplicate implementation
|
||||
14. Commit provenance / worktree-aware push events — **done**: lane event provenance now includes branch/worktree/superseded/canonical lineage metadata, and manifest persistence de-dupes superseded commit events before downstream consumers render them
|
||||
|
||||
Reference in New Issue
Block a user