Re-order shell call events#42
Conversation
Greptile SummaryThis PR re-orders the terminal SSE events emitted by shell calls so that
Confidence Score: 5/5Safe to merge — the change is a pure ordering fix with no logic mutations, and the new ordering is guarded by two channel-capture tests covering both code paths. Both the success and failure paths correctly swap to output-before-call ordering, the helper extraction is a clean refactor that preserves all parameters, and the new unit tests directly assert the wire ordering contract. No data is mutated and no new error surfaces are introduced. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant SE as ShellExecutor
participant Ch as event_tx (ordered channel)
participant Cl as SSE Consumer
Note over SE,Cl: Success path (emit_success_done)
SE->>Ch: format_shell_call_output_item(Done, exit_code, stdout, stderr, files, killed)
SE->>Ch: "format_shell_call_item(Done, status=completed|incomplete)"
Ch-->>Cl: shell_call_output.done arrives first
Ch-->>Cl: shell_call.done arrives second
Note over SE,Cl: Failure path (emit_failure_done)
SE->>Ch: "format_shell_call_output_item(Done, -1, stderr, killed=true)"
SE->>Ch: "format_shell_call_item(Done, status=incomplete)"
Ch-->>Cl: shell_call_output.done arrives first
Ch-->>Cl: shell_call.done arrives second
Reviews (3): Last reviewed commit: "Review fixes" | Re-trigger Greptile |
No description provided.