Move deployment model configuration out of store into modelconfiguration and modelconfigurationpg - #321
Merged
Conversation
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.
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.
Part of #1 (store layering), PR 6: deployment default model configuration moves out of
store.modelconfigurationdomain package:Servicewith Replace, Delete and Resolve; with no credential key, Replace and Resolve returncredentialcrypto.ErrUnavailableStorage,ReaderandObserverportsShouldObserveProviderrule, withtestdata/observation_cases.jsonshared by the domain and SQL testspersistence/postgres/modelconfigurationpg: the PostgreSQL adapter. Administrator audits are written inside the transaction viaauditpg. 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.ErrModelProviderRequirednow lives here.Dispatcher.Observeris required, andStartWorkerrejects a Dispatcher without it, next to Move Vaults and Credentials out of store into vaults and vaultpg #319'sCredentialscheck.ModelProviders(service) andModelProvidersReader(adapter) Dependencies fields, pluswriteModelConfigurationError. PUT validation moved into the Service; the HTTP responses are unchanged.cmd/server: wiresmodelconfigurationpg.New(units)into the API and the dispatcher'sObserver.store:deployment_model_providers.go,deployment_provider_observations.goand their tests.Checks on the final head:
go build ./...andgo vet ./services/core/...across the whole modulemodelconfigurationandmodelconfigurationpgin fullcmd/server:-runfor the owner/start-failure, observation and dependency/route testssandbox/providers: the configuration flow teststore:-runonly (deployment model provider HTTP, unified model configuration, template composition, initial input, archive cancellation)make openapi(no diff) andscripts/check-names.pyNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.