Skip to content

refactor: tighten the public API surface to tier-1 facades#70

Merged
jsugg merged 1 commit into
mainfrom
refactor/api-surface-tightening
Jul 8, 2026
Merged

refactor: tighten the public API surface to tier-1 facades#70
jsugg merged 1 commit into
mainfrom
refactor/api-surface-tightening

Conversation

@jsugg

@jsugg jsugg commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move worker/timeout/retry/lifecycle and backend-plumbing runtime modules (21 files) from ser/runtime/ to ser/_internal/runtime/ via git mv; boundary_policy.toml shrinks from 24 to 17 entries and now lists genuine facades only.
  • Trim ser.config: SettingsInputDeps, ResolvedSettingsInputs, FeatureRuntimeBackendOverride, and the DEFAULT_* file-name constants go internal; the facade keeps AppConfig, get_settings, reload_settings, settings_override, APP_NAME, and the section types reachable from tier-1 signatures.
  • Promote the private runtime-pipeline protocol to a public RuntimePipeline Protocol and export it plus RuntimePipelineBuilder from ser.api; run_startup_preflight is now public only in ser.api (the diagnostics-service one is module-private).
  • Give ser/models an explicit by-export surface: a lazy __init__ exposing the three intended facade modules (emotion_model, profile_runtime, training_entrypoints).
  • Strengthen the boundary contract test with a tier-1 __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.
  • Add a make lock-check target (uv lock --check), document ser.api as the sole supported Python entry point in the README with a minimal infer example 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.

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.
@jsugg jsugg force-pushed the refactor/api-surface-tightening branch from c82661f to e7e0b70 Compare July 8, 2026 09:29
@jsugg jsugg merged commit 521a3ee into main Jul 8, 2026
20 of 21 checks passed
@jsugg jsugg deleted the refactor/api-surface-tightening branch July 8, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant