Skip to content

(Dev) Implement typed Paragon payload schema and validation#785

Merged
cjshrader merged 2 commits into
mainfrom
paragon-pydantic
Jun 15, 2026
Merged

(Dev) Implement typed Paragon payload schema and validation#785
cjshrader merged 2 commits into
mainfrom
paragon-pydantic

Conversation

@chrisoro

@chrisoro chrisoro commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

See .scratch/typed-paragon-payload/PRD.md

fixes #784

@chrisoro chrisoro requested a review from cjshrader June 15, 2026 20:13
Comment thread src/gui/importer/gui_common.py Outdated
Comment thread src/config/profile_models.py Outdated
Comment thread src/config/profile_models.py Outdated
Comment thread .pre-commit-config.yaml
- fix(profile_models): reject ParagonBoardsList=[[]] — empty step now
  raises ValidationError ('ParagonBoardsList must not be empty')
- fix(profile_models): pass exclude_none=True and exclude_defaults=True
  into serialize_paragon so Source/GeneratedAt/default board fields
  are not written to YAML when null or defaulted
- fix(gui_common): revert by_alias=True to by_alias=False in
  _to_yaml_str to preserve existing snake_case profile YAML shape;
  rename 'paragon' key to 'Paragon' after dump so alias is preserved
  only for that field
- test: add test_empty_step_in_payload_board_list_rejected
- test: add test_serialize_paragon_excludes_null_metadata

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@cjshrader cjshrader left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good, this is not one of those things that was super important because we're never going to allow people to edit a paragon board in the editor but at the same time having it just be a big ol' dict was just no good.

@cjshrader cjshrader changed the title Implement typed Paragon payload schema and validation (Dev) Implement typed Paragon payload schema and validation Jun 15, 2026
@cjshrader cjshrader merged commit 659b176 into main Jun 15, 2026
1 check passed
@cjshrader cjshrader deleted the paragon-pydantic branch June 15, 2026 22:15
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.

Paragon needs to be a pydantic model

2 participants