Repository navigation
Keep crew ashore on the payroll after the last boat is sold - #243
Merged
Merged
Conversation
Selling the last boat left her crew hired, but runDailyProduction returned early on an empty fleet, so they drew no wages and never walked off, and the fleet menu hid "Dismiss a Worker" behind the same check. Charge wages whenever anyone is hired, and offer Dismiss with no fleet, as the sale message, needsAttention and the README already promised. Closes #242 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head 53a2e5d, CI
Judgment calls, folded in here rather than anchored inline:
Overall: a narrow fix aligning the code with what the sale message, This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/business/boats.py—runDailyProductionno longer returns early on an empty fleet. Its guard is now justplayer.workers <= 0, so crew left ashore by selling the last boat are charged wages and walk off when unpaid, like any other idle hand. With no boats there is nothing to earn, so the boat loop simply does nothing.src/location/docks.py—manageFleetnow offers "Dismiss a Worker" when the fleet is empty but crew are still hired (anelifafter the boats block, so the menu order with boats is unchanged). Before this, those crew could not be let go from the fleet menu.The intended behaviour was already stated in the sale message ("still on the payroll until you give them another berth or let them go"),
needsAttention("ashore on full wages"), therunDailyProductiondocstring and README (Boats section). Only the code disagreed.One visible consequence: on a night with crew ashore and no boats, the overnight report reads "Overnight the fleet brought in nothing, and paid $N in wages." That is the existing
describeDaywording for a wages-only day.Closes #242
Test plan
tests/business/test_boats.py: new tests check that crew ashore after the last sale draw wages (summary, money,totalWagesPaid) and that the named hand walks off when unpaid.tests/location/test_docks.py: Dismiss is reachable frommanageFleetafter the last boat is sold. A guard test checks that an empty fleet with no crew still shows only Buy / Back.src/changes stashed, the three regression tests fail; restored, they pass.main+ 4 new).black --checkclean on all four changed files.schemas/*.json,*JsonReaderWriterorsaveFileManager.py.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson