Skip to content

Move deployment model configuration out of store into modelconfiguration and modelconfigurationpg - #321

Merged
SaladDay merged 2 commits into
mainfrom
refactor/model-configuration-domain
Sep 30, 2026
Merged

SaladDay merged 2 commits into
mainfrom
refactor/model-configuration-domain

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1 (store layering), PR 6: deployment default model configuration moves out of store.

  • modelconfiguration domain package:
    • the Configuration/Record/Sealed vocabulary
    • a Service with Replace, Delete and Resolve; with no credential key, Replace and Resolve return credentialcrypto.ErrUnavailable
    • the Storage, Reader and Observer ports
    • the ShouldObserveProvider rule, with testdata/observation_cases.json shared by the domain and SQL tests
  • persistence/postgres/modelconfigurationpg: the PostgreSQL adapter. Administrator audits are written inside the transaction via auditpg. The observation update is one bounded transaction with statement and lock timeouts, and its SQL fence is unchanged. Only unstorable text is translated; everything else passes through.
  • execution:
  • api: ModelProviders (service) and ModelProvidersReader (adapter) Dependencies fields, plus writeModelConfigurationError. PUT validation moved into the Service; the HTTP responses are unchanged.
  • cmd/server: wires modelconfigurationpg.New(units) into the API and the dispatcher's Observer.
  • Deleted from store: deployment_model_providers.go, deployment_provider_observations.go and their tests.

Checks on the final head:

  • go build ./... and go vet ./services/core/... across the whole module
  • modelconfiguration and modelconfigurationpg in full
  • execution, api and cmd/server: -run for the owner/start-failure, observation and dependency/route tests
  • sandbox/providers: the configuration flow test
  • store: -run only (deployment model provider HTTP, unified model configuration, template composition, initial input, archive cancellation)
  • make openapi (no diff) and scripts/check-names.py

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@SaladDay
SaladDay merged commit 42aedb6 into main Sep 30, 2026
@SaladDay
SaladDay deleted the refactor/model-configuration-domain branch September 30, 2026 17:32
modelconfiguration owns each Harness's deployment default model
configuration: validation through the Harness declaration, sealing the
complete bundle, resolving it for Session creation, and the rule for which
committed root Turn outcomes say something about the provider.
modelconfigurationpg stores the sealed bundle under a new revision, audits
each change in the same transaction and runs the fenced last-use
observation in its own pooled transaction with server-side timeouts.
The /core/v1 harness model-configuration routes and Session creation use
the modelconfiguration service and reader, and the Dispatcher records
provider observations through a required modelconfiguration.Observer.
ErrModelProviderRequired moves to execution, which raises it. Store no
longer owns deployment defaults or their observations.
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