Repository navigation
service-template-895: Add schema-backed core settings contract - #73
Merged
Merged
Conversation
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.
Card:
service-template-895— Add schema-backed core settings contractBranch:
pipeline/service-template-895→mainWhat the card asks for
Goal
Implement the service-template half of Sprint B1's schema-backed product-settings core so a freshly generated backend can own validated, authorized settings through typed
settings.getandsettings.setoperations. This card establishes the product-side contract only; it does not make the orchestrator write initial values or implement Product Brief persistence.Context
sprint:1420, Definition of Done, and the accepted decision atstate/knowledge/projects/codegen-orchestrator/decisions/2026-08-28-module-composition-protocol.md, sections 6, 8 and 9.state/knowledge/projects/codegen-orchestrator/plans/2026-08-28-group-2-increment.md, Sprint B item 1.template/services/backend/spec/users.yaml,src/controllers/users.py,src/app/grant_capability.py, andtemplate/shared/spec/models.yaml.services/*/spec/manifest.yaml; a new manifest/settings representation must therefore be explicitly owned, parsed and validated rather than treated as an incidental domain spec.Implementation route
Reuse the template's spec-first backend, generated contracts, SQLAlchemy/Alembic patterns, and the existing capability-gate design. Add the smallest explicit manifest/settings-schema path and no dependency, compatibility shim, transport-specific identity, env duplicate, catalogue, or fallback. This is a forward-only core addition to newly generated products; no released generated-project state is a supported legacy format for this card.
Acceptance criteria
settings.get/settings.setAPI contract and persistent database storage for settings; generated API/OpenAPI artifacts and the documented contract reflect it.settings.setvalidates a value against the declared schema before persistence; valid values round-trip throughsettings.get, while unknown keys and invalid values cannot be stored. No setting is reconstructed from prose or represented as an environment variable by this core path.docs/CONTRACTS.md, architecture/pipeline documentation, and the EnglishCHANGELOG.mdwherever this repository's contract-change rules require. Synchronize the framework mirror if framework source changes, and prove synchronization.Out of scope
jobs.fire/job_fired, scheduler implementation, module catalogue,event-digest,telegram-reader, web adapter, or admin conversation history.What the worker reports
Implemented and committed
eac57c8(Add schema-backed core settings contract).Delivered:
settings.get/settings.setcontracts, generated routers, OpenAPI, persistence migration, idempotent scoped repository, and focused backend tests;services/<service>/manifest.yamlv1 loading and fail-closed Draft 2020-12 settings-schema validation, separate from ignored legacy domain manifests, with generated schema registry and framework mirror synchronization;Focused generated-backend candidate:
make setup && make typecheck && make lint && make tests backendpassed (26 tests). The one completed broad check was:python3 -m secretary check broad --reuse --module pytest --module-arg tests/unit --module-arg tests/tooling --module-arg tests/copier --module-arg=-m --module-arg "not slow"Receipt
state/checks/broad-3b1ac81f470f6199.jsonis usable for this exact content (tree_sha b14031110a49d3acf22e034ec9150466dc56ee78): 292 passed, 13 deselected, exit 0, 138.40s; its process importedframeworkfrom this workspace. An earlier wrapper invocation ended without an intact receipt and therefore attested no completed suite; the reported invocation was the single completed broad run.make check-syncpassed.git status --porcelainis empty.Opened by the secretary CI gate so that the
pull_requestworkflow runs. Title and body are built from the card and the worker's done report.