feat: add strict deployment bundle contract - #200
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: 132a605595
ℹ️ 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".
| if strategy["source_id"] != dependencies["strategy"]["id"]: | ||
| _fail("strategy.source_id must match dependencies.strategy.id") |
There was a problem hiding this comment.
Enforce the strategy source revision
When strategy.revision identifies commit A but dependencies.strategy.revision pins commit B, recomputing bundle_sha256 makes the inconsistent bundle pass validation because only the source repository ID is compared. This loses the commit-level binding between the strategy artifact and its declared source dependency; require their revisions to match as well.
Useful? React with 👍 / 👎.
| "properties": { | ||
| "schema": {"const": "qsl.deployment_bundle.v1"}, | ||
| "bundle_id": {"$ref": "#/$defs/identity"}, | ||
| "created_at": {"type": "string", "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.
Validate calendar semantics in the schema
When a consumer validates directly against this published schema, impossible timestamps such as 2026-99-99T25:61:61Z satisfy the pattern even though the Python validator rejects them and downstream date parsing can fail. Add calendar-aware RFC 3339 validation while retaining the whole-seconds-and-UTC restriction so both representations of the contract accept the same documents.
Useful? React with 👍 / 👎.
|
Closing unmerged: required Report internal dependency matrix drift remains, and two exact-head frozen-contract P2 findings require (1) binding strategy source revision to dependencies.strategy.revision and (2) schema-level rejection of impossible RFC 3339 calendar dates. Per the approved one-remediation / anti-review-loop policy, these inputs are frozen for a future fresh rebuild; no remediation will be made against this old base. That rebuild must be tests-first and cover both findings. |
Scope
qsl.deployment_bundle.v1schema, dependency-free local validator, and synthetic testsSafety boundary
Validation
python3 -m unittest discover -s tests -v(138 passed)python3 scripts/runtime_settings.py validateRuff was not installed in the available local toolchain.