Skip to content

feat: add strict deployment bundle contract - #200

Closed
Pigbibi wants to merge 1 commit into
mainfrom
qsl/p0-deployment-bundle-v1-strict-contract-local-only-20260804
Closed

feat: add strict deployment bundle contract#200
Pigbibi wants to merge 1 commit into
mainfrom
qsl/p0-deployment-bundle-v1-strict-contract-local-only-20260804

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Scope

  • adds only the immutable qsl.deployment_bundle.v1 schema, dependency-free local validator, and synthetic tests
  • binds strategy/profile/config/evidence/dependency identities and SHA-256 artifacts

Safety boundary

  • no activation, apply, runtime, deployment, credential, broker, account, order, capital, paper, shadow, or live behavior
  • no production dependency

Validation

  • python3 -m unittest discover -s tests -v (138 passed)
  • python3 scripts/runtime_settings.py validate
  • compile, strict schema syntax, diff/scope/secret gates

Ruff was not installed in the available local toolchain.

Co-Authored-By: Codex <noreply@openai.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +158 to +159
if strategy["source_id"] != dependencies["strategy"]["id"]:
_fail("strategy.source_id must match dependencies.strategy.id")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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$"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Pigbibi

Pigbibi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

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.

@Pigbibi Pigbibi closed this Aug 4, 2026
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