Repository navigation
ci: build TestFlight against .platform-ref when platform_ref is blank - #1223
Conversation
A blank platform_ref checked out Platform's default branch, so a release could link a different SDK from the one DashWalletTests ran against for the same wallet commit. Blank now reads the SHA in wallet_ref's .platform-ref; a branch without that file falls back to the default branch as before, and an explicit ref still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Final review complete — no blockers (commit 8f79576) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The workflow change correctly resolves blank platform_ref values from the wallet's validated .platform-ref, validates explicit refs before checkout, and records the actual Platform commit and pin status in release provenance. The exact head contains no in-scope correctness, security, or architecture defects, and all supplied CI checks for this commit passed.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This changes release workflow logic for resolving and validating Platform commits, affecting build provenance and release gating rather than merely formatting or documentation. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(lane failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer
llbartekll
left a comment
There was a problem hiding this comment.
Approving. This closes the gap where a TestFlight build could link a different SDK from the one DashWalletTests ran against. The resolve step matches unit-tests.yml's pin check, an entered ref still takes precedence, and the summary now records where the Platform commit came from.
Checked locally: I pulled the Resolve the platform ref step out of the YAML and ran it under /bin/bash (3.2) against the live dashpay/platform remote. All of these behaved as the PR table says:
- blank with a pin
- blank without a pin
v5.0.0-rc.4refs/tags/v5.0.0-rc.4v5.1-dev, including with whitespace around itdev,5b41ca3andHEAD(all rejected)refs/pull/4978/head(accepted)
CI is green.
Two inline notes, neither blocking. One more:
- Tests: the step holds about 60 lines of branching shell inside the YAML, and nothing in CI runs it. The 14-row table in the description is already a test plan. Moving the step into
.github/scripts, next toschema_release.rband itsschema_release_test.rb, would let CI check it. That can be a follow-up.
| # after a full-history fetch, so anything but a full SHA must name a | ||
| # branch or tag exactly. ls-remote patterns match name suffixes, so | ||
| # the returned names are compared exactly. | ||
| if [[ -n "$ref" && ! "$ref" =~ ^[0-9a-fA-F]{40}$ ]]; then |
There was a problem hiding this comment.
Nit: an uppercase SHA gets through here, but .platform-ref must be lowercase, and git rev-parse HEAD (line 372) always prints lowercase. So if someone enters the pin itself in uppercase, line 376's string comparison reports the build as "off the .platform-ref pin" and warns, even though it is the same commit. Lowercasing a 40-hex ref before it is written to $GITHUB_OUTPUT fixes this: tr 'A-F' 'a-f' works under bash 3.2, where ${ref,,} does not.
| source="$ref" | ||
| elif [[ -n "$pin" ]]; then | ||
| ref="$pin" | ||
| source=".platform-ref" |
There was a problem hiding this comment.
This trade-off is right. You covered the operational cost in Breaking Changes, but it will come up after every App Store release:
- The freeze PR merges into Platform's default branch.
- The next blank-ref
internalorexternalrun failsgate, until someone bumps.platform-ref.
gate's message says "Select a commit containing that freeze" and never mentions .platform-ref. An operator will likely just type a branch, which builds off the pin. Two possible follow-ups:
- When
sourceis.platform-ref, havegateor this workflow name the pin as the thing to bump. - Have the schema-freeze workflow also open the
.platform-refbump PR here.
Not blocking.
Issue being fixed or feature implemented
A TestFlight dispatch with a blank
platform_refchecks out dashpay/platform's default branch (#1186). DashWalletTests checks out the SHA in.platform-ref(#1213). For the same wallet commit, the release can therefore link a different SDK from the one its tests ran against.#1222 makes this matter: it pins testnet to Platform protocol 14 and moves
.platform-refto 5.0.0-rc.4, the release testnet runs. thepastaclaw flagged the gap there as blocking. Today it is harmless, becausev5.0-dev(907a1b98af) has the same v13/v14 tables andschema-releases.jsonas rc.4. That holds only until the default branch moves on.What was done?
release-dashpay-testflight.ymlhas a new step, Resolve the platform ref, before the platform checkout. It handles three cases:platform_ref: used as given. Before the checkout, anything other than a full 40-hex SHA must exactly match a branch or tag (or a fullrefs/…name) on dashpay/platform, checked withgit ls-remote. An abbreviated SHA, a typo or a suffix such asdevnow fails in seconds, not after the full-history fetch. A failed lookup is reported as a lookup failure. A ref containing whitespace is rejected, and leading or trailing whitespace is trimmed.wallet_refhas.platform-ref: the step reads that SHA. It must be a regular file holding a full 40-hex SHA, the same check as in unit-tests.yml; a symlink or a directory fails..platform-ref: this is a branch cut before test: revive DashWalletTests against dashpay and run it on every PR #1213. The step warns and falls back to the default branch, as before, so old branches stay releasable.Resolve build provenance compares the checked-out commit with the pin. When the commit is off the pin, the step warns. The release summary records the result:
The
platform_refinput description andrun-namedescribe the new default.How Has This Been Tested?
macos-26runner label, which this tool version does not know. develop gets the same report.platform_refblankplatform_refblankv5.1-devv5.0.0-rc.4refs/heads/v5.1-dev5b41ca3v4.2-devvdevv5.1*v5.1-dev/code-reviewpasses: repeated until a pass came back clean.workflow_dispatchchange only runs once it is on the default branch.Breaking Changes
A blank
platform_refnow builds from the wallet branch's.platform-refrather than the Platform default branch. To build against a branch head (for examplev5.1-dev), enter it explicitly. The build then warns that it is off the pin, and the summary records that.For an
internalorexternalupload, the schemagatechecks the Platform commit. If an App Store freeze is merged into Platform after the pin was set,gatefails with "missing from the selected Platform commit". Bump.platform-refor enter a ref to fix it.Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
Summary by CodeRabbit