Skip to content

feat(daemon): add computed fields to Run response#385

Open
proboscis wants to merge 1 commit intomainfrom
issue/orch-384/run-20260201-104218
Open

feat(daemon): add computed fields to Run response#385
proboscis wants to merge 1 commit intomainfrom
issue/orch-384/run-20260201-104218

Conversation

@proboscis
Copy link
Owner

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

  • Added PRStatus enum to protobuf (PR_STATUS_UNSPECIFIED, PR_STATUS_OPEN, PR_STATUS_MERGED, PR_STATUS_CLOSED)
  • Added pr_status, is_active, worktree_exists fields to Run message in proto
  • Implemented computation logic in types.go and proto_handler.go
  • Updated proto conversion functions in proto_convert.go
  • Regenerated Go and Python protobuf code

Evidence

Build passes:

$ go build ./...
(no errors)

Unit tests pass:

$ go test ./internal/daemon/...
ok      github.com/s22625/orch/internal/daemon  2.229s

$ go test ./internal/cli/...
ok      github.com/s22625/orch/internal/cli     0.788s

Resolves

orch-384

@proboscis proboscis force-pushed the issue/orch-384/run-20260201-104218 branch from c3217a3 to 0d1d376 Compare February 1, 2026 02:53
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
@proboscis proboscis force-pushed the issue/orch-384/run-20260201-104218 branch from 0d1d376 to 5d4016a Compare February 3, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant