Skip to content

Commit 50a6f20

Browse files
committed
Run frozen Checkpoint 3 qualification finalizer
1 parent 7874f64 commit 50a6f20

1 file changed

Lines changed: 139 additions & 0 deletions

File tree

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Checkpoint 3 finalize qualification now
2+
3+
on:
4+
push:
5+
branches: [triskelion-runtime-cp1]
6+
paths:
7+
- .github/workflows/checkpoint3-finalize-now.yml
8+
9+
permissions:
10+
contents: read
11+
actions: read
12+
13+
jobs:
14+
finalize:
15+
runs-on: ubuntu-22.04
16+
timeout-minutes: 25
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11'
22+
23+
- name: Download completed non-pandas shards
24+
uses: actions/download-artifact@v4
25+
with:
26+
pattern: checkpoint3-qualification-*
27+
path: sources/main-shards
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
repository: ${{ github.repository }}
30+
run-id: '31854063331'
31+
32+
- name: Download reduced pandas rescue evidence
33+
uses: actions/download-artifact@v4
34+
with:
35+
name: checkpoint3-qualification-pandas-rescue
36+
path: sources/pandas
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
repository: ${{ github.repository }}
39+
run-id: '31869397156'
40+
41+
- name: Download Python 3.6 recovery shards
42+
uses: actions/download-artifact@v4
43+
with:
44+
pattern: checkpoint3-python36-*
45+
path: sources/python36
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
repository: ${{ github.repository }}
48+
run-id: '31853292021'
49+
50+
- name: Merge qualification evidence in frozen project order
51+
run: |
52+
set -euo pipefail
53+
args=()
54+
for d in sources/main-shards/checkpoint3-qualification-*; do
55+
[ -d "$d" ] || continue
56+
base="$(basename "$d")"
57+
case "$base" in
58+
checkpoint3-qualification-pandas|checkpoint3-qualification-ansible|checkpoint3-qualification-cookiecutter|checkpoint3-qualification-tqdm|checkpoint3-qualification-all)
59+
continue
60+
;;
61+
esac
62+
[ -f "$d/QUALIFIED_CORPUS.json" ] && args+=(--source "$d")
63+
done
64+
args+=(--source sources/pandas)
65+
for d in sources/python36/checkpoint3-python36-*; do
66+
[ -f "$d/QUALIFIED_CORPUS.json" ] && args+=(--source "$d")
67+
done
68+
echo "qualification source count=$(( ${#args[@]} / 2 ))"
69+
python triskelion_runtime/checkpoint3_merge_qualification.py \
70+
"${args[@]}" \
71+
--out finalized/checkpoint3-qualification-final
72+
73+
- name: Require evidence for all frozen projects
74+
run: |
75+
python - <<'PY'
76+
import json
77+
from pathlib import Path
78+
data = json.loads(Path('finalized/checkpoint3-qualification-final/QUALIFIED_CORPUS.json').read_text())
79+
if data['frozen_project_count'] != 17:
80+
raise SystemExit(f"unexpected frozen project count: {data['frozen_project_count']}")
81+
if data['projects_with_evidence'] != 17 or data['projects_missing_evidence']:
82+
raise SystemExit(f"qualification evidence incomplete: {data['projects_with_evidence']}/17; missing={data['projects_missing_evidence']}")
83+
print(json.dumps({k:data[k] for k in ['frozen_project_count','projects_with_evidence','qualified_projects','attempt_count','infrastructure_negatives','harness_revisions']}, indent=2, sort_keys=True))
84+
PY
85+
86+
- name: Extract allowed protected regression tests only
87+
run: |
88+
python triskelion_runtime/checkpoint3_protected_tests.py \
89+
--qualification finalized/checkpoint3-qualification-final/QUALIFIED_CORPUS.json \
90+
--out finalized/protected-tests
91+
92+
- name: Freeze sanitized causal corpus
93+
run: |
94+
python triskelion_runtime/checkpoint3_freeze_causal_corpus.py \
95+
--qualification finalized/checkpoint3-qualification-final/QUALIFIED_CORPUS.json \
96+
--out finalized/causal/CHECKPOINT3_CAUSAL_CORPUS_V1.json
97+
98+
- name: Validate protected gold boundary
99+
run: |
100+
python - <<'PY'
101+
import json
102+
from pathlib import Path
103+
from triskelion_runtime.checkpoint3_freeze_causal_corpus import PROTECTED_FORBIDDEN_FIELDS
104+
causal = json.loads(Path('finalized/causal/CHECKPOINT3_CAUSAL_CORPUS_V1.json').read_text())
105+
tests = json.loads(Path('finalized/protected-tests/MANIFEST.json').read_text())
106+
for case in causal['protected']:
107+
leaked = PROTECTED_FORBIDDEN_FIELDS.intersection(case)
108+
if leaked:
109+
raise SystemExit(f"protected leakage: {sorted(leaked)}")
110+
if tests['protected_case_count'] != causal['protected_count']:
111+
raise SystemExit('protected test bundle/corpus count mismatch')
112+
if tests['fixed_production_source_materialized'] or tests['gold_patch_materialized']:
113+
raise SystemExit('protected test bundle crossed gold boundary')
114+
print(json.dumps({
115+
'qualified_project_count': causal['qualified_project_count'],
116+
'acquisition_count': causal['acquisition_count'],
117+
'protected_count': causal['protected_count'],
118+
'causal_protocol_sha256': causal['causal_protocol_sha256'],
119+
'protected_test_bundle_count': tests['protected_case_count'],
120+
}, indent=2, sort_keys=True))
121+
PY
122+
123+
- uses: actions/upload-artifact@v4
124+
with:
125+
name: checkpoint3-qualification-final
126+
path: finalized/checkpoint3-qualification-final
127+
retention-days: 90
128+
129+
- uses: actions/upload-artifact@v4
130+
with:
131+
name: checkpoint3-causal-corpus-v1
132+
path: finalized/causal/CHECKPOINT3_CAUSAL_CORPUS_V1.json
133+
retention-days: 90
134+
135+
- uses: actions/upload-artifact@v4
136+
with:
137+
name: checkpoint3-protected-tests-v1
138+
path: finalized/protected-tests
139+
retention-days: 90

0 commit comments

Comments
 (0)