Skip to content

orbit run readiness text shows only a reason code for most waits and hides the next step that --json carries - #9789

Merged
orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-25221-4e6db1e5
Nov 16, 2026
Merged

orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-25221-4e6db1e5

Conversation

@orbit-agent-01

Copy link
Copy Markdown
Contributor

Task

ORB-25221 — orbit run readiness text shows only a reason code for most waits and hides the next step that --json carries

Description

Found by the CLI/MCP UX review (ORB-25215).

Reproduction

Scratch workspace with no Git remote (PR ship mode) and one backlog task:

orbit run readiness            # TTY at 60/80/120, piped and --format plain all the same

Actual:

Snapshot only — eligible does not guarantee a task will start. Active leaf runs: 0/5; free slots: 5.
Resource throttle CPU source: load.
UXS-00001: waiting (pr_forge_remote_missing)

orbit run readiness --json carries the actionable text for the same task:

"reason": "pr_forge_remote_missing",
"detail": "PR delivery needs a Git remote on a forge host, but this checkout has no Git remote; nothing was dispatched. Switch this workspace to local delivery with `orbit workspace ship-mode local`, or tag the task `delivery:task_local_pipeline` to deliver it locally"

The same holds on the live store (read-only): orbit run readiness prints ORB-23862: waiting (no_drain_tag) cpu-light while the JSON row has a non-empty detail. Passing explicit IDs (orbit run readiness <id>) does not change it, and the text output gives no pointer to --json.

Cause

readiness_lines (crates/orbit-cli/src/command/run/readiness.rs:207-307) appends detail only for an allowlist of ten reasons (host_os_mismatch, host_labels_missing, browser_kit_missing, native_os_required, unverified_review_finding, local_route_before_pr/landing, provider_limit, awaiting_footprint, awaiting_exclusive_slot); the comment says "other long repair instructions stay in JSON". Every other reason that has a detail (pr_forge_remote_missing, no_drain_tag, not_backlog, ...) renders as a bare snake_case code.

Expected

An operator reading the text output can tell what to do next for every waiting task with a recorded detail, without guessing that --json holds it: either a short next step per row (or per distinct reason, so repeated rows stay compact), or an explicit pointer to the detail (--json, or orbit task show <id>). Keep the output compact; the fix is not to paste every long repair paragraph inline.

Impact

run readiness is the operator's "why isn't this starting?" command. For workspace-level blockers like a missing forge remote, the terminal answer is a code with no remedy, a dead end unless the operator already knows the JSON shape.

Acceptance Criteria

  • In a scratch PR-mode workspace with no Git remote, orbit run readiness text output (TTY and piped) shows a next step or an explicit pointer to it for a task waiting on pr_forge_remote_missing.
  • A waiting reason whose JSON row has a non-empty detail is no longer rendered as a bare reason code with no remedy or pointer; reasons already in the allowlist render as before.
  • orbit run readiness --json output is unchanged.
  • Any CLI output golden that covers readiness text is regenerated and its diff reviewed.

Execution Summary

Click to expand

Summary of Changes

  • Updated crates/orbit-cli/src/command/run/readiness.rs (readiness_lines) so that any waiting reason outside the existing allowlist whose JSON row contains a non-empty detail appends : see --json for detail instead of rendering as a bare snake_case reason code. Reasons in the allowlist continue to render their detail inline as before.
  • Added regression tests in crates/orbit-cli/tests/workspace/workspace_ship_mode.rs verifying that orbit run readiness text output (both piped and with explicit task ID) contains {plain}: waiting (pr_forge_remote_missing): see --json for detail.

Acceptance Criteria

  • In a scratch PR-mode workspace with no Git remote, orbit run readiness text output (TTY and piped) shows a next step or an explicit pointer to it for a task waiting on pr_forge_remote_missing. (Verified via workspace_ship_mode integration test)
  • A waiting reason whose JSON row has a non-empty detail is no longer rendered as a bare reason code with no remedy or pointer; reasons already in the allowlist render as before. (Verified in readiness_lines and provider_limits test)
  • orbit run readiness --json output is unchanged. (Verified via unchanged JSON structure and passing tests)
  • Any CLI output golden that covers readiness text is regenerated and its diff reviewed. (Verified via ./scripts/check-goldens.sh; no diffs)

Validation Commands

  • make ci-guards: passed
  • cargo fmt --all -- --check: passed
  • rustfmt --check --edition 2024 crates/orbit-cli/tests/workspace/workspace_ship_mode.rs: passed
  • scripts/build-budget.py -- cargo clippy -p orbit-cli --bins -- -D warnings -A clippy::disallowed_methods: passed
  • scripts/build-budget.py -- cargo clippy -p orbit-cli --all-targets -- -D warnings -A clippy::disallowed_methods: passed
  • RUSTDOCFLAGS="-D warnings" scripts/with-test-build-lint.sh scripts/build-budget.py -- cargo doc --no-deps -p orbit-cli: passed
  • ./scripts/check-goldens.sh: passed
  • cargo test -p orbit-cli --test workspace workspace_ship_mode: passed
  • cargo test -p orbit-cli --test process provider_limits: passed

Reconciliation

  • Changed paths: crates/orbit-cli/src/command/run/readiness.rs, crates/orbit-cli/tests/workspace/workspace_ship_mode.rs.
  • Task selectors: symbol:crates/orbit-cli/src/command/run/readiness.rs#readiness_lines:function, file:crates/orbit-cli/tests/workspace/workspace_ship_mode.rs.
  • Cleanup: clean working tree, no untracked files, no leftovers.

Validation

  • Not reported

Branch Freshness

  • Base ref: refs/remotes/origin/agent-main
  • Head ref: orbit/ORB-25221-4e6db1e5
  • Behind base: 0
  • Ahead of base: 1

orbit run readiness text shows only a reason code for most waits and hides the next step that --json carries

Updated `crates/orbit-cli/src/command/run/readiness.rs` (`readiness_lines`) so that any waiting reason outside the existing allowlist whose JSON row contains a non-empty `detail` appends `: see --json for detail` instead of rendering as a bare snake_case reason code. Reasons in the allowlist continue to render their detail inline as before. Added regression tests in `crates/orbit-cli/tests/workspace/workspace_ship_mode.rs` verifying that `orbit run readiness` text output (both piped and with explicit task ID) contains `{plain}: waiting (pr_forge_remote_missing): see --json for detail`.

Orbit-Task: ORB-25221
@orbit-agent-01 orbit-agent-01 added the orbit orbit related label Nov 16, 2026
@orbit-agent-01
orbit-agent-01 merged commit 14d3e91 into agent-main Nov 16, 2026
19 checks passed
@orbit-agent-01
orbit-agent-01 deleted the orbit/ORB-25221-4e6db1e5 branch November 16, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orbit orbit related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant