GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix Maven reactor pinning unresolved properties (#513, #459) by mikolalysenko · Pull Request #1787 · SocketDev/socket-patch Conversation
|
| Issue | Test | Red on main |
|---|---|---|
| #513 case 1 | maven_reactor::tests::a_property_from_an_external_parent_leaves_the_root_unpinned |
yes |
| #513 case 1 | unresolvable_property_and_range_warn (its "still pinned" assertion encoded the bug and now asserts unpinned) |
yes |
| #513 case 2 | a_maven_4_inferred_parent_is_local |
yes |
| #513 (coords) | an_unresolved_coordinate_with_a_version_leaves_the_root_unpinned |
added after review |
| #513 vex | an_uncertain_module_beside_a_rewritten_one_is_not_attestable |
added after review |
| #459 | a_profile_overriding_the_version_property_is_left_alone |
yes |
| #459 | a_profile_up_the_chain_or_on_a_nested_property_is_weighed (parent profile; profile on a nested property) |
yes |
| #459 | an_inheriting_modules_profile_keeps_the_managed_property |
yes |
| no false positive | a_profile_agreeing_with_the_base_or_beaten_by_maven_config_is_rewritten |
passes on both |
| Maven 4 scope | maven_4_parent_inference_is_4_1_only_and_carries_the_version |
added after review |
| Bugbot (profile → undefined name) | extra case in a_profile_up_the_chain_or_on_a_nested_property_is_weighed |
added after Bugbot |
| #513 + #459 end to end | vendor_jvm_cli::maven_reactor_uncertain_property_version_withholds_vex (vendor exits 0 with the warning and leaves the poms untouched; vex skips with vendor_unwired, including when a sibling module at the literal base was rewritten. That sibling case attests not_affected if attestable_checked is reverted) |
yes (failed at the "pinned" assertion) |
Commands run locally:
cargo test -p socket-patch-core --all-features --lib vendor::jvm: 240 passed. On the test-only commit (253ab73), 6 of the new or updated unit tests failed.cargo test -p socket-patch-cli --all-features --test vendor_jvm_cli: 52 passed. Red on 253ab73.cargo fmt --all -- --check and cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-core --all-features --lib: 6871 passed. The 4 failures are chmod-based write-failure tests in untouched modules (copy_tree, vlt_heal, pypi_poetry, pypi_requirements) that can't fail as intended because this container runs as root. A full cargo test --workspace build would not fit this container's disk allowance, so CI covers the remaining suites.SOCKET_PATCH_MAVEN_E2E_REQUIRED=1): e2e_vendor_jvm_build maven reactor tests (2) and e2e_vendor_maven_build (1) pass.No wrapper (npm/, pypi/, gem/) changes are needed. They only dispatch to the binary.
property_unresolved ("not defined in the checkout") and the root is unpinned. That is conservative: before, the pin was overridden by the explicit version anyway, and vex attested falsely.conflicting_literal_version. A pin that one module's explicit version overrides can't be trusted, and vex must not attest from it.vendor still reports applied when it leaves the root unpinned. In the no-sibling case (the only declaration is uncertain), vendor exits 0 with summary.applied: 1 and writes no pin, and an immediate vendor --check exits 1 with "vendored artifact is no longer wired into the build". Vendored Maven reactor reports applied and VEX attests not_affected when a ${property} version is left unresolved, so the build keeps Central's unpatched jar (also triggered by Maven 4 <parent/> inference) #513 asks for vendor to report the patch as not applied; this PR does not do that. The existing conflicting_literal_version path on main behaves the same way.vex-only. entry_wired_checked feeds Discovery::vendor_entry_live, so vendor's keep_older_vendored_patch (an older, partly wired vendoring is no longer kept) and scan's takeover warnings also see the stricter answer. wired_checked (prune GC, vendor --check) is unchanged.https://claude.ai/code/session_011f9aePMHGzPvTJK2MCHChi
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A reactor module whose version is an undefined ${prop} or one a
profile raises still got a root pin and a rewrite, so the build kept
an unpatched jar while vex attested not_affected. These tests capture
#513 (external-parent property, Maven 4 <parent/> inference) and
#459 (profile overrides) and fail on main.
Assisted-by: Claude Code:claude-opus-5-5
The vendored Maven reactor planner pinned and rewrote a ${prop}
version it could not resolve with certainty, so the build kept
Central's unpatched jar while vendor reported applied and vex attested
not_affected.
- An undefined property now leaves the local root unpinned, like a
conflicting literal: the module's explicit version beats any pin.
- Profile <properties> are read. A version a profile on the chain of
the declaring pom (or of a pom inheriting it) would move off the
base is left as is with conflicting_literal_version, and the root
is not pinned. maven.config user properties still win.
- A Maven 4 <parent/> without coordinates resolves to ../pom.xml, so
a property defined in the checkout's root is found and patched.
Fixes #513, #459.
Assisted-by: Claude Code:claude-opus-5-5
Unpinning the root was not enough: vex counted the patch as wired
whenever any pom named the suffixed version, so a rewritten sibling
let it attest while a module left at an uncertain ${prop} built the
unpatched jar.
- vex liveness for a reactor now re-plans the declarations and
withholds when one is left at an undefined, inheritor-overridden or
profile-overridden version. The GC and --check reference test is
unchanged, so a referenced tree is never pruned.
- A possibly-matching declaration with an undefined ${...} groupId or
artifactId and its own version also leaves the root unpinned.
- Parent inference is limited to model 4.1.0, and a Maven 4 child's
${project.version}/${project.groupId} come from the inferred parent.
- The inheritor and profile override searches are one walk.
Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix prepared a fix for the issue found in the latest run.
Or push these changes by commenting:
@cursor push b856788bb6
diff --git a/crates/socket-patch-cli/src/commands/vex_sources.rs b/crates/socket-patch-cli/src/commands/vex_sources.rs --- a/crates/socket-patch-cli/src/commands/vex_sources.rs +++ b/crates/socket-patch-cli/src/commands/vex_sources.rs @@ -464,16 +464,26 @@ .as_ref() .filter(|e| socket_patch_core::vendor::jvm::apply::is_jvm_entry(e)) { - if let Err(detail) = - socket_patch_core::vendor::jvm::apply::entry_wired_checked(root, entry) - { - const CODE: &str = "vendor_jvm_shape_unsupported"; - gated.push(failed(&cand.key, CODE)); - notes.push(note( - CODE, - format!("{}: cannot establish JVM wiring: {detail}", cand.key), - )); - continue; + match socket_patch_core::vendor::jvm::apply::entry_wired_checked(root, entry) { + Err(detail) => { + const CODE: &str = "vendor_jvm_shape_unsupported"; + gated.push(failed(&cand.key, CODE)); + notes.push(note( + CODE, + format!("{}: cannot establish JVM wiring: {detail}", cand.key), + )); + continue; + } + Ok(false) => { + const CODE: &str = "vendor_jvm_uncertain"; + gated.push(failed(&cand.key, CODE)); + notes.push(note( + CODE, + format!("{}: Maven declaration may still read the base", cand.key), + )); + continue; + } + Ok(true) => {} } } let basis = if let Some(vref) = cand
You can send follow-ups to the cloud agent here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
A profile (or inheriting pom) that points the version property at a name the checkout does not define made the planner skip it and still rewrite the declaration to the suffixed base. Such an override now counts as moving the version, so the declaration is left as is and the root is not pinned. The CLI regression test now also covers a sibling module at the literal base: it is rewritten and wired, yet vex still withholds because the uncertain module builds the unpatched jar. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ 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 4c1b5b2. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does. The v5 Maven reactor planner no longer pins the local root when a dependency's Risk: medium. The logic only unpins or withholds more often, never less, but the stricter liveness answer reaches Look here
Verified
Changes I made. No code. Added a "Known gaps" section to the description (the two open questions below). Open questions
Auto-merge is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Vendored Maven reactor ignores profile <properties>, so a version an active profile raises is silently downgraded to the patched base (1.11.0 → 1.10.0-socket.*) with exit 0 and no warning
There was an error while loading. Please reload this page.