2.4 KiB
2.4 KiB
1. Ticker Source API
- 1.1 Add
PriceSourceNameunderString -> Nameinconf/detag.confand retain required generated-type imports in.tjavasources. - 1.2 Add the
PriceSourceand functionalPriceSinkAPI contracts with typed metadata andPriceSource.start(PriceSink)lifecycle wiring. - 1.3 Extend
PriceObservationwith source identity and extendTickerServicewith stop lifecycle while keeping plugin management out of the public service API.
2. Source Registry and Persistence
- 2.1 Implement internal handling of context-provided sources with identity validation, duplicate rejection, lifecycle state checks, and exact-instance callback validation in
TickerServiceImpl. - 2.2 Implement centralized UUID/source/safe-symbol history paths without scanning, creating, or migrating filesystem content.
- 2.3 Load active per-source histories with strict parsing, comments, source-context observations, clear malformed-line errors, and greatest-timestamp restoration across sources.
- 2.4 Persist concurrent active-source announcements to independent histories with complete-line serialization and
FileChannel.force(true)before atomic greatest-timestamp publication. - 2.5 Implement ticker start/stop orchestration so only active sources receive
start(this), every started source receives a stop attempt, and partial startup is rolled back.
3. Hardcoded Source and Wiring
- 3.1 Add an independently constructible, stoppable
HardcodedPriceSourcewhosestart(PriceSink)preserves an existing sink on repeated start, announcesEVE_USDC = 14.85immediately, and owns one-minute fixed-delay scheduling. - 3.2 Update NenjimHub temporary autorun wiring to construct the hardcoded source independently and pass it through
TickerServiceImpl(PriceSource...)as a Cauldron simulation of future context discovery.
4. Verification
- 4.1 Compile the project and manually verify API shape, constructor-independent sources, start-time sink wiring and repeated-start protection, safe and duplicate source handling, missing/empty/malformed histories, UUID paths, legacy-file exclusion, source lifecycle, per-source formatting, persistence failure, concurrent callbacks, and greatest-timestamp selection without adding automated tests.
- 4.2 Validate the OpenSpec change, confirm
TickerServiceImplhas no generator/scheduler constants, and confirm no unrelated behavior or generated Detag source was edited.