fix(commands): resolve FEAT-019 review findings - #5839
Merged
Conversation
…#5588) (Hmbown#5832) - Remaining-credit lookup was DeepSeek-only (and /balance was a stub even there). One fetch_balance seam now covers DeepSeek /user/balance, OpenRouter /credits, and SiliconFlow /user/info. /balance runs a live fetch; the opt-in footer chip renders the parked value. - Ghost-text prompt suggestions gated on the DeepSeek enum even though the generator speaks ordinary Chat Completions. Gate on wire protocol so OpenAI/OpenRouter/custom/Z.ai routes can launch with their own credentials; Messages and Responses stay out. - MCP deepseek/deepseek-reply omitted-model calls hardcoded deepseek-v4-pro. They now follow Config::default_model() for the active provider. Co-authored-by: CodeWhale Bot <bot@codewhale.net> Co-authored-by: Grok 4.6 <grok@x.ai>
…tion (Hmbown#5829) Harvested from PR Hmbown#5825 by @aboimpinto
* feat(tui): per-session control socket with message/interrupt/relaunch/status verbs Config-gated [control_socket] table (off by default) binds <sessions-dir>/<session-id>/control.sock (0600) per running session, speaking a newline-framed JSON-RPC. Verbs: message (structured user message through the composer dispatch path; queued under load), interrupt (the extracted Esc cancel body, shared with the Esc key path), relaunch (seam: dispatches the /relaunch slash-command path — no mechanics duplicated here), status (turn/goal snapshot answered by the socket thread). Wiring: run_event_loop constructs SessionControl and reconciles/updates/drains once per iteration; the socket runs on background threads with bounded reads (1 MiB) and 5 s dispatch timeouts. Unix-only; non-unix parses the key but refuses to bind. Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> * fix(tui): back off control-socket bind retries after a refused takeover A second live process holding a session's socket made the per-frame reconcile retry the connect-probe and warn-log every iteration. Retries now back off (5 s in prod, 200 ms under test) keyed on the session id, so switching sessions is never delayed by another session's refusal. Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> * fix(tui): make accepted control-socket connections blocking on BSD platforms The listener is nonblocking, and on macOS/FreeBSD an accepted socket inherits O_NONBLOCK from the listener (Linux accepted sockets are blocking). The connection handler assumes blocking reads, so on macOS a large request hit EAGAIN mid-frame, the handler dropped the connection, and the client's in-flight write failed with BrokenPipe — the oversized-request test failed exactly this way on macOS CI. Setting the accepted stream back to blocking (a no-op on Linux) makes the handler's bounded-read model hold on every platform. Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> * fix(tui): cfg-gate unix-only control-socket items for Windows builds The Windows CI gate (cargo test --no-run) denies unused imports and dead code under -D warnings. On non-unix targets the socket transport does not exist, so its imports, timing constants, and request/response types are unreachable there. Split the io/atomic imports and gate the five socket timing constants with cfg(unix), and mark the six protocol types (Request, Method, MessageParams, EmptyParams, ControlCommand, ResponseResult) with a scoped allow: they stay reachable in the portable protocol/parsing tests and on unix builds, and are only unreachable in the plain Windows lib build. The dead-code budget file is untouched. Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> * docs(tui): reference the filed issue Hmbown#5533 in the control-socket module doc The module doc still carried the pre-filing placeholder numbering; the issue is filed as Hmbown#5533 and the changelog/PR text already use it. Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> * fix(config): remove syntax errors in tests for control socket --------- Signed-off-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> Co-authored-by: M-Maciej <130112810+M-Maciej@users.noreply.github.com> Co-authored-by: CodeWhale Bot <bot@codewhale.net>
Remove the orphaned loop topology entry that fails the migration gate, enforce exact project authority, make contextual fixtures fail closed, and pin empty capability containment semantics. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
Preserve the FEAT-019 memory facet and capability-scoped dispatch while integrating current main, including FEAT-022 skill-group handlers and the control-socket changes. Resolve the combined migration frontier to five pending groups. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No-Issue: review fixes and current-main reconciliation for maintainer-owned FEAT-019 PR #5833
Summary
Resolves the remaining review findings on #5833:
utility/loop_cmd.rstopology entry that fails the migration manifest gateWORKSPACEauthority from/goaland pin exact project capability sets in testsexpectcalls in/dispatchand the FEAT-015 fixture with safe errorsCommandCapabilities::contains(NONE)is falseValidation
python3 scripts/check-command-migration-manifest.py— PASSpython3 scripts/test_check_command_migration_manifest.py— 56/56 PASScargo fmt --all -- --check— PASScargo test -p codewhale-command-contract --lib --locked— 21/21 PASS/dispatchtests — 4/4 PASS-D warnings— PASSmainlocally and resolved all six command-contract/TUI conflicts while preserving FEAT-019 memory and FEAT-022 skillsgit diff --check— PASSThis targets the maintainer-owned
reland-feat019branch because contributor access to that branch is read-only.Paulo Aboim Pinto