Skip to content

Fix Maven vendor reporting unwired patch applied (#513) - #1826

Merged
Mikola Lysenko (mikolalysenko) merged 5 commits into
mainfrom
agent/fix-maven-reactor-unwired-applied
Oct 29, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 5 commits into
mainfrom
agent/fix-maven-reactor-unwired-applied

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #513

Summary

vendor no longer reports a Maven patch as applied when the reactor plan
wires nothing. It refuses with vendor_jvm_shape_unsupported /
reason: nothing_wired, lists the reasons that left the reactor unwired
(e.g. property_unresolved, conflicting_literal_version), and writes
nothing.

Root cause

#1787 stopped the vendored Maven reactor planner from pinning a root over a
${prop} version it can't resolve with certainty, and made vex withhold
attestation. But when that leaves nothing wired, no pom of the reactor
names the suffixed version. That happens in #513 case 1 with no sibling
module at the literal base, and on the conflicting_literal_version path.
vendor still wrote the tree, the repository and maven.config, exited 0
and counted the patch as applied. vendor --check then said "no longer
wired". This was the part #1787 left open (see its Refs #513).

Change

  • maven_reactor::refuse_unwired: overlays the plan's writes on the
    checkout and refuses when wired_checked would be false. The refusal
    names only the degraded reasons that leave a declaration or root alone.
  • maven_repo::vendor_maven_jvm calls it for reactor and mixed roots,
    both on the real run and on the probe run (a patch with no files), so a
    preview and a real run agree. Dry runs plan first, so they refuse too.
  • Mixed roots refuse the same way. That matches "both halves or neither"
    in jvm::plan_with_external and vendor --check, which already needs
    the Maven half wired on a mixed root.
  • Behavior note: a re-run whose re-plan would drop every pin (for example,
    external management unreadable offline) now refuses and leaves the
    existing pin alone. Before, it removed the pin and still reported success.

Tests

Issue Test Without fix With fix
#513 (undefined ${prop}, no sibling) vendor_jvm_cli::maven_reactor_uncertain_property_version_withholds_vex fails: vendor exits 0 (assert_refused) pass
#513 (conflicting_literal_version, no sibling) same test, second case fails pass
helper maven_reactor::tests::a_plan_that_wires_nothing_is_refused, a_wired_plan_is_not_refused n/a (new fn) pass

Commands run locally:

  • cargo fmt --all -- --check, cargo clippy --workspace --all-features -- -D warnings: clean
  • cargo test -p socket-patch-core --all-features: 6925 pass. 4 fail, all in files this PR doesn't touch (copy_tree, vlt_heal, pypi_poetry, pypi_requirements). They are permission-injection tests, and the container runs as root, which ignores the chmod they rely on.
  • cargo test -p socket-patch-cli --all-features --lib --bins: pass. --test vendor_jvm_cli: 52/52.
  • --test e2e_vendor_jvm_build -- --ignored maven_reactor (Maven 3.9.x): 2/2. --test e2e_vendor_maven_build -- --ignored: pass.
  • A full cargo test --workspace ran out of container disk while linking every integration binary, so CI covers the remaining suites.
  • /code-review high ran. Fixed: the reasons list leaked unrelated warnings, the probe path was uncovered, and the vex assertion was weak. Not changed, by design: refusing on mixed roots (see above), and the extra reactor discover per vendor run (one parse of the checkout's poms, cheap next to the download).

No npm/pypi/gem wrapper changes needed (Rust-only behavior).


Generated by Claude Code

Assisted-by: Claude Code:claude-opus-5-5
When every reactor declaration of the patched package was left at an
uncertain ${property} or another version, and no root could be pinned,
vendor still wrote the tree, exited 0 and counted the patch as applied,
while the build kept resolving the unpatched jar. vendor --check then
reported the artifact as no longer wired.

vendor now refuses such a plan (vendor_jvm_shape_unsupported, reason
nothing_wired) with the degraded reasons that left it unwired, and
writes nothing.

Fixes #513

Assisted-by: Claude Code:claude-opus-5-5
The refusal now lists only the reasons that left a declaration or root
unwired, not the repository and config notes. A probe run for a patch
without files refuses the same reactor shapes the real vendor does, so
the preview and the run agree.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 29, 2026 13:04
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

1 similar comment
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
main now discovers Maven 4 implicit subprojects by listing directories
(#1807), so wired_checked takes a lister. The nothing_wired check
passes the same lister the plan used, so it sees the same reactor.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for 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 2e242f3. Configure here.

Merged via the queue into main with commit c07af61 Oct 29, 2026
50 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-maven-reactor-unwired-applied branch October 29, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants