Add orch wait command for run status changes#440
Open
proboscis wants to merge 1 commit into
Open
Conversation
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
orch wait <RUN_REF> --until <status> [--timeout N]WaitForStatusproto RPC that resolves the run once, polls daemon-owned run state, and returns when the target status is observedFlow
Evidence
go build ./...uv tool run semgrep --error --config .semgrep/ ./internal/cli/ ./internal/monitor/ ./internal/daemon/ --exclude='*_test.go'go test ./internal/cli -run 'Test(ParseWaitUntilStatus|RunWaitWithDeps|NewWaitCmdRequiresUntilFlag)'go test ./internal/daemon -run 'TestHandleProtoWaitForStatus|TestGetAttachInfoResponseMapping|TestProtoClientDialTarget'go test ./internal/orchapigo test ./internal/querypr_openwait:{ "issue_id": "orch-wait-demo", "ok": true, "run_id": "20260412-130000", "status": "pr_open" }waitingmatch:{ "issue_id": "orch-wait-demo", "ok": true, "run_id": "20260412-130100", "status": "waiting" }donematch:{ "issue_id": "orch-wait-demo", "ok": true, "run_id": "20260412-130200", "status": "done" }failedmatch:{ "issue_id": "orch-wait-demo", "ok": true, "run_id": "20260412-130300", "status": "failed" }orch wait orch-wait-timeout#20260412-140000 --until done --timeout 1daemon error: timeout waiting for orch-wait-timeout#20260412-140000 to reach status done (last status: running)10Notes
go test ./...still fails in this branch on an unrelated existing CLI test outside this change:internal/cli/TestBuildAgentPromptCustomTemplateexpected fallback prompt to include issue reference, got: "Issue: orch-3 - Custom"Ref: ISSUE-ORCH-WAIT-PR