The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
37354af00265b4a0e521d2fb46b94efdf17b807f / Yicong Huang 
<[email protected]>
refactor(local-dev): unify the CLI surface for agent use (#6138)

### What changes were proposed in this PR?

The local-dev CLI grew unevenly, which makes it awkward to drive from
agent CLIs and scripts. This PR unifies the surface:

1. **`--json` on every one-shot subcommand.** `status`/`up`/`down`
already had it; `auto` and `version` now accept it too. The convention
is unchanged: human progress goes to stderr, one machine-readable status
JSON object goes to stdout.
2. **`up <service>` / `down <service>` replace `start`/`stop`.** The
single-service `up` uses the same build knob as the full-stack form:
rebuild + bounce only if the service's source changed since the last
build (default), `--build` forces it, `--skip-build` never builds. It
also handles the amber-sibling dist sharing (`texera-web` /
`computing-unit-master` bounce together) and runs the jOOQ
postgres-readiness check before any sbt build (#6007). The old
`start`/`stop` and the bare `<service>` shorthand now refuse with a
pointer to the new spelling. In the TUI, `u <svc>`, `d <svc>`, `s
<svc>`, and a bare `<svc>` map onto the new forms.
3. **`--skip-build` replaces `--no-build`** (the old flag refuses with a
rename hint).
4. **Every `--json` payload carries `elapsed_seconds`** — the command's
total wall-clock runtime, so agents can log how long an `up`/`auto` took
without wrapping the call in their own timer.

One behavioral fix that falls out of (2): a full-stack `up` with no
selector re-decides (and resets) the persisted deploy-source pointer,
but `up <service>` is a scoped operation, so the startup peek now leaves
the pointer alone when a positional service argument is present — a
single-service bounce on a deployed PR worktree no longer silently
re-points the deployment at the main checkout.

### Any related issues, documentation, discussions?

Closes #6137. The `--help` header and the `status` footer hints are
updated in place; `bin/local-dev/README.md` needed no changes.

### How was this PR tested?

- `bash bin/local-dev/tests/test_local_dev_sh.sh` — 45 passed, 0 failed.
Updated/added cases: unknown subcommand and `up <unknown-service>`
errors, `start`/`stop` refuse with the new spelling, `--no-build`
refuses with the rename hint, full-stack-only knobs (`--fresh`,
`--skip`, selectors) are rejected in the single-service form, at most
one positional service, `cmd_auto` wires `--json`, `version --json` and
`status --json` carry `elapsed_seconds`, and the startup peek guards the
deploy-pointer reset (isolated `TEXERA_LOCAL_DEV_DIR` so the flag-error
`up` invocations never touch a real deployment's state).
- `pytest bin/local-dev/tests/test_local_dev_tui.py` — 43 passed.
- Manual smoke on a live stack: `version --json`, `status --json` (14/14
running, `elapsed_seconds` present), `--help` renders through the new
end-marker `sed` range.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Fable 5)

Co-authored-by: Claude Fable 5 <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/28733115045

With regards,
GitHub Actions via GitBox

Reply via email to