fabro/lib/crates/fabro-cli/tests/it/cmd
Bryan Helmkamp ea206e0e40
feat(settings): stage 6.2 delete bridge_to_old seam
bridge.rs (818 LOC) is gone. Production consumers no longer produce a
full legacy `Settings` from v2 state; every read path walks the v2 tree
directly or uses one of the narrow v2->runtime helpers in the new
`settings::v2::to_runtime` module.

Core moves:

fabro-types
- Delete `settings::v2::bridge::bridge_to_old` and the whole bridge.rs
  file.
- Relocate the narrow v2->runtime helpers (`bridge_sandbox`,
  `bridge_mcp_entry`, `bridge_mcps`, `bridge_hook`, `bridge_worktree_mode`,
  `bridge_merge_strategy`, `bridge_pull_request`, `bridge_run_artifacts`)
  into a new `settings::v2::to_runtime` module. Each helper takes a
  single v2 subtree and produces the corresponding runtime shape;
  nothing assembles a full legacy `Settings` anymore.
- `settings/mod.rs` doc comment rewritten to describe `Settings` as a
  runtime shape, not a resolved parse target. Stage 6.3 deletes it.

fabro-config
- `ConfigLayer::resolve` is gone along with the `TryFrom<ConfigLayer>
  for Settings` impls. Consumers call `.into()` for a `SettingsFile`,
  or `.as_v2()` to borrow one.
- `fabro_config::server::resolve_storage_dir` now takes `&SettingsFile`.

fabro-server
- `api_server_settings` emits the v2 `SettingsFile` JSON shape
  directly instead of bridging to the legacy flat DTO. Stage 6.6
  replaces the shape again with an explicit allow-list DTO.
- `serve.rs`: `load_settings` returns `SettingsFile`;
  `apply_serve_overrides` / `apply_runtime_settings` mutate v2
  subtrees directly; `build_artifact_object_store` walks
  `server.artifacts`; `build_legacy_api_settings` projects the v2
  auth/listen/api subtrees down to the legacy `ApiSettings` shape for
  the (still-legacy) auth resolver.
- `diagnostics::check_crypto` walks `server.auth.api.{jwt,mtls}` and
  `server.listen.tls` directly.
- `web_auth.rs` oauth / register / setup-status / auth-me flows all
  read `server.web`, `server.integrations.github`, and
  `server.auth.web` directly via the v2 accessors. `merge_settings_keys`
  now writes v2 TOML (with `[server.web]`, `[server.integrations.github]`,
  etc.) instead of the legacy v1 top-level keys, and the register
  handler re-parses the freshly-written file back into the in-memory
  `SettingsFile` state.

fabro-cli
- `CommandContext::machine_settings` returns `&SettingsFile`.
- `user_config::load_settings` and friends return `SettingsFile`.
- `user_config::resolve_server_target` / `exec_server_target` /
  `configured_server_target` walk `cli.target.{http,unix}` directly.
  Tests rewritten against v2 TOML fixtures.
- `main.rs` logging init reads `cli.logging.level` / `server.logging.level`
  via v2 accessors.
- `commands/exec.rs` reads `cli.exec.{model,agent}` and builds mcps
  from `cli.exec.agent.mcps` (falling back to `run.agent.mcps`) via
  `to_runtime::bridge_mcp_entry`.
- `commands/pr/mod.rs` calls `github_app_id_str()`.
- `commands/run/create.rs` drops the legacy `.resolve()` call and uses
  `Into::<SettingsFile>::into(...)`.
- `commands/config/mod.rs::legacy_settings_to_v2` is now a real
  reverse-mapping helper that covers `storage`, `scheduler`,
  `integrations.{github,slack}`, `run.model`, `run.inputs`, and
  `cli.output.verbosity`. Stage 6.6 deletes it when the API client
  returns v2 natively.
- `tests/it/cmd/config.rs` tests now walk the v2 tree directly (via
  `cfg.run_model_name_str()`, `cfg.run_inputs()`, `cfg.run_sandbox()`,
  `cfg.run_hooks()`, `cfg.run_agent_mcps()`, `cfg.run_prepare_commands()`,
  `cfg.server_storage_root_str()`, etc.). The `bridge_to_old` test
  helper is gone.
- `tests/it/api/settings.rs` asserts against the v2 JSON shape.

Build, test, and quality gates all green:
- `cargo build --workspace --tests`
- `cargo clippy --workspace -- -D warnings`
- `cargo fmt --check --all`
- `cargo nextest run --workspace`: 3758 / 3758 passed, 182 skipped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:12:59 -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 test(settings): update fabro-cli test suite for v2 settings shape 2026-04-09 15:36:09 -04:00
config.rs feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00
create.rs feat(settings): stage 6.1 consumer migration builds workspace-wide 2026-04-09 15:25: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 perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
exec.rs test(cli): migrate remaining config/exec/create fixtures to v2 2026-04-09 10:11:28 -04:00
fabro.rs fix(cli): restore fabro-cli verification after merge 2026-04-08 16:41:13 -04:00
fork.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
graph.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
inspect.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
install.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
json_global.rs test(cli): stabilize ps JSON global flag assertion 2026-04-05 10:34:32 -04:00
logs.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
mod.rs test(cli): add integration tests for fabro uninstall 2026-04-08 16:47:48 -04:00
model.rs test(cli): migrate remaining config/exec/create fixtures to v2 2026-04-09 10:11:28 -04:00
model_list.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
model_test.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -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 refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
pr_list.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12: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(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
preflight.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
provider.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
provider_login.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
ps.rs test(cli): migrate remaining config/exec/create fixtures to v2 2026-04-09 10:11:28 -04:00
repo.rs feat(tests): migrate fabro-cli fixtures and repo fabro.toml to v2 2026-04-09 09:57:30 -04:00
repo_deinit.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
repo_init.rs feat(tests): migrate fabro-cli fixtures and repo fabro.toml to v2 2026-04-09 09:57:30 -04:00
resume.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
rewind.rs refactor(run): store manifests and definitions in global CAS 2026-04-07 22:57:48 -04:00
rm.rs test(cli): migrate remaining config/exec/create fixtures to v2 2026-04-09 10:11:28 -04:00
run.rs test(settings): update fabro-cli test suite for v2 settings shape 2026-04-09 15:36:09 -04:00
runner.rs feat(settings): stage 6.1 consumer migration builds workspace-wide 2026-04-09 15:25:59 -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 refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
secret_list.rs refactor(server): make secrets and operational checks server-canonical 2026-04-05 17:34:01 -04:00
secret_rm.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
secret_set.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -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(migration): land final Stage 4 fixes — 100% workspace tests green 2026-04-09 11:07:18 -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 refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
store.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
store_dump.rs feat(tests): migrate fabro-cli fixtures and repo fabro.toml to v2 2026-04-09 09:57:30 -04:00
support.rs test(settings): update fabro-cli test suite for v2 settings shape 2026-04-09 15:36:09 -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 Move cli.rs and scenario.rs tests into per-subcommand cmd/ files 2026-03-30 11:37:24 -04:00
uninstall.rs test(cli): add integration tests for fabro uninstall 2026-04-08 16:47:48 -04:00
upgrade.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
validate.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
wait.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
workflow.rs feat(tests): migrate fabro-cli fixtures and repo fabro.toml to v2 2026-04-09 09:57:30 -04:00
workflow_create.rs feat(tests): migrate fabro-cli fixtures and repo fabro.toml to v2 2026-04-09 09:57:30 -04:00
workflow_list.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00