fabro/lib/crates/fabro-cli/tests/it/cmd
Bryan Helmkamp b8af65a9c6
refactor(runs): blocked status canonicalization cleanup (#165)
## Summary

Stacked cleanup of the `canonicalize blocked run status` work (local
commit `d13cdf374`) plus reconciliation with origin's `canonicalize
paginated run list responses` (origin commit `8ab689da7`). Both efforts
ran in parallel and diverged on the column name (`blocked` vs `waiting`)
and on how the board response is shaped — this PR converges them,
keeping `blocked` as the canonical column id while adopting origin's
`column` field on `RunListItem` and `StoreRunSummary` shape.

Also fixes a production-worker regression introduced by the
canonicalization: the worker's start-precondition only accepted
`Submitted | Starting`, so once runs started transitioning through
`Queued` on the way to `Starting`, every subprocess-worker run failed
with `Precondition failed: cannot start run: status is Queued`. That
cascaded into ~90 failing CLI/server integration tests locally.

## Commits

1. `f65843168` refactor(runs): simplify blocked status follow-ups
2. `1492d956c` chore: resolve clippy warnings
3. `676fd9f44` first merge of origin/main
4. `23fc92a2f` **fix(runs): allow Queued status in start precondition**
← the cascade-fix
5. `36b507a83` refactor: simplify pause/unpause + dedupe web status
tables
6. `8d8d27748` refactor(workflow): encapsulate BlockedStateTracker
inside HumanHandler
7. `1c17fda35` second merge of origin/main — resolves waiting vs blocked
8. `4cd3ef7b1` refactor(workflow): Mutex<usize> → AtomicUsize
9. `2e5a58e8a` fix(demo): align run-4 lifecycle status with Blocked
board column

## Test plan

- [x] fmt, clippy, build, doctests all clean
- [x] `cargo nextest run --workspace` — **4092/4092 pass**
- [x] `bun test` — **26/26 pass**, typecheck + production build clean
- [x] Manual CLI repro of the Queued-precondition fix
- [x] Browser smoke test: all 5 columns render with correct
labels/colors, demo run-4 appears in Blocked lane with question text
intact

## Known follow-up (not blocking)

A "paused-while-blocked" run (status `Paused` + `blocked_reason: Some`)
lands in the `running` column because the visible status chooses
`Paused` over `Blocked`. The pending question is not prominent on the
board. Addressing it would require `board_column()` to branch on
`(status, blocked_reason)` rather than just `status` — worth a separate
ticket.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:53:46 -04:00
..
artifact_cp.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
artifact_list.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
attach.rs refactor(runs): blocked status canonicalization cleanup (#165) 2026-04-19 14:53:46 -04:00
config.rs feat(cli): show curated landing output for bare fabro 2026-04-17 08:59:03 -04:00
create.rs refactor(cli): route global args through settings layer 2026-04-14 12:27:59 -04:00
diff.rs refactor(scratch): remove store-backed diff and blob cache writes 2026-04-07 22:31:59 -04:00
discord.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
docs.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
doctor.rs fix(doctor): simplify LLM provider detail lines 2026-04-15 07:31:15 -04:00
exec.rs test: preserve LLVM_PROFILE_FILE across env_clear in CLI tests 2026-04-18 15:05:32 -04:00
fabro.rs feat(cli): add fabro docs to landing Set up section 2026-04-17 09:03:40 -04:00
fork.rs fmt: apply nightly rustfmt after merge 2026-04-11 13:43:30 -04:00
graph.rs refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
inspect.rs fix(auth): restore local dev-token client coverage 2026-04-13 07:33:35 -04:00
install.rs fix(install): use consistent web URL for GitHub App callback and generated settings 2026-04-16 07:29:48 -04:00
json_global.rs refactor(cli): route global args through settings layer 2026-04-14 12:27:59 -04:00
logs.rs fmt: apply nightly rustfmt after merge 2026-04-11 13:43:30 -04:00
mod.rs fix(test): update snapshots for version and --prerelease flag 2026-04-17 07:31:40 -04:00
model.rs wip 2026-04-16 13:13:09 -04:00
model_list.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
model_test.rs fix(tests): make bulk_skip model test independent of local credentials 2026-04-15 11:22:02 -04:00
parse.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
pr.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
pr_close.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
pr_create.rs Add --force option for fabro pr create (#155) 2026-04-12 15:56:01 -04:00
pr_list.rs feat(github): add gh cli integration strategy 2026-04-11 21:35:16 -04:00
pr_merge.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
pr_view.rs refactor(github): rename gh_cli strategy to token, GITHUB_CLI_TOKEN to GITHUB_TOKEN 2026-04-13 20:46:11 -04:00
preflight.rs feat(template): unify workflow and config template syntax 2026-04-11 10:58:50 -04:00
provider.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
provider_login.rs Complete provider credential auth and scripted install 2026-04-13 09:15:45 -04:00
ps.rs feat(runs): canonicalize paginated run list responses 2026-04-19 10:37:31 -04:00
render_graph.rs test(harness): scrub ambient creds from spawned fabro CLI 2026-04-18 01:55:01 -04:00
repo.rs refactor(config): move project state under .fabro 2026-04-11 12:55:46 -04:00
repo_deinit.rs refactor(config): move project state under .fabro 2026-04-11 12:55:46 -04:00
repo_init.rs feat(github): add gh cli integration strategy 2026-04-11 21:35:16 -04:00
resume.rs fmt: apply nightly rustfmt after merge 2026-04-11 13:43:30 -04:00
rewind.rs fmt: apply nightly rustfmt after merge 2026-04-11 13:43:30 -04:00
rm.rs feat(runs): canonicalize paginated run list responses 2026-04-19 10:37:31 -04:00
run.rs fix(ci): stabilize snapshot test and double CLI test timeout 2026-04-15 11:39:06 -04:00
runner.rs refactor(runs): blocked status canonicalization cleanup (#165) 2026-04-19 14:53:46 -04:00
sandbox_cp.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
sandbox_preview.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
sandbox_ssh.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
secret.rs test(cli): refresh list output expectations 2026-04-14 11:30:34 -04:00
secret_list.rs feat: add typed secrets metadata and API 2026-04-12 12:47:08 -04:00
secret_rm.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
secret_set.rs feat(secret): accept secret value via stdin or interactive prompt 2026-04-15 07:34:33 -04:00
send_analytics.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
send_panic.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
server_start.rs test(harness): scrub ambient creds from spawned fabro CLI 2026-04-18 01:55:01 -04:00
server_status.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
server_stop.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
start.rs fix(tests): isolate CLI integration tests from repo project config 2026-04-15 11:18:19 -04:00
store.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
store_dump.rs refactor(runs): blocked status canonicalization cleanup (#165) 2026-04-19 14:53:46 -04:00
support.rs fix(tests): isolate CLI integration tests from repo project config 2026-04-15 11:18:19 -04:00
system.rs feat(system): add server-backed system commands 2026-04-06 16:10:06 -04:00
system_df.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_events.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_info.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_prune.rs test(cli): narrow system prune coverage for speed 2026-04-07 23:42:15 -04:00
test_panic.rs test: speed up slow default-profile tests and tighten nextest thresholds 2026-04-05 13:15:59 -04:00
top_level.rs feat(cli): show curated landing output for bare fabro 2026-04-17 08:59:03 -04:00
uninstall.rs test(cli): add integration tests for fabro uninstall 2026-04-08 16:47:48 -04:00
upgrade.rs feat(release): add x86_64 and aarch64 musl Linux targets 2026-04-18 01:00:51 -04:00
validate.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
version.rs feat(cli): add fabro version command 2026-04-14 16:30:53 -04:00
wait.rs refactor(runs): blocked status canonicalization cleanup (#165) 2026-04-19 14:53:46 -04:00
workflow.rs test(cli): refresh list output expectations 2026-04-14 11:30:34 -04:00
workflow_create.rs refactor(config): move project state under .fabro 2026-04-11 12:55:46 -04:00
workflow_list.rs test(cli): refresh list output expectations 2026-04-14 11:30:34 -04:00