Check the index's sha256 and the gemspec's body in the release wait
Merged
RO
12d ago+41+41+01234567890123456789-19-19-01234567890123456789
The release wait could pass on metadata gem install and Bundler would refuse. This closes the two gaps a review found:
- The index's sha256.
/info's line for the version names the gem's sha256, and Bundler refuses a download that differs. The wait only checked that the line was there. It now requires the index's sha256 to equal the API's, and so the downloaded gem's. It reads/infoagain while the two disagree. - The quick gemspec's body. A 200 with an empty or corrupt gemspec counted as present. The file now has to inflate to something.
A read that finds nothing new no longer clears what the last one found, so a timeout still names the sha256 the index gave.
Checks: I ran the step's own script, parsed out of the YAML, under bash -e -o pipefail:
| Case | Result |
|---|---|
| RubyGems, re-run of a published version | passes |
| RubyGems, pushed, same gem | passes |
| RubyGems, pushed, a different gem | fails at once |
| RubyGems, never published | times out, saying what's missing |
| Mock, everything consistent | passes |
| Mock, index names another sha256 | times out, naming it |
| Mock, index line without a checksum | times out |
| Mock, empty gemspec | times out |
| Mock, gemspec that isn't zlib | times out |
| Mock, index heals after 18 seconds | passes |
actionlint and zizmor report nothing. The same change goes to basecamp-sdk and fizzy-sdk; the two scripts differ only in the gem's name.
Card: Ruby SDK release workflow fails after a successful gem push
Summary by cubic
Fixes the release wait passing in cases where metadata gem install and Bundler would refuse, closing two gaps a review found.
- Requires the sha256 in
/info's line for the version to match the API's and the downloaded gem's, rereading/infowhile they disagree. - An unchanged
/infobody skips the repeated/versionscheck, so a slow mid-wait fix still meets the deadline. - Requires the quick gemspec to load with RubyGems' safe loader as this gem at this version, not merely a 200 that inflates.
- A failed fetch leaves the last readings in place, so a timeout still names the sha256 the index gave.