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) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-04-09 16:33:41 -04:00
parent a3fd3b002b
commit ace24c410f
No known key found for this signature in database

View file

@ -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()
}