Config / settings architecture¶
Live map of how TranscriptX resolves, validates, and exposes knobs. Historical migration plans live under docs/archive/plans/ (config_knobs_refactor_plan.md, config_ownership_collapse_plan.md, pydantic_migration.md) — do not treat archived metrics as current.
Dual stack¶
flowchart TD
defaults["Dataclass defaults\nTranscriptXConfig facade"]
file["JSON file\nfile_overrides"]
profiles["Module profiles\nprofile_loading"]
env["TRANSCRIPTX_* env\nenv_key_registry"]
facade["Runtime facade\nget_config()"]
defaults --> file --> profiles --> env --> facade
project["project config.json"]
draft["draft / run override"]
resolve["resolve_effective_config"]
validate["core.config.validate_config"]
run["RunConfigurator.set_config"]
ui["Settings UI"]
project --> resolve
draft --> resolve
resolve --> validate --> run
resolve --> ui
ui -->|save| project
ui -->|save| draft
Stack |
Location |
Role |
|---|---|---|
A — runtime facade |
|
Attribute API modules read ( |
B — registry / pilots |
|
Pydantic models, |
Bridge: core/config/pydantic_bridge.py (PYDANTIC_REGISTRY_PILOTS).
Facade load order¶
TranscriptXConfig.__init__ (utils/config/main.py):
defaults < optional JSON file < active module/workflow profiles < env (env wins).
Effective config (Settings + runs)¶
resolve_effective_config (core/config/resolver.py):
default < project < draft/run override < env, then validate. Rebuild still uses a temp JSON + _load_from_file roundtrip (known debt).
Surfaces¶
Surface |
Entry |
|---|---|
Settings hub |
|
Profiles page |
|
Pipeline |
|
Env |
|
Profile targets |
|
Profile CRUD |
|
User-facing guide: settings.md.
Validation (two paths today)¶
Path |
Module |
Used by |
|---|---|---|
Canonical leaf / pilot |
|
Settings UI, run configurator |
Object-level legacy |
|
Still called from |
Unifying these is a hardening follow-up — see settings_knobs_assessment.md.
Profile targets¶
Supported ProfileManager targets: workflow, topic_modeling, semantic_similarity, acts, tag_extraction, qa_analysis, temporal_dynamics, vectorization, llm_models.
Note: analysis.semantic_similarity_profiles (in-config fast/balanced/deep) is a separate mapping store that shares activation-key vocabulary with the disk ProfileManager target — do not merge casually.
Extension checklist¶
Add/change a knob in the owning Pydantic model under
core/config/models/.Keep runtime facade attributes compatible (delegation hydrate if the subtree is delegated).
Update ownership snapshot / goldens when registry leaf counts change.
Add env mapping only via
ENV_KEY_REGISTRY(or infra allowlist if not a bag key); update.env.example.Curate into
COMMON_SETTINGS_SCHEMAonly when the knob belongs in guided Settings UX.Document user-visible behaviour in settings.md / module runtime notes — not in archived plans.