Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Freshdata automation

on:
pull_request:
# pull_request: disabled in favor of ci-verification-gates.yml
workflow_dispatch:

concurrency:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ name: Benchmark
on:
push:
branches: [main]
pull_request:
paths:
- "benchmarks/**"
- "src/freshdata/**"
- ".github/workflows/benchmark.yml"
# pull_request: disabled in favor of ci-verification-gates.yml
schedule:
- cron: "0 6 * * 1" # weekly, Monday 06:00 UTC
workflow_dispatch:
Expand Down
224 changes: 224 additions & 0 deletions .github/workflows/ci-verification-gates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# .github/workflows/ci-verification-gates.yml
name: CI Verification Gates

on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"

defaults:
run:
shell: bash

jobs:
guard-no-cov-bypass:
name: Guard Against Coverage Bypasses
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Reject any --no-cov usage in repository scripts or configs
run: |
if grep -rn -- "--no-cov" pyproject.toml setup.cfg pytest.ini Makefile scripts/ tests/ 2>/dev/null; then
echo "ERROR: '--no-cov' bypass detected. All test gates must enforce branch coverage."
exit 1
fi
echo "PASS: Zero '--no-cov' bypasses found."

unit-and-engine-parity:
name: Cross-Engine Parity & Branch Coverage (Py ${{ matrix.python-version }} / ${{ matrix.os }})
needs: guard-no-cov-bypass
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.12"

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install package and verification dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install \
"pytest>=8.0" \
"pytest-cov>=5.0" \
"hypothesis>=6.100" \
"polars>=1.0" \
"duckdb>=1.0" \
"pyarrow>=15.0" \
"scikit-learn>=1.4" \
"psutil>=5.9"

- name: Run unit, cross-engine schema, hostile object, streaming, and README claim gates
run: |
pytest \
tests/test_engine_extension_dtypes.py \
tests/test_degenerate_frames_and_indices.py \
tests/test_hostile_object_columns.py \
tests/test_polars_streaming_telemetry.py \
tests/test_readme_executable.py \
--cov=freshdata \
--cov-branch \
--cov-report=term-missing \
--cov-report=xml:coverage.xml \
--cov-fail-under=90 \
-v

- name: Upload coverage report artifact
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: coverage-xml-py312
path: coverage.xml
retention-days: 14

property-invariants:
name: Hypothesis Property Invariants (100+ Examples)
needs: unit-and-engine-parity
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pytest pytest-cov hypothesis polars duckdb pyarrow scikit-learn

- name: Execute 5-invariant property suite with branch coverage
run: |
pytest tests/test_property_invariants.py \
--hypothesis-show-statistics \
--cov=freshdata \
--cov-branch \
--cov-report=term-missing \
--cov-fail-under=40 \
-v

clean-room-artifact-audit:
name: Clean-Room Wheel & Sdist Audit (/tmp Isolated Venv)
needs: guard-no-cov-bypass
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install build and packaging audit tools
run: |
python -m pip install --upgrade pip build twine wheel
python -m pip install polars duckdb pyarrow scikit-learn

- name: Execute clean-room build and isolated /tmp smoke audit
run: |
python scripts/audit_artifacts.py
python -m twine check --strict dist/*

- name: Upload built distributions
uses: actions/upload-artifact@v4
with:
name: dist-artifacts
path: dist/
retention-days: 14

mutation-audit:
name: AST Mutation Kill-Rate Audit
needs: unit-and-engine-parity
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pytest pytest-cov hypothesis polars duckdb pyarrow scikit-learn

- name: Run AST mutation harness
run: |
python scripts/run_mutmut_audit.py

benchmarks-and-scale-profile:
name: Ground-Truth Repair F1 & Scale Memory Profile
needs: [unit-and-engine-parity, property-invariants]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install benchmark dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install polars duckdb pyarrow scikit-learn psutil

- name: Run ground-truth cell repair & downstream ML benchmark
run: |
mkdir -p artifacts
python benchmarks/run_ground_truth_bench.py | tee artifacts/ground_truth_bench.txt

- name: Run scale latency and peak memory profiler
run: |
python benchmarks/run_scale_profile.py | tee artifacts/scale_profile.txt

- name: Upload benchmark telemetry artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-telemetry
path: artifacts/
retention-days: 30
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches: [main]
pull_request:
# pull_request: disabled in favor of ci-verification-gates.yml
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/gauntlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
name: Validation Gauntlet

on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
# pull_request: disabled in favor of ci-verification-gates.yml
workflow_dispatch:
inputs:
rows:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ on:
- "src/freshdata/**"
- "pyproject.toml"
- ".github/workflows/notebooks.yml"
pull_request:
paths:
- "notebooks/**"
- "src/freshdata/**"
- "pyproject.toml"
- ".github/workflows/notebooks.yml"
# pull_request: disabled in favor of ci-verification-gates.yml
workflow_dispatch:

# Cancel superseded runs only for pull requests; runs on main are grouped per
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/perf-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ on:
schedule:
- cron: "0 5 * * *"
- cron: "30 5 * * 1"
pull_request:
paths:
- "src/freshdata/**"
- "benchmarks/cleanbench/**"
- ".github/workflows/perf-regression.yml"
# pull_request: disabled in favor of ci-verification-gates.yml
workflow_dispatch:
inputs:
base_ref:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugin-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Plugin contract tests
# safety, risk ceiling, network-off-by-default, failure isolation), the
# fd.testing contract helpers, and the shipped examples/plugins/* stay valid.
on:
pull_request:
# pull_request: disabled in favor of ci-verification-gates.yml
push:
branches: [main]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reproducibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Reproducibility gate
# NOT re-run the full benchmark suite — that is benchmark.yml / cleanbench-full.yml
# on a nightly/release-candidate cadence.
on:
pull_request:
# pull_request: disabled in favor of ci-verification-gates.yml
push:
branches: [main]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Wheel size and content guard
# Fails when model weights (or anything from training/) sneak into the wheel,
# or the wheel grows past the configured threshold.
on:
pull_request:
# pull_request: disabled in favor of ci-verification-gates.yml
push:
branches: [main]

Expand Down
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include README.md
include LICENSE
include pyproject.toml
recursive-include src/freshdata *.py py.typed
recursive-include crates/freshcore Cargo.toml Cargo.lock *.rs
prune tests
prune benchmarks
prune scripts
Loading
Loading