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
183 changes: 183 additions & 0 deletions .github/workflows/v5-manuscript-development-evidence-integrity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# Offline, read-only V5 development evidence integrity CI.
# No model weights, GPU, Kaggle, PHI, confirmatory/reserve access or paid APIs.
name: V5 manuscript development evidence integrity

on:
pull_request:
paths:
- ".github/workflows/v5-manuscript-development-evidence-integrity.yml"
- "scripts/v5_manuscript_development_evidence_audit.py"
- "scripts/v5_s1_statistical_review_packet.py"
- "scripts/v5_holm_family_coverage_inventory.py"
- "scripts/v5_development_evidence_writer.py"
- "tests/reliability_v5/test_development_evidence_writer.py"
- "tests/reliability_v5/test_holm_candidate_coverage_inventory.py"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_PRIMARY_NON_TARGET_CANDIDATE_COVERAGE_2026-10-11.md"
- "tests/reliability_v5/test_statistical_review_packet.py"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_S1_DESCRIPTIVE_STATISTICAL_REVIEW_PACKET_2026-10-10.md"
- "scripts/v5_s1_source_case_pairing_audit.py"
- "scripts/v5_s1_development_calculator_icc_inventory.py"
- "tests/reliability_v5/test_development_calculator_icc_inventory.py"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_S1_DEVELOPMENT_CALCULATOR_EFFECT_ICC_INVENTORY_2026-10-10.md"
- "tests/reliability_v5/test_source_case_pairing_audit.py"
- "tests/reliability_v5/test_manuscript_development_evidence_audit.py"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_MANUSCRIPT_SOURCE_EVIDENCE_AUDIT_2026-10-09.md"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_MANUSCRIPT_DEVELOPMENT_RESULTS_CROSSWALK_2026-10-09.md"
- "docs/research/paper-rebuild-v2-2026-10-02/V5_S1_KAGGLE_RUNTIME_AMENDMENT_BINDINGS_2026-10-08.json"
- "artifacts/v5/development/**"

permissions:
contents: read

concurrency:
group: v5-development-integrity-${{ github.event.pull_request.number }}
cancel-in-progress: false

jobs:
source-bound-integrity:
name: Source-bound development evidence
runs-on: ubuntu-24.04
timeout-minutes: 12

steps:
- name: Checkout exact pull-request head without persisting credentials
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2, immutable action revision
with:
persist-credentials: false
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: Verify exact-head checkout and no mutable external inputs
shell: bash
env:
EXPECTED_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
echo "QUALIFICATION_SCOPE=IMMUTABLE_DEVELOPMENT_INPUTS"
echo "MODEL_LOAD=NO"
echo "GPU=NO"
echo "CONFIRMATORY_OR_RESERVE_ACCESS=NO"
echo "PAID_API=NO"
python3 --version

- name: Compile model-free verifier and regression fixture
shell: bash
run: |
set -euo pipefail
python3 -m compileall -q \
scripts/v5_manuscript_development_evidence_audit.py \
scripts/v5_s1_statistical_review_packet.py \
scripts/v5_holm_family_coverage_inventory.py \
scripts/v5_development_evidence_writer.py \
tests/reliability_v5/test_development_evidence_writer.py \
tests/reliability_v5/test_holm_candidate_coverage_inventory.py \
tests/reliability_v5/test_statistical_review_packet.py \
scripts/v5_s1_source_case_pairing_audit.py \
scripts/v5_s1_development_calculator_icc_inventory.py \
tests/reliability_v5/test_manuscript_development_evidence_audit.py \
tests/reliability_v5/test_source_case_pairing_audit.py \
tests/reliability_v5/test_development_calculator_icc_inventory.py \
tests/reliability_v5/test_statistical_review_packet.py \
tests/reliability_v5/test_holm_candidate_coverage_inventory.py \
tests/reliability_v5/test_development_evidence_writer.py

- name: Reverify source hashes, R1 and R2 archives, and 307 frozen files
shell: bash
run: |
set -euo pipefail
python3 scripts/v5_manuscript_development_evidence_audit.py

- name: Retrieve SHA-pinned public RiskCalcs blob without credentials
shell: bash
run: |
set -euo pipefail
curl --proto '=https' --tlsv1.2 --fail --location --silent --show-error \
--retry 2 --connect-timeout 15 --max-time 120 \
--output "$RUNNER_TEMP/v5-riskcalcs-pinned.json" \
"https://raw.githubusercontent.com/ncbi-nlp/Clinical-Tool-Learning/d474a95128e128623933c9be0d389ff7d82ef782/riskqa_evaluation/tools/riskcalcs.json"
printf '%s %s\n' \
00a7a0089afffb66f2f32903bad94a5a2ea842841defb2d78e0686b0a5eb9ab9 \
"$RUNNER_TEMP/v5-riskcalcs-pinned.json" | sha256sum --check --status

- name: Install pinned model-free audit dependencies
shell: bash
run: |
set -euo pipefail
# One frozen public calculator calls np.exp; match verified macOS NumPy.
python3 -m pip install --disable-pip-version-check --no-cache-dir \
numpy==2.4.6 pytest==8.4.2

- name: Verify synthetic source-case IDs map one-to-one to tasks and both full runs
shell: bash
run: |
set -euo pipefail
python3 scripts/v5_s1_source_case_pairing_audit.py \
--riskcalcs-source "$RUNNER_TEMP/v5-riskcalcs-pinned.json"

- name: Replay original development calculator ICC without replacing evidence
shell: bash
run: |
set -euo pipefail
python3 scripts/v5_s1_development_calculator_icc_inventory.py \
--output "$RUNNER_TEMP/v5-original-icc-replay.json"
python3 - "$RUNNER_TEMP/v5-original-icc-replay.json" <<'PYCODE'
import json, math, sys
from pathlib import Path
saved = json.loads(Path('artifacts/v5/development/s1-calculator-icc-inventory-2026-10-10/development-calculator-icc.json').read_text())
replay = json.loads(Path(sys.argv[1]).read_text())
def same(a, b, label='$'):
if type(a) is dict:
assert type(b) is dict and a.keys() == b.keys(), label
for k in a: same(a[k], b[k], f'{label}.{k}')
elif type(a) is list:
assert type(b) is list and len(a) == len(b), label
for i, (x, y) in enumerate(zip(a, b)): same(x, y, f'{label}[{i}]')
elif type(a) is float:
assert type(b) is float and math.isfinite(b), label
assert math.isclose(a, b, rel_tol=1e-10, abs_tol=1e-10), label
else:
assert type(a) is type(b) and a == b, label
same(saved, replay)
assert replay['rows'] == replay['reference_sd_cells_reproduced'] == 72
assert replay['n_negative_icc'] == 12
assert replay['boundaries']['final_90_percent_power_qualified'] is False
assert replay['boundaries']['confirmatory_authorized'] is False
print('PASS_72_ORIGINAL_DEVELOPMENT_CALCULATOR_ICC_CELLS_NOT_POWER')
PYCODE

- name: Replay exact source-bound statistical review packet without modifying evidence
shell: bash
run: |
set -euo pipefail
python3 scripts/v5_s1_statistical_review_packet.py --verify \
artifacts/v5/development/s1-statistical-review-packet-2026-10-10/reviewer-packet.json
python3 scripts/v5_s1_statistical_review_packet.py --output \
"$RUNNER_TEMP/v5-statistical-review-packet-replay.json"
cmp artifacts/v5/development/s1-statistical-review-packet-2026-10-10/reviewer-packet.json \
"$RUNNER_TEMP/v5-statistical-review-packet-replay.json"

- name: Replay complete reviewer candidate coverage without claiming Holm family
shell: bash
run: |
set -euo pipefail
python3 scripts/v5_holm_family_coverage_inventory.py --verify \
artifacts/v5/development/s1-holm-coverage-2026-10-11/candidate-coverage.json
python3 scripts/v5_holm_family_coverage_inventory.py --output \
"$RUNNER_TEMP/v5-complete-candidate-coverage.json"
cmp artifacts/v5/development/s1-holm-coverage-2026-10-11/candidate-coverage.json \
"$RUNNER_TEMP/v5-complete-candidate-coverage.json"

- name: Fail-closed regression tests
shell: bash
env:
PYTHONPATH: src
run: |
set -euo pipefail
python3 -m pytest -q \
tests/reliability_v5/test_manuscript_development_evidence_audit.py \
tests/reliability_v5/test_source_case_pairing_audit.py \
tests/reliability_v5/test_development_calculator_icc_inventory.py \
tests/reliability_v5/test_statistical_review_packet.py \
tests/reliability_v5/test_holm_candidate_coverage_inventory.py \
tests/reliability_v5/test_development_evidence_writer.py
Loading
Loading