Skip to content
Draft
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
70 changes: 70 additions & 0 deletions .github/workflows/v5-development-calculator-icc-evidence.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: V5 development calculator ICC evidence
on:
pull_request:
paths:
- '.github/workflows/v5-development-calculator-icc-evidence.yml'
- 'scripts/v5_s1_development_calculator_icc_inventory.py'
- 'scripts/v5_s1_development_paired_sd_inventory.py'
- 'scripts/v5_s1_repeatability_analysis.py'
- 'tests/reliability_v5/test_development_calculator_icc_inventory.py'
- 'artifacts/v5/development/**'
- 'docs/research/paper-rebuild-v2-2026-10-02/V5_S1_DEVELOPMENT_CALCULATOR_EFFECT_ICC_INVENTORY_2026-10-10.md'
workflow_dispatch:
permissions:
contents: read
jobs:
verify-development-calculator-icc:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout unmodified PR head
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- name: Install Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Install pinned test runner
run: python -m pip install pytest==8.4.2
- name: Compile model-free source and tests
run: python -m py_compile scripts/v5_s1_development_calculator_icc_inventory.py tests/reliability_v5/test_development_calculator_icc_inventory.py
- name: Test synthetic grouping and integrity contracts
env:
PYTHONPATH: src
run: python -m pytest -q tests/reliability_v5/test_development_calculator_icc_inventory.py tests/reliability_v5/test_development_paired_sd_inventory.py
- name: Replay all original bound development matrices without overwrite
run: |
python scripts/v5_s1_development_calculator_icc_inventory.py --output "$RUNNER_TEMP/v5-calculator-icc-replayed.json"
python - "$RUNNER_TEMP/v5-calculator-icc-replayed.json" <<'PY'
import json,math,sys
from pathlib import Path
expected=json.loads(Path('artifacts/v5/development/s1-calculator-icc-inventory-2026-10-10/development-calculator-icc.json').read_text())
actual=json.loads(Path(sys.argv[1]).read_text())
assert expected.keys()==actual.keys()
assert actual["rows"]==72
assert actual["reference_sd_cells_reproduced"]==72
assert actual["boundaries"]["confirmatory_authorized"] is False
assert actual["boundaries"]["final_90_percent_power_qualified"] is False
assert expected["input_hashes"]==actual["input_hashes"]
assert expected["n_negative_icc"]==actual["n_negative_icc"]
assert expected["n_nonnegative_icc"]==actual["n_nonnegative_icc"]
for name in ("rho_min","rho_median","rho_max","reference_sd_reconstruction_max_abs_error"):
assert math.isclose(expected[name],actual[name],rel_tol=1e-10,abs_tol=1e-10)
assert len(expected["all_development_cells"])==len(actual["all_development_cells"])==72
for a,b in zip(expected["all_development_cells"],actual["all_development_cells"]):
assert a.keys()==b.keys()
for key in a:
x,y=a[key],b[key]
if isinstance(x,float) and x is not None:
assert isinstance(y,float) and math.isclose(x,y,rel_tol=1e-10,abs_tol=1e-10),(key,x,y)
else:
assert x==y,(key,x,y)
assert expected["three_seed_between_effect_spreads"]==actual["three_seed_between_effect_spreads"] or all(
(x["intervention"],x["split"],x["metric"]) == (y["intervention"],y["split"],y["metric"]) and
math.isclose(x["three_seed_sample_sd_of_overall_effects"],y["three_seed_sample_sd_of_overall_effects"],rel_tol=1e-10,abs_tol=1e-10)
for x,y in zip(expected["three_seed_between_effect_spreads"],actual["three_seed_between_effect_spreads"])
)
print("PASS_72_ORIGINAL_DEVELOPMENT_CALCULATOR_ICC_CELLS_REPLAY_NOT_SCIENTIFIC_POWER")
PY
Loading
Loading