Skip to content

chore(core): trim stale comments in DBWrapper and SingletonWorkDataWorkLoad#538

Merged
SpriCoder merged 1 commit into
masterfrom
chore/trim-stale-comments
May 28, 2026
Merged

chore(core): trim stale comments in DBWrapper and SingletonWorkDataWorkLoad#538
SpriCoder merged 1 commit into
masterfrom
chore/trim-stale-comments

Conversation

@SpriCoder
Copy link
Copy Markdown
Collaborator

@SpriCoder SpriCoder commented May 26, 2026

Summary

Two stale-comment cleanups in core, surfaced in a Staff-Engineer-style review of the recent #533#537 batch. No behavior change.

  • DBWrapper#deviceSummary — drop the "previously the last loop iteration would NPE" note. The code now short-circuits on deviceSummaries.isEmpty() and picks [0] as the comparison base; the historical note no longer adds information.
  • SingletonWorkDataWorkLoad#getOneBatch — drop the (defect #3) PR back-reference and the single-threaded equivalence trivia from the sensor-cursor comment. Keep the actionable WHY: two independent counters can be raced between the device and sensor reads, mis-pairing them.

Both comments hit project conventions in CLAUDE.md:

Don't reference the current task, fix, or callers […] since those belong in the PR description and rot as the codebase evolves.

Test plan

  • mvn -pl core spotless:check
  • mvn -pl core compile
  • CI green

…rkLoad

DBWrapper#deviceSummary: drop the "previously the last loop iteration
would NPE" note — the code already short-circuits on isEmpty and picks
the first summary as the comparison base, which is self-explanatory.

SingletonWorkDataWorkLoad#getOneBatch: drop the "(defect #3)" PR
back-reference and the redundant single-threaded equivalence note from
the sensor-cursor comment, keep the actionable WHY (two independent
counters race the device/sensor pairing).

No behavior change.
@SpriCoder SpriCoder merged commit d078f59 into master May 28, 2026
2 checks passed
@SpriCoder SpriCoder deleted the chore/trim-stale-comments branch May 28, 2026 09:13
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