Skip to content

Sonarman goes for the loudest trace; version 0.5.0 - #6

Merged
JFrusher merged 1 commit into
developfrom
claude/nice-shannon-ply3so
Oct 9, 2026
Merged

JFrusher merged 1 commit into
developfrom
claude/nice-shannon-ply3so

Conversation

@JFrusher

@JFrusher JFrusher commented Oct 9, 2026

Copy link
Copy Markdown
Owner

This follows up the sonar review thread from PR #5 and bumps the version for the 0.5.0 release.

Sonar

With the captain away from sonar, the crew's sonarman trains the dial toward bearings[argmax(heard)]. heard is weighted by the dial's 25° cone, so when no contact is in the cone it is all zeros. argmax then picks whichever ship is listed first.

I reproduced it: with a faint ship at 9 km listed first and a loud one at 1.5 km second, the dial went to the faint one at 300° (level 31) and ignored the loud one at 60° (level 158).

He now takes the loudest level when nothing is in his cone, which is what the waterfall shows him. CodeRabbit's suggestion on PR #5 was to skip the slew instead, but that would leave the dial parked and never searching. A new test_crew case fails on the old code (dial at 301°) and passes with the fix.

Version

0.4.0 → 0.5.0 in version.py, pyproject.toml, uv.lock and the README badge and footer.

All suites pass locally (checks.py), and the golden run is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_0128GVA6bk4EdYWNsPSedKEA


Generated by Claude Code

…; version 0.5.0

The crew's sonarman slewed the dial to bearings[argmax(heard)]. heard is cone-weighted, so with no contact
in the cone it was all zeros and argmax picked whichever ship was listed first: a faint one at 9 km won over
a loud one at 1.5 km. He now takes the loudest level, which is what the waterfall shows him. (The CodeRabbit
thread on PR #5 asked to skip the slew instead; that would leave the dial parked and never searching.)

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

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5202738-c058-46bb-abe7-b142f30efb0f
📥 Commits

Reviewing files that changed from the base of the PR and between 97b1d1c and 05cd9d1.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • README.md
  • pyproject.toml
  • src/console.py
  • src/crew.py
  • src/version.py
  • tests/test_crew.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Sonar crew now trains the dial toward the loudest available contact when not tracking, rather than defaulting to the first-listed contact.
  • Release
    • Updated the project version to 0.5.0.

Walkthrough

The sonar crew now uses sound levels to select the loudest contact when no contacts are heard. The console passes sound levels to the crew, and a test checks contact selection. Project version references change from 0.4.0 to 0.5.0.

Changes

Sonar contact selection and release version

Layer / File(s) Summary
Pass sound levels to sonar selection
src/console.py, src/crew.py, tests/test_crew.py
Console.update passes levels to Crew.update, which passes them to _sonar. When tracking is off, _sonar selects the loudest heard contact, or the loudest trace in levels when no contacts are heard. A test checks selection of the louder contact.
Update release version
README.md, pyproject.toml, src/version.py
The README badge and footer, project metadata, and __version__ change from 0.4.0 to 0.5.0.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to 05cd9

The dial now searches toward the loudest trace when no contact is heard, and the release version is consistent across project surfaces. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main sonar behaviour change and the version update.
Description check Passed The description directly explains the sonar fix, test coverage, version update, and reported validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit listens by the dial,
The louder trace points out its trail.
The crew receives the levels clear,
And version five is written here.
I twitch my nose and hop away!

Comment @coderabbitai help to get the list of available commands.

@JFrusher
JFrusher merged commit 2408072 into develop Oct 9, 2026
2 checks passed
@JFrusher JFrusher mentioned this pull request Oct 9, 2026
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