feat: convention contract — authored config/limits, release as pure artifact - #170
Merged
Merged
Conversation
…rtifact
Move a hook's authored config/limits out of its build `release` and onto
the hook itself; `release` becomes a pure build artifact {image, digest,
source_ref}. Make the ingester symmetric with hooks (nested `release`).
Edge DTOs only — the internal OciConfig/IngesterDefinition and the
versioned HookRelease are unchanged: to_deploy()/to_definition() re-gather
authored config/limits (from the component) with the built image (from the
release) into the existing runtime. No migration; OOM memory-escalation
untouched. Adds an optional source_ref to IngesterDefinition for build
provenance parity with hooks.
Pairs with the osa-py producer change — deploy them together.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
|
|
Contributor
Greptile SummaryThis PR separates authored component settings from built release artifacts. The main changes are:
Confidence Score: 5/5This looks safe to merge with the paired producer deployment.
What T-Rex did
|
| Filename | Overview |
|---|---|
| server/osa/domain/deposition/command/create_convention.py | Defines the revised hook and ingester edge DTOs and maps them into the unchanged internal models. |
| server/osa/domain/shared/model/source.py | Adds optional source_ref provenance to ingester definitions while preserving old stored data. |
| server/tests/unit/domain/deposition/test_deploy_convention_dto.py | Covers strict release validation, component mapping, defaults, and optional fields. |
| server/tests/unit/domain/deposition/test_deploy_convention_handler.py | Updates the handler fixture to use hook-level configuration. |
| server/uv.lock | Updates the editable project version to 0.0.6. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
P[Deploy payload] --> H[Hook DTO]
P --> I[Ingester DTO]
H --> HC[Authored config and limits]
H --> HR[Release artifact]
HC --> HD[HookDeploy]
HR --> HD
I --> IC[Authored config, limits, schedule]
I --> IR[Release artifact]
IC --> ID[IngesterDefinition]
IR --> ID
HD --> S[Convention service]
ID --> S
Reviews (1): Last reviewed commit: "feat: convention contract — authored con..." | Re-trigger Greptile
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.
What
Restructure the convention deploy contract so a component's authored
config/limitslive on the component and its buildreleaseis a pure artifact{image, digest, source_ref}. Make the ingester symmetric with hooks (nestedrelease).DeployConventionRelease→{image, digest, source_ref}(dropsconfig/limits).DeployConventionHookgainsconfig/limits.DeployConventionIngester— symmetric, with a nestedrelease.Internals unchanged (by design)
This is an edge-DTO-only change. The internal
OciConfig/IngesterDefinition, the versioned immutableHookRelease, thehooks/hook_releasestables, and the OOM memory-escalation path are all untouched:to_deploy()/to_definition()re-gather authoredconfig/limits(from the component) with the builtimage(from the release) into the existing runtime. No migration. Adds an optionalsource_reftoIngesterDefinitionfor build-provenance parity with hooks.Contract coupling
Pairs with the osa-py producer change. Breaking pair — deploy together (every deploy-edge DTO is
extra="forbid", so old body ⇄ new server both 422).Tests
1558 unit+contract pass. Added
test_deploy_convention_dto.py(12 tests: pure release, rejects config/limits in release, re-gather mapping, ingester symmetry, optional-field omission). Verified anosa deploybody and the cloud-path (release-less manifest + injected releases) both validate against the new DTO.🤖 Generated with Claude Code