internal/process: surface upstream output on premature exit - #897
internal/process: surface upstream output on premature exit#897davidbarnhart wants to merge 1 commit into
Conversation
When a model's process exits before becoming ready, clients received the opaque "upstream command exited prematurely" with none of the upstream server's output, so a bad launch (for example an invalid argument) could not be diagnosed from the client. Include the captured process log so the real cause reaches the caller; because WaitReady subscribers share the start result, every waiting request benefits too. - prematureExit now appends processLogger.GetHistory() when non-empty - clear the process log before each launch so only the current attempt's output is surfaced, not accumulated history from earlier launches
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| internal/process/process_command.go | Adds processLogger.Clear() before cmd.Start() and enriches prematureExit() with GetHistory(); ordering and synchronization are correct because cmdDone is closed only after cmd.Wait() (which drains all I/O), so GetHistory() is always called after all subprocess writes have completed. |
| internal/process/process_command_test.go | Adds TestProcessCommand_PrematureExitSurfacesOutput, which passes an unknown flag to the simple-responder binary and verifies both the premature-exit error text and that the upstream flag error appears in the returned error message. |
Reviews (1): Last reviewed commit: "internal/process: surface upstream outpu..." | Re-trigger Greptile
When a model's process exits before becoming ready, clients received the
opaque "upstream command exited prematurely" with none of the upstream
server's output, so a bad launch (for example an invalid argument) could not
be diagnosed from the client. Include the captured process log so the real
cause reaches the caller; because WaitReady subscribers share the start
result, every waiting request benefits too.
output is surfaced, not accumulated history from earlier launches
fixes #896