feat(profiles): promote descriptor/registry/auth machinery from mountainash-data — Phase 1#32
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment out mountainash-constants dependency loading in workflows and hatch.toml, upgrade hatchling to 1.29.0 and hatch to 1.16.5, and apply YAML formatting normalization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Release 26.4.0: Architecture cleanup & principles
Promotes the descriptor/registry/auth/template patterns from mountainash-data into mountainash-settings, enabling reuse by mountainash-utils-files, mountainash-utils-secrets, and mountainash-acrds-core. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 tasks: port AuthSpec hierarchy (11 subclasses + dispatch), build profiles/ sub-package (descriptor + registry + DescriptorProfile + template wiring + invariants helper), wire public re-exports. Ships the reusable mechanism ahead of any consumer migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…upport Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lifts ConnectionProfile from mountainash-data, renames to DescriptorProfile, drops domain-specific to_driver_kwargs/to_connection_string, renames helpers to _default_kwargs/_auth_kwargs, and wires ParameterSpec.template via post_init (Pattern B). All 13 new tests pass alongside prior 16 (29 total). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds MISSING, DescriptorProfile, ParameterSpec, ProfileDescriptor, Registry, descriptor_invariants_for, and the full auth hierarchy (AuthSpec + 10 subclasses, auth_to_driver_kwargs, AUTH_TO_DRIVER_KWARGS) to mountainash_settings.__init__ and __all__. Smoke tests confirm both surfaces are importable from the package root. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #32 +/- ##
===========================================
- Coverage 96.85% 96.67% -0.19%
===========================================
Files 15 31 +16
Lines 573 841 +268
Branches 81 109 +28
===========================================
+ Hits 555 813 +258
- Misses 14 16 +2
- Partials 4 12 +8 ☔ View full report in Codecov by Sentry. |
This was referenced Apr 17, 2026
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
Phase 1 of the profiles-promotion initiative: lifts the descriptor/registry/auth machinery from
mountainash-data(commit2ec5079onfeat/settings-registry) intomountainash-settingsso other settings-heavy packages (utils-files,utils-secrets,acrds-core) can reuse the pattern rather than reinvent it.This PR is purely additive library work — no consumers yet. Consumer migration is Phase 2 (plan already written at
mountainash-data/docs/superpowers/plans/2026-04-16-profiles-migration-data.md, depends on this PR merging + a mountainash-settings release).What shipped
Two new sub-packages under
src/mountainash_settings/:profiles/(Pattern A + B mechanism):ProfileDescriptor— frozen dataclass (renamed fromBackendDescriptor, generalised with openmetadata: dict)ParameterSpec— with newtemplate: str | Nonefield enabling declarative Pattern B template wiringDescriptorProfile— pure-mechanism base class. Installs descriptor params as pydantic fields via__pydantic_init_subclass__, composes auth discriminated union, wiresAfterValidatorforParameterSpec.validator, and resolvestemplatefields inpost_init. Strips domain-specific outputs (to_driver_kwargs,to_connection_string) — those stay in domain subclasses.Registry— per-domain registry class (Registry("databases"),Registry("storage")) with bounddecorator(),get_descriptor(),get_settings_class(), test seams (_snapshot_for_tests/_reset_for_tests). Error messages include registry name.descriptor_invariants_for(registry)— pytest helper that produces a parametric test class pinning 10 descriptor invariants over every registered descriptor. Consumers drop it into their test suite and get free coverage for new registrations.auth/(cross-cutting auth):AuthSpecbase + 10 subclasses (NoAuth,PasswordAuth,TokenAuth,JWTAuth,OAuth2Auth,ServiceAccountAuth,IAMAuth,AzureADAuth,KerberosAuth,CertificateAuth,WindowsAuth) — pydantic v2 discriminated union viakindliteralAUTH_TO_DRIVER_KWARGS+auth_to_driver_kwargs()default dispatch — handles the common auth types; adapter-owned types (ServiceAccount, AzureAD, Kerberos, Certificate, Windows) raiseKeyErrorso domain adapters must handle them.Public re-exports from
mountainash_settings.__init__expose all profiles + auth symbols at package root.Spec mapping
Implements
docs/superpowers/specs/2026-04-16-profiles-promotion-design.md:profiles/descriptor.py,profiles/profile.py,profiles/registry.pyParameterSpec.template+DescriptorProfile.post_initwiringauth/Registryclassto_driver_kwargs/to_connection_stringonDescriptorProfileCommits
ad50e8ffeat(auth): add AuthSpec base class for discriminated unions19e30d6feat(auth): port 11 AuthSpec subclasses from mountainash-data7c09066feat(auth): add AUTH_TO_DRIVER_KWARGS default dispatch mapc9a0152feat(profiles): add ProfileDescriptor + ParameterSpec with template support480e84dfeat(profiles): add per-domain Registry class with bound decorator38b9e17feat(profiles): add DescriptorProfile base (Pattern A mechanism) — also folds in Pattern B template wiring (planned as separate T7 commit but bundled for atomicity with the base class)66fc194feat(profiles): add descriptor_invariants_for pytest helper37efeaafeat(settings): export profiles + auth from package rootTest plan
hatch run test:test tests/unit/— 73/73 passingmountainash-acrds-core'spost_initusage as future consumerWhat's next
After merge + release:
mountainash-datato consume the upstream primitives (plan ready atmountainash-data/docs/superpowers/plans/2026-04-16-profiles-migration-data.md, branches fromfeat/settings-registry)