<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guess-market/test-data, branch 4.0</title>
<subtitle>definitely not polymarket
</subtitle>
<id>https://git.sartin.in/guess-market/atom?h=4.0</id>
<link rel='self' href='https://git.sartin.in/guess-market/atom?h=4.0'/>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/'/>
<updated>2026-10-08T13:45:30Z</updated>
<entry>
<title>catalog: add cumulative v3 XML loader and event mapper</title>
<updated>2026-10-08T13:45:30Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-10-08T13:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=95eb4ff500defc4e34d043bbc096593ffcadecea'/>
<id>urn:sha1:95eb4ff500defc4e34d043bbc096593ffcadecea</id>
<content type='text'>

Exercise 3 uploads arrive over HTTP and must never be written to the
server's disk, so load Schema v3 straight from an InputStream. Each
valid file is appended to the market rather than replacing it, and the
uploading user becomes the Market Maker of every event in it.

With no id in v3, the mapper keys events by their trimmed name, so the
repository's case-insensitive lookup finds them by name. Display ids
continue from the current market size.

The whole file is validated and mapped before anything is added, so a
rejected upload leaves the market as it was. Loading is synchronized
so two concurrent uploads cannot both pass the name-collision check.
DTDs and external entities are disabled on the parser, since the input
is untrusted and an XXE payload could otherwise read server files.

Check the loader against the course's Exercise 3 sample files, kept
with their schema under test-data/ex-3/.


</content>
</entry>
<entry>
<title>ex-2: add invalid-input fixtures and wire ui-desktop to the service</title>
<updated>2026-09-06T07:36:54Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-09-06T07:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=508898f52c16cc737bc7d08b8ee4c29fab8d1146'/>
<id>urn:sha1:508898f52c16cc737bc7d08b8ee4c29fab8d1146</id>
<content type='text'>
The ex-2 loader has to reject documents that are schema-valid but
logically broken, and so far only error-2.xml and error-3.xml exercised
that path. Add one fixture per validation rule under
test-data/ex-2/invalid, each a copy of small.xml with a single defect
described in a leading comment: a non-.xml extension, a duplicate event
id, commission outside 0..90 on either side, a duplicate user name,
zero or negative initial cash, a market maker referencing an unknown
event, and an event with no market maker or with two.

Teach LedgerMapper to map individual LedgerEntry records to
LedgerEntryDTO, renaming id to seq and time to at and rendering the
timestamp through InstantOptions.humanize, so callers can show a ledger
history rather than only the account summary.

Make ui-desktop depend on api and service in the build tooling and in
its Eclipse classpath, since the desktop UI now talks to the service
layer directly, and put lib/openjfx on java.library.path for the test
run so tests touching JavaFX can load its native libraries.
</content>
</entry>
<entry>
<title>catalog: add generated v3 JAXB binding and ex-2 test data</title>
<updated>2026-09-06T06:21:37Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-09-06T06:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=da82f3b492c3cd36f2e8723632a63a6cc1f4e39b'/>
<id>urn:sha1:da82f3b492c3cd36f2e8723632a63a6cc1f4e39b</id>
<content type='text'>
The ex-2 schema describes a nested Guess-Market/GM-events document in
which every event carries its pricing mechanism inline, as either a
GM-LMSR element holding the liquidity parameter b or a GM-order-book
element holding the allow-mint, initial and d attributes, instead of
naming a mechanism and passing its parameters separately.

Add the xjc-generated classes for that schema under catalog.model.v3,
along with the fixtures the loader will be tested against: small.xml
with two events, one per mechanism, multiple.xml with four, and two
negative cases -- error-2.xml, where a market maker is funded with
zero initial cash, and error-3.xml, where a market maker points at
event id 12, which no event declares -- so the cross-reference and
funding checks have something to reject.

The binding covers the GM-events subtree only. The GM-users half of
the document and the per-event id element are not bound yet, so
nothing reads these classes so far.
</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>
