2026-05-03

Public chess evaluation caches looked like the obvious optimization. Lichess publishes hundreds of millions of Stockfish-evaluated positions. Stockpile builds a fast local, GCS, or S3-backed lookup layer over that export. If the position has already been analyzed, why run Stockfish again?

The answer is not “ignore the cache.” The answer is “do not erase the contract.”

Our production backfill contract is explicit: Stockfish 18, depth 18, MultiPV 3, with per-position time caps and reached-depth validation. The Lichess/Stockpile ecosystem is deeper on many rows, often advertised as Stockfish 16+ at depth 30+, but the data model stores depth, node count, and PV count per eval. It is not one uniform global promise.

We also hit the operational side quickly. The public Lichess cloud-eval API is a one-position lookup endpoint with rate limits. In the first sampled probes from the personal-game tail, hit rate was low and the endpoint rate-limited from our network. That makes it a poor inline dependency for a broad production prepare step unless probing is incremental, bounded, and backoff-aware.

The system shape that survived was provenance-aware read-through:

local completed queue row -> public cache lookup -> Modal miss compute

The queue keeps the requested contract separate from the result that satisfied it: source, engine version, reached depth, requested MultiPV, result MultiPV, node count, and provider metadata. A public cache hit can be better than our miss compute, but it should say what it is. A Modal result can be cheaper and reliable, but it should not masquerade as a depth-36 cache row.

There is also no obvious public API for uploading arbitrary private Modal evals into Lichess cloud-eval. The official contribution path to Lichess compute is fishnet: run a worker, accept Lichess-assigned jobs, and return those results. If we publish our own evals, the right path is a provenance-rich JSONL export or private Stockpile-compatible overlay.

Free cached compute is only free when the cache contract, latency, rate limits, and provenance fit the product path.