Repository navigation
Commit f5bb829
Touch no file for a Maven dependency that is not wired, and say what the run did (#2165)
* Sort two Maven module declarations as cargo fmt writes them
`formats/maven/mod.rs` declared `mirror` above `declared_maven`, the
order a merge left them in. `cargo fmt --all -- --check` fails on it.
CI does not run fmt, so nothing was red; the tree is formatted again.
No behaviour changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Test that the Maven mirror gate does not hold back the config heal
Two things that landed side by side meet in one scan: the mirror gate
holds a dependency back when a mirror of the machine's settings would
take its Socket repository, and the heal respells a `.mvn/maven.config`
line an earlier release wrote. The heal is tied to no dependency,
because that line stops Maven 3.9.2 to 3.9.8 from starting with `-f`
from outside the project whatever the run redirects.
The new test pins how they compose: a project an earlier release wired,
scanned behind a mirror that captures its repository, gets the mirror's
warning for the dependency and the heal for the config. Nothing else is
written, and the dependency is recorded as decided and not confirmed,
as the gate records every dependency it holds back.
No behaviour changes: the test passes on main as it stands.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Say exactly what a Maven dependency that is not wired leaves unwritten
Two warnings spoke for more than the dependency they are about. The
mirror gate said `pom.xml and .mvn/ were left as they are`; the reactor
planner's refusal said `the poms and .mvn/ were left as they are`; and
the contract said under both, and under two more reason codes, that
`.mvn/` stays byte-identical.
That stopped being always true when the heal of a `.mvn/maven.config`
an earlier release wrote landed: every hosted scan that reads such a
file respells its Trusted Checksums directory line, whatever the run
redirects, and so also a run whose only Maven patch is gated or refused.
Both texts now say what was meant: nothing was written for the
dependency (no pin in a pom, no line in `.mvn/`). `CLI_CONTRACT.md` and
`docs/ecosystems.md` say the same under the four reason codes, and the
section on mirrors names the respelling as the one thing such a run may
still write, with the edit it is reported under.
The test of the heal asserts the refusal's wording in the run where the
old wording was false (a reactor root refused whole, its config healed),
and the test of the mirror gate does the same for the gate's.
Outcome change: the wording of two warning details. No file a scan
writes changes, no reason code, no exit status.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Touch no file for a Maven dependency that is refused or skipped
The warnings for a dependency that is not wired say that nothing was
written for it. Three things made that less than true.
A grant whose hash is malformed drops the checksum lines an earlier
release wrote for its suffixed version, and those drops were queued
before the rewriter decided anything about the dependency. So a
dependency the reactor planner refused, or one skipped because the build
selects another version or because the selection cannot be read, could
still have `.mvn/checksums/checksums.sha256` rewritten. The drops now
wait for the decision: they are queued when the pin lands this run, or
when an earlier run's pin is in place, and not otherwise. A dependency
that is refused or skipped has no file touched for it, which is what
the mirror gate already did for the dependencies it holds back.
The mirror gate's warning read as a statement about the files, "no pin
in pom.xml", and it is also shown when the poms already hold the wiring
an earlier run wrote. It now says what this run did. Where the earlier
wiring is in place it says so, says that a build behind the mirror
fails on it, and names the command that takes it out beside the ways to
make it resolve.
The clause was spelled twice, with "pom.xml" in one warning and "a pom"
in the other and in the contract. It is one constant now, used by the
mirror gate and by the reactor planner's refusal.
The contract and the ecosystem notes use one phrase for every Maven
reason code, "the run writes nothing for the dep", and say once what it
covers. The row for a selection that cannot be read no longer opens
with a claim that its own reactor case contradicts.
Outcome changes: a hosted scan no longer rewrites the checksums file
for a dependency it refuses or skips; the wording of two warning
details. No reason code and no exit status changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>1 parent 19f96ed commit f5bb829
4 files changed
Lines changed: 323 additions & 58 deletions
File tree
- crates
- socket-patch-cli
- socket-patch-core/src
- formats/maven
- patch/redirect
- docs
0 commit comments