Skip to content

test(java): expect execution-qualified generate command in stale-code advice - #453

Merged
dmealing merged 1 commit into
mainfrom
fm/mo-java-verify-test-fix
Oct 24, 2026
Merged

dmealing merged 1 commit into
mainfrom
fm/mo-java-verify-test-fix

Conversation

@dmealing

Copy link
Copy Markdown
Member

What Changed

  • Updates the stale-code assertion in ConfiguredGeneratorsTest (server/java/maven-plugin) to expect 'mvn metaobjects:generate@codegen' deletes it, matching the execution-qualified generate command that MetaDataVerifyMojo now emits when the generate configuration lives inside an <execution>.
  • Test-only change; no production code is modified. The failing test was generatorRemovedFromAProfile_itsFilesAreCleaned_andVerifyReportsThemFirst, which failed deterministically on main (18 run, 1 fail).
Validation

Risk Assessment

✅ Low: One-line test expectation update matching genGoal() output (plugin-level config null, single generate execution "codegen" yields "metaobjects:generate@codegen"); asserts real mojo output, no production change.

Testing

Unit and module tests pass: ConfiguredGeneratorsTest 18/18 and maven-plugin 257/257. Neither scenario was driven against the live product, so both are untested and the verdict is inconclusive. The verify mojo's message is a runtime product surface, so the no-surface verdict does not apply. Live check still needed: run mvn metaobjects:verify against a project with an execution-scoped generator removed from its profile and confirm the printed command is mvn metaobjects:generate@codegen.

  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Verify reports the execution-qualified generate command when a generator is removed from a profile ⏸️ untested no Prior payload ran only ConfiguredGeneratorsTest (mvn -o -pl maven-plugin test -Dtest=ConfiguredGeneratorsTest, 18 run, 0 failures) under Maven's test harness. No live run of the verify goal against a…
Full maven-plugin module regression ⏸️ untested no Prior payload ran the existing module test suite (mvn -o -pl maven-plugin test, 257 run, 0 failures). That is a unit-test run, not a live product run, so a live pass is not established.
  • Outcome: ⚠️ 1 warning across 1 run (10m9s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (0 of 2 scenarios were driven live against the product); untested: Verify reports the execution-qualified generate command when a generator is removed from a profile, Full maven-plugin module regression
  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Verify reports the execution-qualified generate command when a generator is removed from a profile ⏸️ untested no Prior payload ran only ConfiguredGeneratorsTest (mvn -o -pl maven-plugin test -Dtest=ConfiguredGeneratorsTest, 18 run, 0 failures) under Maven's test harness. No live run of the verify goal against a…
Full maven-plugin module regression ⏸️ untested no Prior payload ran the existing module test suite (mvn -o -pl maven-plugin test, 257 run, 0 failures). That is a unit-test run, not a live product run, so a live pass is not established.
  • scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains
  • Read ConfiguredGeneratorsTest.java:268-291 and MetaDataVerifyMojo.genGoal() (lines 96-105) and confirmed the message contract
  • git show fb3a8bec: one-line assertion change from bare metaobjects:generate to metaobjects:generate@codegen
  • mvn -o -pl maven-plugin test -Dtest=ConfiguredGeneratorsTest (run from server/java): 18 run, 0 failures, BUILD SUCCESS
  • mvn -o -pl maven-plugin test (full module, run from server/java): 257 run, 0 failures, BUILD SUCCESS
  • git status --short after testing: clean worktree
⏭️ **Document** - skipped

Step was skipped.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@dmealing
dmealing merged commit 09e77a6 into main Oct 24, 2026
1 check passed
@dmealing
dmealing deleted the fm/mo-java-verify-test-fix branch October 24, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant