Skip to content

Validate observed upstream schemas during static builds - #44

Merged
tiankaima merged 2 commits into
masterfrom
codex/observed-schema-contract
Aug 15, 2026
Merged

Validate observed upstream schemas during static builds#44
tiankaima merged 2 commits into
masterfrom
codex/observed-schema-contract

Conversation

@tiankaima

Copy link
Copy Markdown
Member

Summary

  • profile raw curriculum JSON before Pydantic validation and compare observed shapes with the expected Pydantic contract
  • fail on soundness drift while treating incomplete nullability/union evidence as bounded diagnostics
  • report unnecessary optional fields only after complete or repeated independent observations
  • keep observed reports local/CI-only and publish expected schemas as the public build artifact
  • make model validation strict and preserve atomic rollback for schema failures

Verification

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run python -m unittest discover -s tests (57 passed)
  • real incremental static load validated catalog plus 21 JW chunks; the upstream later timed out and the build rolled back atomically

@tiankaima
tiankaima merged commit accd815 into master Aug 15, 2026
3 checks passed
@tiankaima
tiankaima deleted the codex/observed-schema-contract branch August 15, 2026 16:05
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