Skip to content

Give shared Core vocabulary its own packages - #311

Merged
SaladDay merged 1 commit into
mainfrom
refactor/shared-vocabulary
Sep 30, 2026
Merged

SaladDay merged 1 commit into
mainfrom
refactor/shared-vocabulary

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

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, ErrInvalid and Decode. Encryption, reference resolution, Session freezing and database access stay where they are.
  • skills: ParseVersion (canonical positive decimal) and ErrInvalidVersion, replacing store.skillVersionNumber.
  • metadata: Validate (returns a structured *Violation), ValidateStorable, Encode and ErrTooLarge. api renders violations with the existing messages and params, so public error bodies are unchanged. api.validateMetadata and store.encodeMetadata are deleted.
  • jsonobject: Normalize, replacing store/json_object.go.

Pure move: no aliases or forwarding functions; every caller updated. No public behaviour change; make openapi has no diff. IMPLEMENTATION.md lists 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.


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

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.
@SaladDay
SaladDay merged commit c087dbf into main Sep 30, 2026
6 checks passed
@SaladDay
SaladDay deleted the refactor/shared-vocabulary branch September 30, 2026 16:31
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