fabro/lib/crates
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
..
fabro-agent feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
fabro-api fix(api): resolve build spec path at runtime 2026-04-07 23:05:07 -04:00
fabro-checkpoint feat(settings): stage 6.1 consumer migration builds workspace-wide 2026-04-09 15:25:59 -04:00
fabro-cli feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00
fabro-config feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00
fabro-core feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
fabro-devcontainer refactor(workspace): satisfy clippy all-targets warnings 2026-04-05 14:37:32 -04:00
fabro-github refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
fabro-graphviz Clean up workspace clippy warnings 2026-03-30 11:27:25 -04:00
fabro-hooks refactor(workspace): satisfy clippy all-targets warnings 2026-04-05 14:37:32 -04:00
fabro-interview feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
fabro-llm feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
fabro-macros Add twin test mode for OpenAI E2E tests 2026-03-31 20:36:48 -04:00
fabro-mcp Rename fabro-api-types to fabro-api with progenitor client generation 2026-04-03 11:17:27 -07:00
fabro-model fix(clippy): restore workspace lint cleanups after main merge 2026-04-07 18:01:53 -04:00
fabro-oauth refactor(workspace): satisfy clippy all-targets warnings 2026-04-05 14:37:32 -04:00
fabro-proc feat(run): harden server-supervised worker lifecycle 2026-04-07 07:59:35 -04:00
fabro-retro Merge remote-tracking branch 'origin/main' 2026-04-07 15:24:07 -04:00
fabro-sandbox refactor(storage): unify scratch paths and key schema 2026-04-06 10:13:37 -04:00
fabro-server feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00
fabro-slack fix(clippy): restore workspace lint cleanups 2026-04-07 20:40:02 -04:00
fabro-spa feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
fabro-store feat(settings): stage 6.1 consumer migration builds workspace-wide 2026-04-09 15:25:59 -04:00
fabro-telemetry fix(home): migrate all runtime consumers to use Home 2026-04-06 13:36:43 -04:00
fabro-test test(migration): land final Stage 4 fixes — 100% workspace tests green 2026-04-09 11:07:18 -04:00
fabro-tracker fix(test): remove hidden HTTP client startup overhead 2026-04-04 21:25:51 -04:00
fabro-types feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00
fabro-util refactor(home): move Home to fabro-util so all crates can share it 2026-04-06 13:08:35 -04:00
fabro-validate Add publish = false to all crates to prevent accidental crates.io publish 2026-03-29 13:47:09 -04:00
fabro-workflow feat(settings): stage 6.2 delete bridge_to_old seam 2026-04-09 16:12:59 -04:00