Repository navigation
Fix Maven reactor VEX over a base-version module (#584) - #1802
Mikola Lysenko (mikolalysenko) merged 4 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
After a reactor was vendored, adding a module (or a dependency) that
declares the patched artifact at its plain base version made that
module build Central's unpatched jar. `vendor --check` reported the
drift, but `vex` still attested not_affected, because its liveness
check only looked for ${property} versions it could not resolve.
The check now also withholds attestation when the planner would still
rewrite a declaration, so `vex` skips the package as vendor_unwired
until `vendor` is re-run. Fixes #584.
Assisted-by: Claude Code:claude-opus-5-5
A module still declaring an earlier patch's suffixed version builds that patch's jar, so the reactor must not attest the current one. Pin that behavior with a test. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Final review briefWhat it does: After a Maven reactor is vendored, a module (or dependency) added later at the plain base version builds the unpatched jar. Risk: low. It's a one-line change to the liveness predicate ( Look here:
Verified: I read the full diff and Changes I made: none. Open questions: none blocking. The follow-ups in the description (a new root module with no pin; range or classifier declarations) predate this PR. I'm arming auto-merge, so approving sends it straight to the merge queue. Generated by Claude Code |
Resolve the attestable_checked conflict: keep the #584 doc and predicate, take main's new `list` parameter. 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 eecdbb2. Configure here.
|
[agent] Re-enqueued once (final reviewer) after the 13:40 merge-queue eviction: main has since been merged into the branch, head eecdbb2 is approved, Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Fixes #584
Summary
After a Maven reactor is vendored, a module added later (or a dependency
added to an existing module) that declares the patched artifact at its
plain base version builds Central's unpatched jar.
vendor --checkalready reported this as drift, but
vexkept attestingnot_affected. Nowvexskips the package asvendor_unwireduntilvendoris re-run, and attests again once it is.Root cause
vexdecides whether a vendored Maven reactor entry is still live withmaven_reactor::attestable_checked. Since #1787 that function re-runs theplanner's declaration walk (
rewrite_declarations), but it only lookedat the uncertain set (
${prop}versions it can't resolve, or that aprofile or inheriting pom overrides). A declaration at the literal base
version is something the planner would rewrite. It produces an edit,
not an uncertain entry, so the check ignored it.
Fix
attestable_checkednow also withholds when the walk still finds adeclaration it would rewrite:
Ok(edits.is_empty() && uncertain.is_empty()).Right after a successful
vendorthe re-plan is idempotent, so that mapis empty. The unit tests'
vendor()helper asserts this. A healthyreactor therefore still attests. The same rule covers a module left on
an earlier patch's suffix, which builds that patch's jar, not this
one.
Tests (red → green)
maven_reactor::tests::a_base_declaration_added_after_vendoring_is_not_attestableleft: (true, true) right: (true, false)vendor --checkfails,vexskipsvendor_unwiredand writes no file, re-vendor attests again)vendor_jvm_cli::maven_reactor_module_added_at_base_after_vendoring_withholds_vexvexemittedverified/not_affected(the issue's exact symptom)Commands run locally (Linux, as root):
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test -p socket-patch-core --lib maven_reactor: 87 passedcargo test -p socket-patch-cli --test vendor_jvm_cli: passedcargo test -p socket-patch-cli --test e2e_vendor_jvm_build -- --ignored maven_reactor(Maven at /opt/maven): 2 passedcargo test --workspace --all-features --no-fail-fast: 15248 passed, 11 failed. None of the failures touch the JVM code, and none can pass in this sandbox. 9 simulate write or remove failures with file permissions, which root bypasses:repair×2,in_process_redirect×3, and corecopy_tree,vlt_heal,pypi_poetry,pypi_requirements. The other 2 aree2e_bun_lockb: the patch API is unreachable through the sandbox proxy, and the local bun is 1.4.4. CI runs these as non-root with network access.No wrapper changes are needed (
npm/,pypi/,gem/only dispatch to the binary)./code-review high findings not fixed here
vendor --checkresolves that through the local Maven repo (local_external_poms). A no-repo re-plan insidevexwould wrongly withhold for rootsvendorleft unpinned on purpose (conflicting_managed_version/management_unresolved). This is a different shape from Vendored Maven reactor vex attests not_affected after a module added later declares the base version, although vendor --check flags the drift and that module builds Central's unpatched jar #584 and should be a follow-up that passes the local repo tovex's liveness check.vendor, so it isn't drift. Left for a separate issue.Reactor::discover.https://claude.ai/code/session_011f9aeRZEvH2uAFQPt5iJJJ
Generated by Claude Code