Skip to content

determinism

determinism #307

Workflow file for this run

# determinism.yml — nightly + contract-change PRs (plan §9).
# Gate Zero platforms first (macOS arm64 + Linux x64); Windows x64 runs a Milestone B
# preflight lane. Unresolved Windows divergence blocks or re-scopes Public Beta.
# Determinism failures are NEVER retried into green — a flaky fingerprint IS the bug.
name: determinism
on:
schedule:
- cron: "17 3 * * *" # nightly
pull_request:
types: [opened, synchronize, labeled]
workflow_dispatch:
jobs:
cross-platform:
if: >-
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'contract-change')
strategy:
fail-fast: false
matrix:
# macOS arm64 + Linux x64 are the Gate Zero platforms. Windows x64 is a
# Milestone B preflight lane and only runs PDFium-backed corpus work when
# the pinned runtime is explicitly configured on that runner.
os: [macos-14, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: rustup show
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install "jsonschema>=4.18"
# The contract vectors pin exact c14n bytes + sha256 per platform. The verifier
# suite and verify-alpha runner add cross-platform execution of the parser-neutral
# verifier, repeated report byte equality, and comparison to tracked goldens.
- run: cargo test --locked -p ethos-doc-core --all-features
- run: cargo test --locked -p ethos-verify
- name: verification report repeated-byte and golden equality
shell: bash
run: |
cargo build --locked -p ethos-cli
ethos_bin="${GITHUB_WORKSPACE}/target/debug/ethos"
if [ "${RUNNER_OS}" = "Windows" ]; then ethos_bin="${ethos_bin}.exe"; fi
python examples/verify/check_verify_alpha.py \
--repo-root "${GITHUB_WORKSPACE}" \
--ethos-bin "${ethos_bin}" \
--out-dir "${RUNNER_TEMP}/verify-alpha"
- name: configured PDFium fixture corpus and double-parse equality
shell: bash
run: |
if [ -n "${ETHOS_PDFIUM_LIBRARY_PATH:-}" ] && [ -f "${ETHOS_PDFIUM_LIBRARY_PATH:-}" ]; then
ethos_bin="${GITHUB_WORKSPACE}/target/debug/ethos"
if [ "${RUNNER_OS}" = "Windows" ]; then ethos_bin="${ethos_bin}.exe"; fi
python benchmarks/harness/run_fixtures.py \
--repo-root "${GITHUB_WORKSPACE}" \
--ethos-bin "${ethos_bin}" \
--out "${RUNNER_TEMP}/fixture-baseline.json"
cargo test --locked -p ethos-cli --test pdf_parse \
double_parse_is_byte_identical_when_pdfium_is_configured -- --exact --nocapture
else
echo "deferred: caller-provided PDFium runtime is not configured on this runner"
fi