You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
orders place --autoslice hides rejected child slices in human output #4
Type: bug · Area: CLI · Reported severity: high Verification: re-checked by hand (code + mock_responses/autoslice_response.json)
Problem
After a live kite orders place --autoslice --confirm, human output prints success with the parent order ID only. The children array is never shown, so rejected slices are hidden and the exit code is 0.
Scenario
The official mock mock_responses/autoslice_response.json returns four children; the third is {"error": {"error_type": "MarginException", "message": "Insufficient funds. Required margin is 228365.92 but available margin is 228358.50."}}.
The CLI prints ✓ Order submitted BUY <full qty> … and Order ID …, then exits 0. The user believes the full quantity was placed. Only --json shows children.
Where
src/app/render.rs:1258-1279: write_result renders order_id and returns; the rest of the response is skipped.
Nothing outside the TUI handles children, and no CLI test covers autoslice.
Suggested fix
When children is present, render one line per slice (order ID or error), adjust the headline when any slice failed, and consider a non-zero exit code for partial failure. Add a tests/cli_output.rs fixture using the autoslice mock.
Found in a code review of 97c5bb4 (identical to upstream main at the time) on 2026-11-08. Line links point at that commit.
Activity
jay-tau commentedon Nov 12, 2026
Fixed upstream by zerodha#5 in zerodha@ee3bf08, which closed zerodha#4. Not released yet. The TUI has the same gap and isn't covered by that fix.
jay-tau commentedon Nov 12, 2026
The TUI gap mentioned above is now zerodha#6, with a fix in zerodha#7.