How do I fail a PR build when someone introduces a bean cycle? #27
|
We keep accumulating dependency cycles that nobody notices until refactoring time. Can WireDoctor gate this in CI? |
Replies: 1 comment
|
Yes — this is the architectural regression guard. Commit a baseline like a lockfile for your architecture, and the PR that introduces a new cycle fails its build the same day. 1. Capture the baseline once, commit it: ./mvnw spring-boot:run \
-Dspring-boot.run.arguments="--wiredoctor.baseline=wiredoctor-baseline.json --wiredoctor.baseline-write=true"
git add wiredoctor-baseline.json && git commit -m "chore: WireDoctor baseline"2. Arm the gate in CI: # application-ci.properties
wiredoctor.baseline=wiredoctor-baseline.json
wiredoctor.fail-on=new-cycleA tripped gate fails startup with a precise message ( Other available gates in the same Cycle detection itself is Tarjan SCC on the resolved graph — and the report's |
Yes — this is the architectural regression guard. Commit a baseline like a lockfile for your architecture, and the PR that introduces a new cycle fails its build the same day.
1. Capture the baseline once, commit it:
2. Arm the gate in CI:
A tripped gate fails startup with a precise message (
WireDoctorRegressionException), writeswiredoctor-gate.status(PASS/FAIL) andwiredoct…