Skip to content

ci: bind source-test image identity to profile - #724

Merged
proerror77 merged 2 commits into
mainfrom
codex/source-test-profile-identity
Aug 9, 2026
Merged

ci: bind source-test image identity to profile#724
proerror77 merged 2 commits into
mainfrom
codex/source-test-profile-identity

Conversation

@proerror77

@proerror77 proerror77 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Change contract

Bind each non-production research-source-test image to the exact trusted-main source SHA and one allowlisted offline profile. A stable source-test-SHA-profile tag is preflighted for absence, recorded with its profile and digest, and verified in the image labels before publication.

Issue relationship

None

Out of scope

No ACR publication, ACK Job, Secret, RBAC, nodepool, #689 resource, runtime deployment, credential, Testnet, Live, or real API change. Historical source-SHA-only tags are preserved and are not reused as profile evidence.

Dependencies and merge order

None. A later source-test receipt must dispatch from the final trusted-main SHA and use its profile-bound tag and digest.

Focused validation

  • bash .github/scripts/test-research-image-release-artifact.sh
  • bash .github/scripts/test-acr-publish-workflow.sh
  • bash -n on the source selector and its two contract tests
  • Workflow YAML parse and git diff --check
  • Counterexample covered: an unknown profile is rejected; the same SHA generates distinct tags for Binance and Bybit, while a repeated SHA/profile pair yields the same tag for the existing no-overwrite preflight.

Rollout and rollback

No runtime impact before merge. Roll back by reverting this commit; no registry tag is overwritten or relabeled.

Scope exception

None

Summary by CodeRabbit

  • New Features

    • Added profile-specific source-test publication tags and identities.
    • Publication records now include the selected profile, immutable tag, and image digest.
    • Source-test images include metadata linking them to the source revision and profile.
  • Bug Fixes

    • Prevented invalid profiles, tag reuse, and relabeling during source-test publication.
    • Improved verification to ensure published images match the selected revision and profile.
  • Documentation

    • Updated source-test publishing requirements and historical tag behavior.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 70019f49-fbb6-4452-a92c-27cbea1ade21

📥 Commits

Reviewing files that changed from the base of the PR and between 90d2819 and 4aa07ff.

📒 Files selected for processing (3)
  • .github/scripts/test-acr-publish-workflow.sh
  • .github/workflows/acr-publish.yml
  • deployment/aliyun/research/README.md
📝 Walkthrough

Walkthrough

The ACR source-test publication flow now validates source-test profiles, generates profile-specific tags, propagates resolved identity values through the workflow, verifies image labels, and records profile-based publication evidence.

Changes

Source-test identity publication

Layer / File(s) Summary
Profile selection and deterministic tags
.github/scripts/select-acr-publish-source.sh, .github/scripts/test-research-image-release-artifact.sh
The selector accepts binance-bstocks-attestation and bybit-spot, rejects other profiles, and emits deterministic profile-specific tags. Tests verify profile differences and repeated-selection stability.
Workflow propagation and image verification
.github/workflows/acr-publish.yml, .github/scripts/test-acr-publish-workflow.sh
The workflow passes resolved profile and tag outputs to publish-source-test, applies and verifies source-test identity labels, and pushes the resolved tag. Contract tests reject source-SHA tagging and direct input interpolation.
Immutable publication evidence
.github/workflows/acr-publish.yml, deployment/aliyun/research/README.md
Publication records now include the source SHA, profile, tag, and immutable digest. The rules prevent exact SHA/profile tag reuse and restrict historical SHA-only tags to read-only history.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkflowInput
  participant SelectorScript
  participant PublishSourceTest
  participant SourceTestCommand
  participant ACRRegistry
  participant JobSummary
  WorkflowInput->>SelectorScript: pass source SHA and source-test profile
  SelectorScript->>SelectorScript: validate profile and generate source-test tag
  SelectorScript->>PublishSourceTest: emit resolved profile and tag
  PublishSourceTest->>SourceTestCommand: pass source SHA and profile
  SourceTestCommand-->>PublishSourceTest: provide built source-test image
  PublishSourceTest->>ACRRegistry: push image with profile-specific tag and labels
  PublishSourceTest->>JobSummary: record publication identity and tag
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: binding source-test image identity to an allowlisted profile.
Description check ✅ Passed The description covers the change contract, issue relationship, scope, dependencies, validation, rollout, rollback, and scope exception.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/source-test-profile-identity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proerror77
proerror77 force-pushed the codex/source-test-profile-identity branch from 5391862 to 90d2819 Compare August 5, 2026 11:20

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/acr-publish.yml:
- Line 694: The source-test image publication must prevent concurrent overwrites
after the existing manifest check. Update the publication flow using an enforced
registry immutability/locking mechanism or server-side create-only operation,
and ensure the recorded digest corresponds to the atomically created tag.
Document the enforced mechanism in deployment/aliyun/research/README.md for the
referenced source-test publication instructions; the workflow change belongs in
the source-test push path identified by IMAGE_TAG.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5019f6ad-b49d-4b55-b25d-935a7bef9dee

📥 Commits

Reviewing files that changed from the base of the PR and between 5ece487 and 90d2819.

📒 Files selected for processing (5)
  • .github/scripts/select-acr-publish-source.sh
  • .github/scripts/test-acr-publish-workflow.sh
  • .github/scripts/test-research-image-release-artifact.sh
  • .github/workflows/acr-publish.yml
  • deployment/aliyun/research/README.md

Comment thread .github/workflows/acr-publish.yml
@proerror77
proerror77 enabled auto-merge (squash) August 5, 2026 11:34
@proerror77
proerror77 force-pushed the codex/source-test-profile-identity branch from 6202936 to 4aa07ff Compare August 9, 2026 02:22
@proerror77
proerror77 merged commit 1210d51 into main Aug 9, 2026
44 of 45 checks passed
@proerror77
proerror77 deleted the codex/source-test-profile-identity branch August 9, 2026 02:38
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