refactor: tighten the public API surface to tier-1 facades#70
Merged
Conversation
Move worker/timeout/retry/lifecycle and backend plumbing runtime modules under ser/_internal/runtime and shrink boundary_policy.toml to genuine facades (24 -> 17 entries). Trim ser.config exports: settings-input types, the backend override type, and DEFAULT_* file name constants go internal. Expose a public RuntimePipeline protocol and RuntimePipelineBuilder in ser.api; keep run_startup_preflight public only in ser.api. Give ser/models an explicit lazy by-export facade surface. Strengthen the boundary contract test with a tier-1 __all__ snapshot, add a make lock-check target, and document ser.api as the sole supported Python entry point.
c82661f to
e7e0b70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ser/runtime/toser/_internal/runtime/viagit mv;boundary_policy.tomlshrinks from 24 to 17 entries and now lists genuine facades only.ser.config:SettingsInputDeps,ResolvedSettingsInputs,FeatureRuntimeBackendOverride, and theDEFAULT_*file-name constants go internal; the facade keepsAppConfig,get_settings,reload_settings,settings_override,APP_NAME, and the section types reachable from tier-1 signatures.RuntimePipelineProtocol and export it plusRuntimePipelineBuilderfromser.api;run_startup_preflightis now public only inser.api(the diagnostics-service one is module-private).ser/modelsan explicit by-export surface: a lazy__init__exposing the three intended facade modules (emotion_model,profile_runtime,training_entrypoints).__all__snapshot (ser,ser.api,ser.config,ser.domain,ser.utils) that fails on any surface growth; keep the public-to-internal allowlist equality check.make lock-checktarget (uv lock --check), documentser.apias the sole supported Python entry point in the README with a minimalinferexample and the 1.0.0 stability promise, and update architecture docs to the new module paths.No runtime behavior, dependency, or algorithm changes; version stays 1.0.0.