<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guess-market/service/src/main, branch 1.0</title>
<subtitle>definitely not polymarket
</subtitle>
<id>https://git.sartin.in/guess-market/atom?h=1.0</id>
<link rel='self' href='https://git.sartin.in/guess-market/atom?h=1.0'/>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/'/>
<updated>2026-08-18T15:19:50Z</updated>
<entry>
<title>Break down purchase receipts by cost/commission, harden XML validation and state I/O</title>
<updated>2026-08-18T15:19:50Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-18T15:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=755d2265054e5140e82d322681566c3034583c95'/>
<id>urn:sha1:755d2265054e5140e82d322681566c3034583c95</id>
<content type='text'>
Adds a full pre-load validation pass for GM XML seeds (ids, names,
options, commission, LMSR liquidity), replaces IO.print with
System.out, and surfaces detailed error messages across load/save
commands instead of generic failures.
</content>
</entry>
<entry>
<title>Wire event ledger movements, show winning market by name, seed LMSR subsidy</title>
<updated>2026-08-18T09:07:57Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-18T09:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=9dab2b3d624ecae08439532157fb8b9805fe9274'/>
<id>urn:sha1:9dab2b3d624ecae08439532157fb8b9805fe9274</id>
<content type='text'>
- Event ledger now grows on purchase and shrinks on payout, mirroring
  the exact amounts moved on the buyer's ledger (it previously had a
  Ledger object that nothing ever wrote to).
- Settlement and event-detail views now show the winning market's
  display name instead of its raw key; event details are viewable for
  settled events too (the picker previously excluded anything not
  ACTIVE).
- LMSR events seed their ledger with a SUBSIDY entry for the market
  maker's worst-case loss (b * ln(outcomes)), reusing the existing
  cost() function rather than recomputing the formula.
</content>
</entry>
<entry>
<title>Add XML schema validation, split build scripts by module, rename BuyMenuCommand to PlaceOrderMenuCommand</title>
<updated>2026-08-18T06:52:47Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-18T06:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=d2688a197bd680580699f05e8194f9180e4832fa'/>
<id>urn:sha1:d2688a197bd680580699f05e8194f9180e4832fa</id>
<content type='text'>
Introduces XMLValidatorV1 and deserializer/adapter classes for events, ledgers,
markets, users, and trading mechanisms. Replaces the monolithic build.bat/run.sh
scripts with per-module tools (_util.sh, build.sh, package.sh, test.sh) that
compile in dependency order.
</content>
</entry>
<entry>
<title>Replace order matching with risk/matching/fulfillment/settlement pipeline</title>
<updated>2026-08-17T11:15:59Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-17T11:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=13a221ffaefc169d028c7eab6f21ac88052d1d40'/>
<id>urn:sha1:13a221ffaefc169d028c7eab6f21ac88052d1d40</id>
<content type='text'>
Move XML loading infrastructure and models under service/catalog, and
split order execution into a real pipeline: RiskEngine checks the order,
MatchingEngine matches it, FulfillmentContext books the resulting trades,
and SettlementContext resolves winning markets. GuessMarketContext.buyShares
becomes placeOrder(price, quantity), and TradingMechanism.buy now returns
matched trades directly instead of a single TradeExecution.
</content>
</entry>
<entry>
<title>Split DTOs into api/model, extract order matching into service/matching</title>
<updated>2026-08-16T18:50:15Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-16T18:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=eed9265be711432f40247f149c07f9e33511192a'/>
<id>urn:sha1:eed9265be711432f40247f149c07f9e33511192a</id>
<content type='text'>
Moves Event/Ledger DTOs out of the flat api package into
api/model/{event,ledger}, and moves LocalCatalogContext and order
matching logic into dedicated service/catalog and service/matching
packages, replacing TradingOperation/TradingOperationImpl.
</content>
</entry>
<entry>
<title>Rename Option/Account to Market/Ledger, add Result-based error handling</title>
<updated>2026-08-16T11:55:08Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-16T11:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=07a7a1cb3e4cfc1580bc05b0a6010a1e9f7e7508'/>
<id>urn:sha1:07a7a1cb3e4cfc1580bc05b0a6010a1e9f7e7508</id>
<content type='text'>
Split GuessMarketContext into a separate CatalogContext for read-only
event listing, wrap fallible operations in Result&lt;T&gt; instead of throwing,
and wire load/save of events and users through a JSON Wrapper.
</content>
</entry>
<entry>
<title>Implement LMSR and order-book trading logic, wire MarketContext facade and new menu commands</title>
<updated>2026-08-15T16:25:40Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-15T16:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=0247f3f5068b96df52a4f9424578d4c66ca6975c'/>
<id>urn:sha1:0247f3f5068b96df52a4f9424578d4c66ca6975c</id>
<content type='text'>
Fill in the previously stubbed cost/pricing math for both trading
mechanisms, and give OrderBookTradingMechanism an actual matching engine
with resting bid/ask books. Fold EventRepository/UserRepository access
into a single MarketContext used by LocalGuessMarketContext, and move the
repository package under infrastructure. Add Buy/EventDetails/LoadState/
SaveState/SettleEvent console commands and wire them into App/Menu.
</content>
</entry>
<entry>
<title>Switch TradingMechanism quantities to int, add yes/no and select prompts</title>
<updated>2026-08-14T20:54:31Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-14T20:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=d77a70c48865592be9029aeb0c83b36c162ea31a'/>
<id>urn:sha1:d77a70c48865592be9029aeb0c83b36c162ea31a</id>
<content type='text'>
TradingMechanism's q/quantity params move from long/long[] to int/int[]
to match the rest of the domain (Trade.quantity, Option counts, etc.
are already int).

Add InputProcessor.readYesNo and readSelect for upcoming menu commands
that need a confirm prompt or a pick-from-list prompt.
</content>
</entry>
<entry>
<title>Collapse console I/O interfaces into InputProcessor, drop unneeded atomics</title>
<updated>2026-08-14T20:32:49Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-14T20:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=001f6444fec8fcd5312028cfdae90f4f93424559'/>
<id>urn:sha1:001f6444fec8fcd5312028cfdae90f4f93424559</id>
<content type='text'>
InputProvider/OutputProvider each had one implementation and no test
exercised the seam, so fold Console{Input,Output}Provider straight into
InputProcessor and update Menu/MenuCommand call sites accordingly.

Account and Event both use AtomicInteger for a ledger/trade id counter
that's only ever touched next to a plain, non-thread-safe ArrayList add
in the same method - the atomic bought no real thread-safety. Swapped
both to plain int with ++.
</content>
</entry>
<entry>
<title>Implement in-memory repositories, XML load validation, and menu exit/list commands</title>
<updated>2026-08-14T18:49:26Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-14T18:49:26Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=12611a5f0116351ab9114f5403222aead7a8329f'/>
<id>urn:sha1:12611a5f0116351ab9114f5403222aead7a8329f</id>
<content type='text'>
- Add generic Repository&lt;T&gt; interface; EventRepository/UserRepository extend it
- Implement InMemoryEventRepository/InMemoryUserRepository backed by ArrayList
- Rename XMLLoader to XMLLoaderV1, add LoadValidator and mapper/v2 package
- Add OrderBookTradingMechanism
- Add User(String, int) convenience constructor
- Add ListEventsMenuCommand and ExitMenuCommand, isExit() on MenuCommand
- Menu now sizes selection range by max command index and exits on isExit()
- LoadFileMenuCommand reports validation issues on failed loads
- Untrack test-data/ and config.properties from .gitignore
</content>
</entry>
</feed>
