feat: add immutable deployment bundle contract - #202
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 768457d4ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "properties": { | ||
| "schema": {"const": "qsl.deployment_bundle.v1"}, | ||
| "bundle_id": {"$ref": "#/$defs/identity"}, | ||
| "created_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"}, |
There was a problem hiding this comment.
Enforce calendar-valid timestamps in the shared schema
When a downstream consumer validates bundles using this shared Draft 2020-12 schema alone, format is annotation-only unless the validator explicitly enables format assertions, and the regex accepts impossible dates such as 2026-13-01T00:00:00Z. Such a bundle therefore passes the schema but fails _expect_timestamp, creating inconsistent contract behavior across consumers; require format assertion in the documented validation path or otherwise enforce calendar validity for schema consumers.
Useful? React with 👍 / 👎.
Summary
Validation
PYTHONPATH=python python3 -m pytest -q python/tests/test_deployment_bundle_contract.pypython3 -m unittest discover -s python/tests -v