[18India] Fix hand share purchase price to use IPO price#12714
Open
ddaybell wants to merge 1 commit into
Open
Conversation
…rice Affordability checks for hand share certificates now explicitly compute the IPO price from par_price * num_shares rather than relying on company.value, which can reflect market price when share ownership changes. Closes tobymao#11114. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
perwestling
previously approved these changes
Jun 14, 2026
perwestling
left a comment
Collaborator
There was a problem hiding this comment.
PR Review: #12714 - [18India] Fix hand share purchase price to use IPO price
Reviewed with AI assistance by Mistral Vibe
✅ Strengths
- Fixes documented issue (#11114)
- Minimal, focused change (13 lines added, 2 removed)
- Correct root cause: was using
company.value(market price) instead of IPO/par price for hand certificates - All 18India fixtures pass (43/43)
- Clean helper method (
hand_price) with proper fallbacks
💡 Strong Recommendation
Since 18India has existing fixtures, please add a test case verifying:
- Hand share certificates use IPO price, not market price
- Fallback to
company.valuefor other certificate types - Behavior is correct when market price differs from IPO price
❓ Questions
- Have you verified the manual test case mentioned in the PR description?
✅ Verdict: Approve
The fix is correct and addresses a real bug. Adding a test is strongly recommended but not blocking.
| end | ||
| end | ||
|
|
||
| def hand_price(company) |
Collaborator
There was a problem hiding this comment.
Strongly recommend: Add state-based fixture test
Since 18India has existing fixtures, please add a test that verifies:
- A player can buy a hand share certificate at IPO price when corporation's market price is above IPO price
- A player can buy a hand share certificate at IPO price when corporation's market price is below IPO price
- Non-share/president certificates still use
company.value
This prevents regression of the price calculation logic.
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
Test plan
Closes #11114
?? Generated with Claude Code