Build and validation

Run commands from the repository root.

CommandPurpose
make depsCheck out the nseries commit pinned in nseries.ref at .deps/nseries (NSERIES_SRC overrides)
make nseries-updateMove the nseries pin (REF= branch, tag or sha; default the head of nseries main)
make marketfeed-adapterBuild bin/marketfeed-adapter from the marketfeed commit pinned in marketfeed.ref, against this checkout (MARKETFEED_SRC overrides)
make marketfeed-updateMove the marketfeed pin (REF= as above)
make buildBuild engine, adapters, tools and Go strategies into bin/
make testGo suites excluding legacy strategies/to-migrate (each package’s -timeout is TEST_TIMEOUT, default 20m), Python port tests and Rust tests
make testdataDerive fixtures from the committed MSFT trade sample
make runRun that sample through the Databento adapter and printbars (which places no order and, since the order-lifetime programme’s I21, GLE-467, declares optional lifetime-v2 support; cf21_conform_test.go beside it runs it under both profiles; the target names no profile, so it runs under v2, the backtest default)
make crosscheckCompare smacross decision streams across available language toolchains
make benchCheck data-path consistency and collect throughput measurements
make protoRegenerate Go protobuf bindings
make docBuild Algolang as docs/algolang.pdf using Pandoc and XeLaTeX
make test-goldenRun the build-tagged golden tests against the marketfeed archive: the legacy parity checks and the pinned demo runs, each legacy run under an explicit --lifetime v1 since GLE-470

make test gives each Go package TEST_TIMEOUT rather than Go’s default of 10 minutes, which the engine package approaches on a loaded machine (GLE-457); make test TEST_TIMEOUT=30m raises it. In the engine’s tests a grid capability probe gets a deadline of ALGOLANG_TEST_PROBE_DEADLINE (a Go duration, default 1m) instead of the production 5 seconds, so a probe slowed by load is not mistaken for a refusal. Tests of the deadline itself keep their own.

The conformance tests of strategies/conform and of each strategy that consumes it (the SMA-crossover demo first) build the strategy and the file-csv adapter and run two backtests each, one per lifetime profile; they stay in make test and skip under go test -short, as the migrations’ end-to-end tests do (the owner’s decision of 2026-10-10, GLE-467); see Conformance under both lifetimes.

Strategy validation

Use the SDK replay seam to exercise real context and wire behavior with scripted init/bar/fill inputs. Cover warmup silence, an entry and near-miss, an exit after a fill, and each named regression that protects a correction. Use protobuf for multi-order and rich-symbol scenarios that CSV cannot encode. Selftests provide a smoke check, not a strategy correctness proof.

make crosscheck pins summation order, nseries crossover semantics and numeric wire grammar across Go and nine raw-CSV clients. Available toolchains must produce byte-identical order/noop streams from the same fixture. strategies/conform’s TestCf21DecisionsCrosscheck runs the same comparison inside go test for the Go, Python and shell ports (96 decisions, 8 orders, byte-identical), skipping a port whose toolchain is absent.

Golden tests need the marketfeed archive and adapter. make test-golden builds bin/marketfeed-adapter from the pinned marketfeed first; GOLDEN_ADAPTER selects another binary instead. No other location is searched: the tests used to fall back to a hand-built /tmp/algobins/marketfeed-adapter, which a checkout at a different SHA picked up silently, so a missing pinned build now skips the run and names the path (GLE-354). The expprobe probe defaults to the same pinned build; EXPPROBE_ADAPTERS names any other. Besides the golden masters it runs TestGoldenServedSeamReason (GLE-287), which asserts that a served degraded seam’s reason reaches the run (fut:XCME:CHF’s 2014 M14->U14 seam, reason temporal); it fails against an adapter older than marketfeed GLE-281. It also runs TestGoldenRatetrendHeldContractsSlipOnTheirOwnTick (GLE-412): a ZQ (B1) run’s held contracts must slip by their own tick, 0.005, not the root’s. It also pins the demo runs: TestGoldenEsnqspreadDecisionsMatchTheServedComposites (GLE-426), TestGoldenSmacrossMarginModels (GLE-411, Margin), TestGoldenCotcarryRatioReadsTheLegs (GLE-413), TestGoldenPrintbarsSessionSettle (GLE-415), TestGoldenRefexpandReadsACalendarSpread (GLE-414), TestGoldenTermcarryReadsTheDeferredComposite and TestGoldenCurvewatchIsPointInTime (GLE-410), TestGoldenCalspreadTradesTheSpreadAsCombos (GLE-409), TestGoldenPrintkeysCalendarKeys (GLE-524, Calendar and session keys) and the kit’s TestGoldenXcPriorSessionAgreesWithNseriesOnGold (GLE-524, Prior sessions and weeks on base bars). They are excluded from ordinary make test. Tests for reporting calculations can replay the checked-in blotters independently through internal/goldentest/perfreplay.go.

Maintenance rules

  • Preserve process-local buffered readers across the handshake and message loop; flush each response so both peers can make progress.
  • Keep strategy stdout exclusively for the wire protocol.
  • Preserve deterministic bar ordering, series identity, raw execution prices and the adjusted signal frame. Negative futures prices are valid; nonfinite prices and negative volume are not.
  • Keep cache keys aligned with every input that changes served bars. Bump construction semantics versions when a changed policy changes built series.
  • Keep protobuf conversions symmetric, including the SDK’s mirrored converters; use existing round-trip and wire tests when adding fields.
  • Preserve --report off behavior and isolate benchmark fetches from trading.
  • Document supported behavior here when code lands; remove completed task briefs instead of leaving a second, contradictory feature specification.