use an enum to define job streams#101
Open
emilyalbini wants to merge 1 commit intoea-mvulumtytlotfrom
Open
Conversation
emilyalbini
commented
Apr 20, 2026
Comment on lines
-66
to
+70
| "error", | ||
| JobStream::Error, |
Member
Author
There was a problem hiding this comment.
This is the only occurrence of error as a job stream, and nothing else in the codebase handled it. Should this be panic instead?
06282cc to
b73168c
Compare
emilyalbini
commented
Apr 20, 2026
| .worker_append() | ||
| .body(vec![WorkerAppend { | ||
| stream: "agent".into(), | ||
| stream: JobStream::Agent.to_string(), |
Member
Author
There was a problem hiding this comment.
Found another stream we don't handle anywhere else: agent seems to be only used when spawning a job fails. Maybe we should use panic instead? Or task/diag.{name} depending on what failed to spawn?
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.
Note: This PR is stacked on top of #100.
This PR refactors how we handle job stream names, replacing the string handling we do all over the place with a common
JobStreamenum. My goal for this is that the compiler should guide you through its errors when adding a new job stream, rather than having to search through the codebase for places where the stream should be handled.I chose for now to not have the server error out when an unknown stream is received, but that should be an easy change if we want to go for it.