Installation and dependencies
You need Go 1.26.3 or later (per go.mod), git, make, and read access to the pinned dependencies. Use the current Algolang checkout supplied with your installation; it contains the standalone SDK in sdk/strategy. For older installations, see Which algolang checkout. From the checkout root:
make build testdatamake build first runs make deps (see Pinned checkouts), then compiles everything into ./bin: the engine (algo), the three data adapters, the bundled strategies (including hello, used below), and the algodata tool. make testdata converts the bundled trade sample into the fixture files the examples use. All commands in this manual are run from the repository root.
Pinned checkouts
Two other repositories are checked out at build time. They are not copied into this one, and they are not expected beside it. Each has a committed pin file holding one commit id, a clone at .deps/<name>-pinned, and a symlink .deps/<name> to that clone. The pindep tool (cmd/tools/pindep) keeps them in step, and the Makefile runs it.
| Repository | Pin | Needed for | Working-copy override |
|---|---|---|---|
| nseries | nseries.ref | Every build: go.mod has replace nseries => ./.deps/nseries | NSERIES_SRC |
| marketfeed | marketfeed.ref | make marketfeed-adapter and make test-golden | MARKETFEED_SRC |
make deps checks nseries out, and make build, make test and make test-golden run it first. Plain go build and go test fail with “replacement directory ./.deps/nseries does not exist” until it has run once. New Conductor workspaces run it from .conductor/settings.toml. Go does not checksum a module replaced by a directory, so the pin is what makes a build reproducible.
Marketfeed is not a Go dependency: the engine talks to its adapter over the data wire. make marketfeed-adapter checks marketfeed out and builds bin/marketfeed-adapter from it. The adapter is compiled against this algolang checkout, not marketfeed’s own algolang pin, so it speaks the protocol of the engine being built. To do that, the target runs marketfeed’s make deps inside the checkout with ALGOLANG_SRC pointing here, which also checks out marketfeed’s nseries pin. make test-golden builds the adapter first unless GOLDEN_ADAPTER names another binary. The archive at /usr/local/marketfeed is data, not a repository, and remains a prerequisite of the golden tests.
pindep refuses to move a pinned checkout that has local changes. To work on a dependency alongside Algolang, point its link at your own working copy:
NSERIES_SRC=~/src/nseries make build # .deps/nseries -> your nseries
MARKETFEED_SRC=~/src/marketfeed make test-golden # adapter built from your marketfeed
make build # back to the pinsWith MARKETFEED_SRC, building the adapter runs marketfeed’s make deps in your working copy, which points that copy’s .deps/algolang at this checkout. The next make there without ALGOLANG_SRC points it back at marketfeed’s pin.
Moving a pin
A pin file holds one full commit id. Lines starting with # are comments and survive every update. Change a pin with its update target, not by hand:
make nseries-update # the head of nseries main
make marketfeed-update REF=<tag> # a tag (an annotated tag pins the commit it tags)
make nseries-update REF=<40-hex sha> # an exact commitThe target resolves REF against the repository and fetches the commit. It checks that the commit’s own go.mod declares the expected module for that dependency. Only then does it rewrite the pin and check the commit out. It refuses a name that is both a branch and a tag pointing at different commits. If the ref cannot be resolved, fetched or validated, the pin is left untouched. The checkout that follows can still fail, for example on a clone with local changes. The new pin then stays in place for the next run to check out.
For an nseries change:
- Land the change on nseries
mainthrough a pull request. - Here, run
make nseries-update, thenmake build test. Also runmake test-goldenif the change can alter an indicator’s values: the golden masters compute their indicators with nseries. - If nseries changed an exported function, fix the callers in the same commit. Then commit
nseries.refand open a pull request. - Do the same in marketfeed (see Pins across algolang and marketfeed).
For a marketfeed change that the golden tests should see, land it on marketfeed main, then run make marketfeed-update and make test-golden here, and commit marketfeed.ref.
Pin commits on main, not commits on a branch. Pull requests in nseries and marketfeed are squash-merged, which puts a new commit on main; the branch commit survives only as long as its branch. A pin to a branch commit keeps working until the branch is deleted. After that, fresh clones fail with “commit or ref not found”. To try a change before it merges, use the working-copy override. If you did pin a branch commit, run the update target again once the change is on main.
Pins across algolang and marketfeed
Marketfeed checks out algolang and nseries the same way (algolang.ref, nseries.ref, .deps/), using this repository’s pindep. So the two repositories pin each other. Marketfeed’s algolang.ref names the engine that marketfeed is built and shipped against, and this repository’s marketfeed.ref names the adapter the golden tests run. That is not a build cycle: marketfeed builds against its algolang pin, and the golden adapter builds against this checkout.
Go applies only the replace directives of the module being built. In a marketfeed build, marketfeed’s nseries pin therefore supplies nseries to every package, algolang’s included. Keep the two nseries pins on the same commit so that the chart viewer’s indicators and the engine’s strategies compute the same values. Nothing breaks while they differ.
A change that spans both repositories, a wire-protocol field for example:
- Develop against working copies:
MARKETFEED_SRC=<your marketfeed>here,ALGOLANG_SRC=<this checkout>in marketfeed. - Land the algolang change on
main. - In marketfeed, run
make algolang-updateand land the marketfeed change. - Here, run
make marketfeed-updateandmake test-golden, and land the pin.
A change to cmd/tools/pindep reaches marketfeed only when marketfeed moves its algolang pin.
Which algolang checkout
The current engine runs standalone strategy executables through the SDK in sdk/strategy. The pre-2026 engine uses the legacy RunState interface. Updating an old checkout does not migrate it to the current engine: obtain a fresh current checkout using the access details supplied with your installation. Marketfeed refuses a legacy checkout as ALGOLANG_SRC with “go.mod declares the wrong module path”.
When make deps fails
The same messages come from make marketfeed-src, make marketfeed-adapter and the update targets, prefixed pindep:.
| Message | Cause | Fix |
|---|---|---|
read pin "<name>.ref": ... no such file or directory | There is no pin yet | make <name>-update |
could not read Username or Repository not found from clone or fetch | git cannot reach the private repository | gh auth login, then gh auth setup-git |
checkout ... has local changes | Files were edited or added under .deps/<name>-pinned | Discard them, or use the *_SRC override |
commit or ref not found | The pinned commit is not in the repository, for example a squash-merged branch that was then deleted | Pin a commit on main with the update target |
go.mod declares the wrong module path | The pinned commit or override is not the expected module; for nseries, a commit before nseries #7 with an obsolete module declaration | Pin a later commit, or fix the override |
dir exists and is not a symlink | Something other than a symlink sits at .deps/<name> | Move it away; the next run recreates the link |
replacement directory ./.deps/nseries does not exist (from go, not make) | make deps has not run in this checkout | make deps |
go mod verify reports nseries ...: missing ziphash here and in marketfeed. Go cannot checksum a module that is replaced by a directory, and nothing in either Makefile runs go mod verify. The pins take the place of that check.