Skip to content

style: apply spotless to the enable_thinking and calibrate changes - #203

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/fix-spotless-getter-wrap
Sep 1, 2026
Merged

style: apply spotless to the enable_thinking and calibrate changes#203
bernardladenthin merged 1 commit into
mainfrom
claude/fix-spotless-getter-wrap

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • main fails mvn verify at spotless:check. Five files carry format violations, from both feat!: send enable_thinking only when it was actually set #199 (the isChatTemplateEnableThinkinggetChatTemplateEnableThinking rename pushed lines past the wrap point) and feat: write the calibration report as JSON and YAML #202 (the new renderers).
  • Formatting only. No logic, no assertion, no test changed — the diff is 12 insertions and 8 deletions of line breaks.
  • Produced by mvn spotless:apply, not by hand. My own hand-wrap of the same line was rejected by spotless:check on the next run, which is the argument for letting the tool decide the layout.

Why it got through twice

spotless:check binds to a phase mvn test never reaches. #202 was validated with a full reactor test run and a complete PIT pass at mutationThreshold 100 across all three modules — and still shipped unformatted, because none of that runs the goal.

This is the same failure mode as the SpotBugs breakage in java-llama.cpp#409 this week: a gate bound past test, a local loop that stops at test, and a green-looking change that reddens main. More tests do not close it; running the goal does.

Test plan

  • mvn -o -f srcmorph/pom.xml spotless:check exits 0 (was exit 1 naming five files)
  • Diff reviewed line by line — every hunk is a line break, nothing else
  • CI is green on this branch — no: main pins the unpublished net.ladenthin:llama:5.2.0, so every srcmorph PR still fails at dependency resolution. Unrelated to this change.

Related issues / PRs

Fixes formatting introduced by #199 and #202.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH


Generated by Claude Code

main fails 'mvn verify' at spotless:check. Five files carry violations, from
both #199 (the getter rename lengthened lines past the wrap point) and #202
(the new renderers).

Same root cause as the SpotBugs failure fixed in java-llama.cpp#409, in the
same week: spotless:check binds to a phase that 'mvn test' never reaches, so a
change validated with tests -- even with tests plus a full PIT run, as #202 was
-- can still be unformatted. Running the goal, not more tests, is what catches
this.

Formatting only: no logic, no assertion, no test changed. Produced by
'mvn spotless:apply' rather than by hand, after a hand-wrap of the same line
was itself rejected by spotless:check -- the tool decides the layout, not me.

Verified: 'mvn -f srcmorph/pom.xml spotless:check' exits 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
@claude

claude Bot commented Sep 1, 2026

Copy link
Copy Markdown

Code Review Summary

Approved — This PR contains formatting-only changes with no logic, assertions, or test modifications.

Review Findings

Code Quality: ✅ No issues

  • All changes are pure line-break adjustments to comply with Spotless configuration
  • No logic changes, no new bugs introduced
  • Formatting applied by mvn spotless:apply tool, ensuring consistency

Security: ✅ No issues

  • No sensitive data exposure
  • No security-relevant code paths modified

Architecture & Design: ✅ Compliant

  • Changes maintain the existing code structure and design patterns
  • Complies with project conventions in CODE_WRITING_GUIDE.md

Context Validation

The root-cause analysis in the PR description is correct: spotless:check binds to the verify phase, which mvn test never reaches. This explains how #199 and #202 shipped with formatting violations despite passing comprehensive test suites (including full PIT mutation testing at 100% threshold). Running the formatting goal, not additional tests, is what catches these violations — this design pattern needs to be addressed in CI (noted in the PR as a parallel issue to SpotBugs in java-llama.cpp#409).

Files Reviewed

All 5 files contain only line wrapping/joining adjustments:

  • AiModelDefinition.java — field initialization joined to single line
  • LlamaCppJniConfig.java — field initialization joined to single line
  • CalibrationReport.java — append chains split across multiple lines for length compliance
  • AiModelDefinitionSupportTest.java — assertion split for length compliance
  • CalibrationReportTest.java — assertion split for length compliance

Ready to merge once CI gates pass.

@bernardladenthin
bernardladenthin merged commit 4349004 into main Sep 1, 2026
19 of 27 checks passed
@bernardladenthin
bernardladenthin deleted the claude/fix-spotless-getter-wrap branch September 1, 2026 20:08
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.

2 participants