Repository navigation
fix(release): accept SHA-256-only digest sets - #2212
Anurag-S1ngh wants to merge 2 commits into
Conversation
KatalKavya96
left a comment
There was a problem hiding this comment.
@Anurag-S1ngh, thanks for the PR.
Keeping sha512 as the default means existing projects see no change, and still refusing md5 and sha1 in preflight keeps the gate where it was.
The checksum tests cover both sides of the new rule: a SHA-256-only directory passes, a missing .sha256 is MISSING-DIGEST, and the default still requires .sha512.
The docs, the template and the Step 3 eval spec all move together, so nothing still says sha512 is the only option.
Should change
- One inline comment: verify-rc's
commands.checksumscomes from_digests()intools/release-management/.../verify_rc/args.py, which always puts--digest sha512first. For a digest set of["sha256"]it still emits--digest sha512 --digest sha256, so Step 3 still requires.sha512and a SHA-256-only RC still fails. Could_digests()addsha512only when the set has it (or is empty), with a test on that path?
Smaller points (non-blocking)
inventory()now always treats.sha256and.sha512as companions, whatever the Digest set says, so a stray.sha256next to asha512-only release is no longer reported as unexpected. Was that intended? The--digestlist already covers both in a SHA-256-only run.- With
_digests()changed as above, a SHA-256-only project only needssha256in its Digest set, so the template's "makesha256the first entry" could become "list onlysha256".
Thanks again for following this up.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. After you've
addressed the points above and pushed an update, an Apache Magpie
maintainer — a real person — will take the next look
at the PR. The findings cite the project's review criteria;
if you think one of them is mis-applied, please reply on the
PR and a maintainer will weigh in.More on how Apache Magpie handles maintainer review:
Contributing guide.
|
Both points are handled in 40707ec.
The template now says to list only |
KatalKavya96
left a comment
There was a problem hiding this comment.
@Anurag-S1ngh, thanks for the PR.
40707ec covers the points from my last review: _digests() adds sha512 only when the Digest set lists it or is empty, so a ["sha256"] set now produces --digest sha256 alone in both commands.checksums and commands.all, with tests for all three cases; inventory() takes its companions from the Digest set again, with a test for .sha512 files beside a SHA-256-only set; and the template now says to list only sha256.
Thanks again for the quick follow-up.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
ASF policy allows SHA-256 and/or SHA-512, but rc-cut preflight blocked any digest set without sha512 and release-verify always required a `.sha512` file. A compliant SHA-256-only project could not use the release family. Require at least one of sha256 and sha512 in preflight, and make the first digest in the Digest set the required one in verify-rc. The default stays sha512, so existing projects see no change. Generated-by: OpenCode 2.3.2 (DeepSeek V4.1 Flash 1017)
verify-rc still passed `--digest sha512` first for every config, so a SHA-256-only project generated `--digest sha512 --digest sha256` and Step 3 kept requiring `.sha512`. Add sha512 only when the Digest set lists it, or when the set is empty, so a SHA-256-only project passes `--digest sha256` alone. inventory() now takes its digest companions from the same set, so a digest file outside the set is reported unexpected again. Restamped measured_tokens after the rebase onto main. Generated-by: OpenCode 2.3.2 (DeepSeek V4.1 Flash 1017)
40707ec to
060b77f
Compare
Summary
rc-cutpreflight blocked any digest set withoutsha512andverify-rcalways required a.sha512file, so a compliant SHA-256-only project could not use the release family.sha256andsha512;verify-rcrequires the first digest in the Digest set, which stayssha512by default.release-build.mdtemplate, both tool READMEs, and the Step 3 eval spec.Type of change
tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)Test plan
uv run pytestintools/release-management,tools/release-configandtools/release-verify: all pass.digest_setwith onlysha256passes; a set with neithersha256norsha512is blocked;md5andsha1are still refused.--digest sha256passes a SHA-256-only directory, a missing.sha256isMISSING-DIGEST, and the default still requires.sha512._digests()tests: asha256-only set emits--digest sha256alone incommands.checksumsandcommands.all; a set listingsha512keeps it required; an empty set falls back tosha512.ruff check,ruff format --checkandmypyon both changed packages.check-family-plugins.py --fixregenerates the plugin mirror with no remaining diff.skill-token-count --writeandskill-surface-hash.py --fixafter the skill edits.prek runon the changed files passes, including the workspace pytest, ruff and mypy hooks.RFC-AI-0004 compliance
No principle touched: the existing gates stay; only which digest satisfies the required slot changes.
Linked issues
Closes #2173
Refs #2172
Notes for reviewers
The default digest stays
sha512, so existing projects see no change. A project that wants SHA-256 only lists onlysha256inrelease-build.md; verify-rc then passes--digest sha256alone.md5andsha1remain refused by preflight, and.md5remains a warning in Step 3.Generative AI disclosure: written with help from OpenCode (DeepSeek V4.1 Flash 1017). I have read every line of the diff and run the checks.