Skip to content

Bump sdiff-driver to 0.1.0 for version consistency (M0 re-verified by… #3

Bump sdiff-driver to 0.1.0 for version consistency (M0 re-verified by…

Bump sdiff-driver to 0.1.0 for version consistency (M0 re-verified by… #3

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
# Fast, host-buildable: the pure-Rust core + CLI on stable. No rustc_private.
core-tests:
name: cargo test (pure core + CLI)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
# Builds only the workspace members (sdiff-core, sdiff); the driver is a
# separate isolated [workspace] and is not built here.
- name: Test pure crates
run: cargo test --workspace --all-targets
# THE M0 HARD GATE. This is not a demo act — if it fails, the build is red.
# Builds the pinned-nightly container and runs the same-commit double-build
# determinism proof. A non-empty delta or any byte difference fails the job.
m0-gate:
name: M0 — byte-identical fingerprints across builds (HARD GATE)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build dev container (pinned nightly-2026-04-03)
run: docker build -t semantic-diff-dev .
- name: Run M0 double-build gate
run: |
docker run --rm -v "$PWD":/work -w /work semantic-diff-dev bash -c '
git config --global --add safe.directory "*"
bash tests/m0_double_build.sh
'
- name: Run differential test (cosmetic-robustness + negative control)
run: |
docker run --rm -v "$PWD":/work -w /work semantic-diff-dev \
bash tests/differential.sh
- name: Run test-selection test (per-test reachability)
run: |
docker run --rm -v "$PWD":/work -w /work semantic-diff-dev \
bash tests/select.sh
- name: Run cross-crate fail-loud test (workspace shards)
run: |
docker run --rm -v "$PWD":/work -w /work semantic-diff-dev \
bash tests/workspace.sh
# Scale measurement on a real, vendored, sha-pinned crate (regex-syntax).
# SOUNDNESS is asserted here (the selector must pick a superset of the
# tests that actually fail under two real edits — a false UNCHANGED fails
# the job); precision/economics are measured and printed, not asserted.
- name: Run scale measurement (regex-syntax — soundness gate + reported metrics)
run: |
docker run --rm -v "$PWD":/work -w /work semantic-diff-dev \
bash tests/scale_regex_syntax.sh