From ace24c410fbf6dd01bb93d07fbfd7f68b6106829 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 9 Apr 2026 16:33:41 -0400 Subject: [PATCH] refactor(types): stage 6.5 promote v2 types to settings top level Stage 6.5 can't flatten the `settings::v2::*` module tree onto `settings::*` files wholesale because the v2 submodules (`project.rs`, `run.rs`, `server.rs`) share filenames with the legacy flat type modules that are still required by the OpenAPI legacy `ServerSettings` response path (Stage 6.3 / 6.6 deletes them). As the feasible piece of Stage 6.5 work: - Re-export the v2 top-level type aliases from `fabro_types::settings` so consumers can write `fabro_types::settings::SettingsFile`, `fabro_types::settings::InterpString`, `fabro_types::settings::Duration`, etc. without the `::v2::` prefix. - The re-export covers the whole public v2 surface: `{CURRENT_VERSION, CliLayer, Duration, FeaturesLayer, InterpString, ModelRef, ParseDurationError, ParseError, ParseModelRefError, ParseSizeError, ProjectLayer, Provenance, ResolveEnvError, Resolved, ResolvedModelRef, RunLayer, SchemaVersion, ServerLayer, SettingsFile, Size, SpliceArray, SpliceArrayError, VersionError, WorkflowLayer, parse_settings_file, validate_version}`. The `v2` module itself stays in place to host the submodule tree (accessors, to_runtime, run::*, cli::*, server::*, interp, etc.) until Stage 6.3 finishes deleting the conflicting legacy files, at which point the v2/ directory can be promoted to replace them. Build, clippy, fmt, and 3756 / 3756 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/crates/fabro-types/src/settings/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/crates/fabro-types/src/settings/mod.rs b/lib/crates/fabro-types/src/settings/mod.rs index 4787e9b12..b8438e881 100644 --- a/lib/crates/fabro-types/src/settings/mod.rs +++ b/lib/crates/fabro-types/src/settings/mod.rs @@ -53,6 +53,22 @@ pub use server::{ }; pub use user::{ClientTlsSettings, ExecSettings, OutputFormat, PermissionLevel, ServerSettings}; +// v2 top-level re-exports. Stage 6.5 of the settings TOML redesign +// promoted the v2 namespaced parse tree to be the primary API surface; +// consumers can now write `fabro_types::settings::SettingsFile` / +// `fabro_types::settings::InterpString` / `fabro_types::settings::Duration` +// without the `::v2::` prefix. The `v2` module itself stays until the +// remaining legacy files under `settings/{project,run,server,...}.rs` +// are deleted in Stage 6.3, because the v2 submodules and the legacy +// submodules share those file names. +pub use v2::{ + CURRENT_VERSION, CliLayer, Duration, FeaturesLayer, InterpString, ModelRef, ParseDurationError, + ParseError, ParseModelRefError, ParseSizeError, ProjectLayer, Provenance, ResolveEnvError, + Resolved, ResolvedModelRef, RunLayer, SchemaVersion, ServerLayer, SettingsFile, Size, + SpliceArray, SpliceArrayError, VersionError, WorkflowLayer, parse_settings_file, + validate_version, +}; + fn is_default_checkpoint(c: &CheckpointSettings) -> bool { c.exclude_globs.is_empty() }