Repository navigation
fix: handle decoder reader thread startup failures - #4
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Reviewer's GuideUses of the APIPropagate ingest startup failures from the worker pipeline instead of continuing without a reader.
ImplementationMake decoder reader thread startup fallible and clean up decoder processes and the stderr drainer when either spawn fails.
TestsUpdate ingest tests to unwrap the new fallible startup result.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/worker.rs" line_range="471" />
<code_context>
cancel: Arc<AtomicBool>,
children: Children,
-) -> Ingest {
+) -> Result<Ingest, String> {
let diagnostics = thread::Builder::new()
.name("scribe-stderr".into())
</code_context>
<issue_to_address>
**Decoder tests fail to compile**
When the test target is compiled, both test call sites call `.finish()` directly on the `Result<Ingest, String>` returned by `spawn_ingest`, so method resolution fails and the test build does not compile.
Unwrap or otherwise handle the `Result` at both test call sites before calling `.finish()`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and if starting the stderr reader fails, the function returns an error without calling kill_all, so decoder child processes may continue running and hold resources after the job fails. Reverting restores the previous panic behavior but does not clean up children from an already-running instance; the leak is bounded and can be repaired by stopping those processes.
Blocking findings: src/worker.rs:471
|
@sourcery-ai review |
summary
validation
Summary by Sourcery
Replace panic-based decoder reader startup with error handling and cleanup throughout the worker pipeline.
Bug Fixes:
Tests: