Open Core reproducibility

Source path in repo: docs/OPEN_CORE_REPRODUCIBILITY.md. [View on GitHub]

Mirrored from the engine repository. Prefer reading here for a consistent experience; use GitHub for file history and blame.

This page defines reproducibility guarantees and operational checks for Open Core.

Reproducible output metadata

analyze() output includes metadata fields that must be preserved:

  • engineVersion
  • formulaVersion
  • riskAnalysisVersion
  • contractVersion
  • inputHash
  • configHash
  • seed
  • decimals

These fields make local and CI comparisons machine-verifiable.

Hash and canonical rules

  • Hashes are SHA-256 over canonical JSON representation.
  • Equivalent logical inputs should produce identical hashes.
  • Any canonicalization or hash-policy update requires vector metadata refresh.

Refresh command:

Conformance fixtures

v1 (engine/packages/test-vectors/v1)

  • Locks summary expectations for analyze()
  • Locks expected.metadata.inputHash and configHash

v2 (engine/packages/test-vectors/v2)

  • Golden fixtures for pure risk/benchmark/turnover functions
  • Locks expected.metadata.fixtureHash computed from fixture input shape without expected blocks

CI and release checks

Minimum release gate for Open Core changes:

  1. npm run engine:test
  2. npm run engine:conformance
  3. npm run engine:check:boundary
  4. npm run engine:check:bundle

Combined command:

When reproducibility is considered broken

  • Same input/config yields different summary or metadata hashes
  • Conformance vectors fail without intentional formula/version changes
  • Published npm bundles differ in executable behavior from validated source

Related docs

[Back to documentation index]