feat(daemon): add computed fields to Run response#385
Open
Conversation
c3217a3 to
0d1d376
Compare
Add pr_status, is_active, and worktree_exists computed fields to the Run response from daemon. This moves derived state computation from CLI/TUI clients to the daemon, ensuring consistent behavior. - Added PRStatus enum (unspecified/open/merged/closed) to protobuf - Added pr_status, is_active, worktree_exists fields to Run message - Implemented computation logic in daemon (types.go, proto_handler.go) - Updated proto conversion functions - Regenerated Go and Python protobuf code Resolves: orch-384
0d1d376 to
5d4016a
Compare
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.
Summary
Adds computed fields to the daemon's Run response so clients don't have to compute derived state:
pr_status- open/merged/closed/- (computed from PR URL + run status + branch state)is_active- bool (computed from run status being queued/booting/running/blocked)worktree_exists- bool (daemon checks filesystem)Changes
PRStatusenum to protobuf (PR_STATUS_UNSPECIFIED, PR_STATUS_OPEN, PR_STATUS_MERGED, PR_STATUS_CLOSED)pr_status,is_active,worktree_existsfields to Run message in prototypes.goandproto_handler.goproto_convert.goEvidence
Build passes:
Unit tests pass:
Resolves
orch-384