Skip to content

refactor: resolve platform contract digest dynamically#11

Merged
johnbenac merged 2 commits intomainfrom
refactor/dynamic-contract-binding
Mar 19, 2026
Merged

refactor: resolve platform contract digest dynamically#11
johnbenac merged 2 commits intomainfrom
refactor/dynamic-contract-binding

Conversation

@johnbenac
Copy link
Copy Markdown
Contributor

Summary

  • Removes OURBOX_PLATFORM_CONTRACT_DIGEST from catalog/profile.env
  • Adds a workflow step to resolve the digest dynamically via
    oras resolve ghcr.io/.../platform-contract:edge
  • Updates render scripts to require the digest from the environment
  • Updates smoke test to export a fixture digest and validate by shape

Same change as sw-ourbox-catalog-demo PRs #10 and #11 (both merged).

Test plan

  • CI passes (validate + smoke test)
  • Trigger a publish on main after merge and verify the bundle
    manifest carries the dynamically-resolved digest

Remove the hardcoded OURBOX_PLATFORM_CONTRACT_DIGEST from profile.env
and resolve it at build time via oras resolve of the :edge channel tag.
The render and row-renderer scripts now require the digest from the
environment exclusively.
Copy link
Copy Markdown

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

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: 177b60fd58

ℹ️ 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".

revision=str(args.revision).strip(),
arch=str(args.arch).strip(),
platform_contract_digest=str(profile.get("OURBOX_PLATFORM_CONTRACT_DIGEST", "")).strip(),
platform_contract_digest=os.environ.get("OURBOX_PLATFORM_CONTRACT_DIGEST", "").strip(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep smoke expectation consistent with env-sourced digest

This line switches render-catalog-rows.py to read platform_contract_digest from OURBOX_PLATFORM_CONTRACT_DIGEST, and the smoke script now exports a fixture digest (0000...), but its final assertion still expects the old hard-coded digest value. In CI, this makes scripts/check-catalog-bundle-smoke.sh fail deterministically once it validates the rendered row, because the row now correctly contains the fixture digest rather than sha256:bbdb....

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a581c8a — the catalog row validation at line 217 now uses os.environ["OURBOX_PLATFORM_CONTRACT_DIGEST"] instead of the old hardcoded digest. The manifest comparison at line 168 also compares against the env fixture. CI passes.

Remove the hardcoded OURBOX_PLATFORM_CONTRACT_DIGEST from profile.env
and resolve it at build time via oras resolve of the :edge channel tag.
The render and row-renderer scripts now require the digest from the
environment exclusively.
@johnbenac johnbenac merged commit 4bb7deb into main Mar 19, 2026
1 check passed
@johnbenac johnbenac deleted the refactor/dynamic-contract-binding branch March 21, 2026 03:18
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