Repository navigation
Route Gradle digests through utils::digest - #878
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 659ac2c. Configure here.
|
[agent] Ported into #873 (cherry-picked as e5dfad6) so that PR can go green while Generated by Claude Code |
main has been red since #865 added a check that production code computes digests through utils::digest, while #646's Gradle code still hashes inline. Port #878's change so this PR's coverage and test-release go green; it no-ops once #878 lands on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uQyhodCtdJGrKaD7AAV1n
utils::digest's production_digests_go_through_the_helpers fails on main: three Gradle/JVM files compute digests inline. That makes `coverage`, `test` and `test-release` red on every PR. #878 routes them through utils::digest. This is the same change, ported so this PR's CI is green. It becomes a no-op once #878 lands. Claude-Session: https://claude.ai/code/session_01LS9AJhpVngXZxng8TRA2Kd Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
main's #865 added a test that fails when production code computes digests inline; the Gradle cache, JVM jar and Maven sidecar code landed with inline sha1/sha256 calls, so main's coverage and test-release jobs fail production_digests_go_through_the_helpers. Same change as #878, ported so this PR's CI runs green against the current base; it no-ops once #878 lands. Refs #831 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMZyKmgYNAridSR5eqv999
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
`main` fails `utils::digest::tests::production_digests_go_through_the_ helpers` because #646 left inline sha1/sha256 calls in `gradle_cache.rs`, `jvm_jar.rs` and `sidecars/maven.rs`, which turns `test`, `test-release` and `coverage` red on every PR. This is #878's change verbatim; it no-ops once #878 merges. Assisted-by: Claude Code:claude-opus-5-5
main went red when Gradle code landed with inline sha1/sha256 calls that utils::digest::tests::production_digests_go_through_the_helpers rejects. Same change as #878; it no-ops once main carries it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NEpjVvY7X41jPuVuoiCLVz
Main is red since 1714299 (#865): its production_digests_go_through_the_helpers guard flags the inline digests that #646 added in gradle_cache.rs, jvm_jar.rs and sidecars/maven.rs. This is the same change as #878 and becomes a no-op once that lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSXCFoPbraq7rNKJpXEP2n
main fails socket-patch-core's lib guard test production_digests_go_through_the_helpers because three Gradle files still hash inline, which turns coverage, test and test-release red on this PR. This is the same change as #878 and becomes a no-op once that lands on main. Co-Authored-By: Claude <noreply@anthropic.com>
main's CI fails `utils::digest::tests::production_digests_go_through_ the_helpers`, because three Gradle/Maven call sites hash with sha1/sha2 directly instead of the digest helpers. This is the same change as #878 (agent/ci-gradle-digest-helpers), ported so this PR's CI can go green. It becomes a no-op once #878 lands on main. Assisted-by: Claude Code:claude-opus-5-5
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. Ported from #878 so CI on this PR runs against a green base; it no-ops once #878 lands on main. Assisted-by: Claude Code:claude-opus-5-5
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. (cherry picked from commit 659ac2c) Ported from #878 so this PR's CI is green while main's digest guard test is red; it no-ops once #878 lands. Assisted-by: Claude Code:claude-opus-5-5
|
[agent] Ported this PR's commit into #961 (as 35ffa60), because Generated by Claude Code |
main's coverage job is red: the digest guard test from #865 requires production hashing to go through the utils::digest helpers, and the Gradle code from #646 still hashes inline. This is the same change as #878, ported so this PR's CI can go green; it no-ops once #878 lands. Assisted-by: Claude Code:claude-opus-5-5
661c117 ran `cargo fmt --all`, which reformatted 118 files the uv fix never changes. main isn't rustfmt-clean and CI doesn't check formatting, so the sweep adds nothing. It also hides the real change and conflicts with every other open PR that touches those files. Each reverted file is byte-identical to rustfmt's output on the merge-base version, so this drops formatting only. The six files that carry the fix and the ported #878 change keep their formatting. Co-Authored-By: Claude <noreply@anthropic.com>
LLM Description written by Claude Code:claude-opus-5-5
Summary
mainhas been failingsocket-patch-core --libsincec644ab0. The cause is a semantic conflict between Gradle support (#646) and the digest helpers (#865), not either PR alone. #865 added a guard test,utils::digest::tests::production_digests_go_through_the_helpers, which asserts that production code hashes only throughutils::digest. #646 landed three files that still hash inline:crawlers/gradle_cache.rs:pristineandDerivedIndex::query(sha1)patch/jvm_jar.rs:sha256_hex/sha1_hexpatch/sidecars/maven.rs:Algo::digest(sha1)This breaks
test (ubuntu/macos),test-releaseandcoverageon every open PR (first seen on #827).Fix
Each inline call goes through
utils::digest::sha1_hex_of/sha256_hex_of. Those helpers compute the same lowercase hex, so behaviour is unchanged. I removed theDigestimports that became unused. The test-only inline SRI injvm_jar.rs's test module is left alone, since the guard skips test modules. No other production code changes.Evidence
origin/mainc644ab0:cargo test -p socket-patch-core --all-features --lib -- utils::digest::tests::production_digestsfails, withleftlisting the three files above.cargo test -p socket-patch-core --all-features --libpasses 5243 tests. The only 4 failures are the chmod-based write-failure tests (copy_tree,vlt_heal,pypi_poetry,pypi_requirements), which can't fail as root in the sandbox; they're unrelated, and CI runs as non-root.cargo test -p socket-patch-core --all-features --lib -- utils::digest gradle_cache jvm_jar sidecars: 67/67 pass.cargo clippy --workspace --all-features -- -D warningsis clean, andrustfmt --checkis clean on the three touched files.Related: #827 needs this fix to go green.
🤖 Generated with Claude Code
Generated by Claude Code
Note
Low Risk
Refactor-only: same hex digests via shared helpers; no logic or API changes beyond satisfying the digest guard test.
Overview
Gradle cache, JVM jar patching, and Maven sidecar code no longer compute SHA-1/SHA-256 with inline
Digest+hex::encodecalls. Production hashing now goes throughutils::digest::sha1_hex_ofandsha256_hex_ofingradle_cache(pristine,DerivedIndex::query),jvm_jar(sha1_hex/sha256_hex), andsidecars/maven(Algo::Sha1::digest).This aligns Gradle/JVM paths with the
production_digests_go_through_the_helpersguard from #865, which was failing after #646 landed inline digests. Unusedsha1/sha2Digestimports were removed; digest output format is unchanged.Reviewed by Cursor Bugbot for commit 659ac2c. Configure here.
Generated by Claude Code