Give shared Core vocabulary its own packages - #311
Merged
Merged
Conversation
Environment configuration, Skill version parsing, metadata rules and JSON object normalization move out of store and api into leaf packages that the domain cutovers share: - environmentconfig: Setup, SetupCommand, Skill, SkillMetadata, Plugin, InitialFile and InitialFileMetadata with their validation, metadata projections, MaxInitialFileBytes and the strict Decode. Setup.Validate checks requested configuration and Setup.ValidateInstalled checks frozen configuration. - skills: ParseVersion replaces store.skillVersionNumber. - metadata: Validate and ValidateStorable return structured violations that api renders with its existing messages; Encode keeps the 64 KiB bound. - jsonobject: Normalize replaces store.canonicalJSONObject. Store translates the new errors into ErrInvalidInput, and api maps environmentconfig.ErrInvalid like it. The rule tests move with the rules.
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), foundation PR 1e. Gives the vocabulary that several domain cutovers share one home before those cutovers merge.
environmentconfig: Environment setup, setup commands, skills, plugins and initial files, with their pure validation, metadata projections,MaxInitialFileBytes,ErrInvalidandDecode. Encryption, reference resolution, Session freezing and database access stay where they are.skills:ParseVersion(canonical positive decimal) andErrInvalidVersion, replacingstore.skillVersionNumber.metadata:Validate(returns a structured*Violation),ValidateStorable,EncodeandErrTooLarge. api renders violations with the existing messages and params, so public error bodies are unchanged.api.validateMetadataandstore.encodeMetadataare deleted.jsonobject:Normalize, replacingstore/json_object.go.Pure move: no aliases or forwarding functions; every caller updated. No public behaviour change;
make openapihas no diff.IMPLEMENTATION.mdlists the new owners.Checks:
go build ./...,go vet ./services/core/..., the new packages' table tests,api/execution/cmd(1682 run, 0 skipped), the full store package (1017 run, 33 opt-in skips),scripts/check-names.py.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.