The Drift Log · Model independence and repeatable builds
Why Runtime Model Calls Break Deterministic Test Guarantees
4 September 2026 · 3 min read · 735 words · established

Runtime model calls introduce hardware-level non-determinism that breaks CI assertions. The hallucination surface belongs at compile time.
Your CI pipeline fails on run 412. The git commit is identical to run 411. The environment variables match. The network is mock-isolated. Yet a parser test failed because a component invoking an upstream language model received {"status": "complete"} instead of {"status": "COMPLETED"}.
Every team eventually wrestles with non-determinism. We learn early to tame the usual suspects: we freeze system clocks, replace network sockets with fixtures, and inject fixed seeds into pseudo-random number generators (a discipline covered in detail in our post on seeding clocks and entropy in production test suites).
Runtime model calls break that discipline entirely. When you invoke a generative model inside component execution logic, you surrender your ability to make deterministic assertions.
Temperature zero is not a seed
A common assumption is that setting temperature=0 transforms an inference endpoint into a pure function. It does not.
On modern inference infrastructure, several factors prevent bit-level determinism even at zero temperature:
- Floating-point non-associativity: Parallel matrix multiplications across dynamic GPU worker pools accumulate rounding differences depending on hardware architecture and thread scheduling.
- Dynamic batching: Providers continuously batch incoming requests. Because floating-point operations vary with batch size and sequence alignment, the same token prompt can yield different logit distributions across requests.
- Provider-side updates: Managed model endpoints drift. Quantisation schemes change, routing layers update, and underlying weights undergo undocumented silent patches.
When a software component depends on a runtime model invocation, the boundary between your logic and external variance collapses. You cannot seed the execution. You cannot lock the binary. You cannot guarantee that the test passing on your machine will pass in CI or produce the same execution trace in production six months from now.
The hallucination surface belongs at compile time, not runtime
There is a fundamental difference between using models to write software and using models inside software.
When an engineer or an agent uses a model to generate code during development, the resulting text is captured, compiled, and subjected to a test suite. The AI hallucination risk is contained at the authoring stage: if the model invents a syntax error or hallucinates an invalid API, the compiler or test suite rejects the code immediately. What survives into production is a static, deterministic artifact that you own completely.
When a model is called at runtime, that hallucination surface shifts into live execution.
Compile-Time Generation:
Model -> Code Artifact -> Test Suite -> Immutable Binary (Deterministic)
Runtime Invocation:
Immutable Binary -> Model -> Dynamic Response -> Unverified Logic Branch (Flaky)
If your control flow relies on a runtime model response, your test suite is caught in a trap:
- If you mock the model output: You are no longer testing the component's true behavior; you are testing your fixture against your assumptions of what the model returns.
- If you hit the live model in CI: You introduce flaky tests that fail intermittently on prompt drift and network jitter, destroying test trust.
Neither path yields deterministic software. A rigorous code certification harness cannot issue an unequivocal pass verdict on code whose execution path alters at the whim of remote inference infrastructure.
Isolation restores predictable verdicts
If a component's job is to parse unstructured input, classify data, or make routing decisions, embedding a model directly into that component's runtime loop creates an unbounded state machine.
To restore reliable test guarantees, you must isolate non-deterministic operations from core logic:
- Extract static rules: Most runtime model calls are used for tasks that could be handled by explicit state machines, parser combinators, or rule engines. If the rules are known, write them in code.
- Move inference upstream: If fuzzy reasoning is truly required, run it at ingestion time. Transform the unstructured data into a strictly validated, schema-compliant data structure before passing it to your domain logic.
- Enforce hard contract boundaries: Domain components should only ever accept typed, validated payloads. Once data enters the core execution path, every branch should be deterministic, reproducible, and verifiable without external network dependencies.
What to audit on Monday
Take one flaky test in your integration suite that touches a runtime model call or dynamic third-party inference layer.
Map every control flow branch that depends on that model's output. Identify where the model's output format is assumed rather than guaranteed by a static type or schema validator.
Then, draw a hard line: move the inference call entirely outside the execution path of the component, validate the output at the boundary, and make the component itself purely deterministic. Your test suite will stop flaking, and your execution guarantees will hold.
This post supports the longer argument in Why Model Independence Is an Engineering Posture.
Keep reading
Next in the log
- Why Model Independence Is an Engineering Posture
Replacing parsers with runtime LLM calls trades deterministic invariants for statistical tendencies. Logic must be owned at runtime.
- Eliminating Timestamp Drift in Binary Release Checksums
Use GNU tar’s deterministic flags to eliminate timestamp drift and achieve reproducible release archives across machines.
- Seeding Entropy for Stable Test Runs in CI
Capture PRNG seeds and clock offsets in CI to keep dynamic test inputs reproducible without resorting to static, bug-masking fixtures.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.