[#26] v0.5.0: size-ordered bond fills, ideal-rate display, negative rates, --replay (Closes #26) #111

Merged
robertismo merged 3 commits from v050 into master 2026-09-30 22:27:58 +00:00
Owner

The v0.5.0 engine checklist from #26, in four commits:

  1. Bond takes fill in size order. Every taker declares against the phase-start market (human first, then AI hooks), and fills execute in order of capital need, largest first, stable ties keep seat order. A bigger borrower can take the cheaper money before a smaller one — the debt-taking risk is now formalized.
  2. Rates displayed as ideal, not guaranteed. The take screen and market views say it up front; the preview is labeled ideal; after the ordered fill, the post-resolution report calls out when the realized result is worse than the previewed one.
  3. Negative interest rates. Loan bids clamp to ±cap (a negative bid undercuts the zero-floor bidders; the Vickrey award books the runner-up rate). Bond offers may price up to (2−floor)×face — a premium price pays negative yield to the buyer.
  4. --replay . Structured JSON replay: config, seed, players, and per turn the die, deposit rates, loan offers, bids, awards (funded/unfunded), bond offers, bond takes with fills, auctions, and end-of-turn bank states, plus the outcome. Zero overhead when the flag is off.

Tests: TestNegativeLoanBidAward (negative Vickrey books −5%), TestBondPremiumOfferAccepted (premium offer + negative implied return), TestLoanRateClampSymmetric. Build/test/vet green; scripted smoke verified the size-ordered fill and the "market moved" note; headless regression clean.

Gate and ship follow this PR: full bench, darwin ARM64 build, tag v0.5.0, release tarball.

The v0.5.0 engine checklist from #26, in four commits: 1. **Bond takes fill in size order.** Every taker declares against the phase-start market (human first, then AI hooks), and fills execute in order of capital need, largest first, stable ties keep seat order. A bigger borrower can take the cheaper money before a smaller one — the debt-taking risk is now formalized. 2. **Rates displayed as ideal, not guaranteed.** The take screen and market views say it up front; the preview is labeled ideal; after the ordered fill, the post-resolution report calls out when the realized result is worse than the previewed one. 3. **Negative interest rates.** Loan bids clamp to ±cap (a negative bid undercuts the zero-floor bidders; the Vickrey award books the runner-up rate). Bond offers may price up to (2−floor)×face — a premium price pays negative yield to the buyer. 4. **--replay <file>.** Structured JSON replay: config, seed, players, and per turn the die, deposit rates, loan offers, bids, awards (funded/unfunded), bond offers, bond takes with fills, auctions, and end-of-turn bank states, plus the outcome. Zero overhead when the flag is off. Tests: TestNegativeLoanBidAward (negative Vickrey books −5%), TestBondPremiumOfferAccepted (premium offer + negative implied return), TestLoanRateClampSymmetric. Build/test/vet green; scripted smoke verified the size-ordered fill and the "market moved" note; headless regression clean. Gate and ship follow this PR: full bench, darwin ARM64 build, tag v0.5.0, release tarball.
Takers now DECLARE against the phase-start market (human first, then AI
hooks), and fills execute in order of capital need — largest first,
stable ties keep seat order. A bigger borrower can therefore take the
cheaper money before a smaller one; the take screen says so up front
(rates are ideal, not guaranteed), the preview is labeled ideal, and
the post-resolution report calls out the difference when the realized
fill is worse than the previewed one. Emergency finance borrowing keeps
its own last-resort order.
Loan bids now clamp to [-cap, +cap] — a negative rate undercuts the
zero-floor bidders and the borrower books it. Bond offers may price up
to (2-floor)xface (the mirror of the floor) — a premium price pays
negative yield to the buyer. Wizard and sheet prompts document both.
Tests: negative Vickrey award books the runner-up negative rate,
premium offer accepted with negative implied return, symmetric clamp.
add --replay: record config, actions, and outcomes as JSON (issue #26, v0.5.0)
All checks were successful
build / build (push) Successful in 24s
227dc0eab1
--replay <file> writes a structured replay: the full config, seed,
players, and per turn the die, deposit rates, loan offers, bids,
awards (funded/unfunded), bond offers, bond takes with fills, auctions,
and end-of-turn bank states, plus the final outcome. Zero overhead when
the flag is off (all recorders no-op on a nil Replay).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Winnie/bankwars!111
No description provided.