alt/packages/contracts
toki bdbfe8228e feat: scheduled market data refresh - parser_map, refresh status model, CLI output, scheduler backfill, socket handlers
- Add parser_map for market data refresh configuration propagation (cli/worker/api)
- Implement refresh status model with SQLite persistence (status_store.go)
- Add scheduler refresh status headless output to CLI operator
- Extend backfill scheduler with status tracking (start/complete/fail)
- Add socket events for scheduler refresh status (start/complete/fail)
- Update proto definitions for refresh status
- Add generated PB files for client
2026-06-22 18:46:45 +09:00
..
gen/go feat: scheduled market data refresh - parser_map, refresh status model, CLI output, scheduler backfill, socket handlers 2026-06-22 18:46:45 +09:00
proto/alt/v1 feat: scheduled market data refresh - parser_map, refresh status model, CLI output, scheduler backfill, socket handlers 2026-06-22 18:46:45 +09:00
README.md feat: contract codegen baseline - add proto code generation for client and server 2026-05-28 05:29:03 +09:00

ALT Contracts

This package owns ALT application-level protobuf contracts.

proto-socket remains the transport protocol. ALT messages should be defined here and carried inside proto-socket PacketBase.data.

Initial contract direction:

  • additive protobuf changes first
  • explicit handshake/version messages because proto-socket protocol 0.1 does not carry an application version field
  • market-neutral models with Korea market daily bars as the MVP path (including ListBarsRequest/ListBarsResponse and GetBacktestResultRequest/GetBacktestResultResponse for the MVP schema)
  • generated clients should be derived from proto/ sources, not edited by hand

Compatibility

  • Prefer additive fields and messages.
  • Never renumber existing fields.
  • Reserve removals or semantic rewrites for an explicit version bump.

Transport Boundary

  • proto-socket owns PacketBase, heartbeat, nonce, and transport framing.
  • ALT alt.v1 messages are application payloads carried in PacketBase.data.

Codegen

Generated outputs are committed source-of-derivation artifacts:

  • Go: packages/contracts/gen/go/alt/v1/*.pb.go (Go module git.toki-labs.com/toki/alt/packages/contracts/gen/go).
  • Dart: apps/client/lib/src/generated/alt/v1/*.pb*.dart.

Commands (run from repository root):

  • bin/contracts-gen regenerates Go and Dart outputs from proto/. Requires protoc, protoc-gen-go, and a working apps/client Flutter package (the Dart plugin is invoked via apps/client/tool/protoc-gen-dart).
  • bin/contracts-check snapshots current generated outputs, regenerates, and fails when the regeneration produces a diff. Used by bin/test to keep schema and generated code aligned.

Do not hand-edit files under packages/contracts/gen/ or apps/client/lib/src/generated/.