Same input, same bytes: how the engine stays deterministic
8 repositories, 3 runs each, every analysis artifact compared byte for byte. How determinism is designed in, and how it is proven on every change.
Evidence that changes between runs is not evidence. If two engineers analyze the same commit on different days, they must get the same artifacts, or every conversation about a migration turns into an argument about which run to trust.
Where nondeterminism hides
- Iteration order: filesystem listings, hash maps and object keys arrive in different orders on different machines.
- Identity: random or sequence-based IDs change every run.
- Paths: absolute paths and separators differ between Windows, macOS and Linux.
- Time: timestamps leak into output.
- Concurrency: work finishing in a different order changes what gets written first.
How it is designed out
Identifiers in the analysis artifacts are content-addressed: a file's ID is a SHA-256 digest, not a counter. Repository paths are canonicalized to POSIX form before they are hashed or compared, which the CI's Windows path smoke job exists to protect. Collections are emitted in canonical order. Run-specific facts, the project and run IDs and the generation time, are kept in the manifest only, so two runs write byte-identical fact artifacts.
"engine": { "packageVersion": "0.1.0", "commitSha": "af48a64…", "bunVersion": "bun-1.4.2" },
"artifacts": {
"project.json": { "sha256": "8228e15a6dee…", "bytes": 290 },
"files.json": { "sha256": "8a8b0cc464ec…", … }
}Sealing and reuse
Every projection is written atomically per file into a contained .discovery directory, with bounded retry for Windows file locks, and indexed by a manifest that records each artifact's SHA-256 and byte length. Symlinked roots and manifests are rejected. Before a sealed snapshot is reused, the engine re-verifies freshness against the source digest and validates schema and integrity, then consumes only the bytes it verified, so nothing can change between check and use.
The gate
| Repository | Run 1 | Run 2 | Run 3 | Artifacts |
|---|---|---|---|---|
| ms | 12/12 | |||
| cookie-parser | 12/12 | |||
| debug | 12/12 | |||
| express-session | 12/12 | |||
| legacy-exodus-core | 12/12 | |||
| express | 12/12 | |||
| LegacyExodus | 13/13 | |||
| fastify | 12/12 |
On our own demo target, commander@15.0.0, a second run returned 13 of 13 artifacts byte-identical, verified with sha256sum -c. On that rerun the engine validated and reused its sealed snapshot rather than recomputing, which is exactly the path the reuse validation above protects.