Skip to content

Commit a8a670e

Browse files
fix(ci): make release gates honest and reproducible [bd-2mo.30]
1 parent d28a70c commit a8a670e

6 files changed

Lines changed: 72 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ env:
5050
# Path dependencies are build inputs. Keep these immutable revisions aligned
5151
# with the package versions recorded in Cargo.lock; update them deliberately
5252
# and together, never by floating each job on sibling `main`.
53-
FRANKENTORCH_REV: f00c3ce79737ffd0e7c7e2f2e81540907ce26562
54-
FRANKENSQLITE_REV: 14c5781680833c248ed18d84914312e233d145df
53+
FRANKENTORCH_REV: 062cf3671c194f6ab184da98f0559ebc76cff7c7
54+
FRANKENSQLITE_REV: cd9990bb16291d8c7c247b75b47faae8d7701adb
5555
ASUPERSYNC_REV: 53aa5c72f855352148c3a88e6961f7f09adb535c
5656
# Surface full backtraces if a test panics, so failures are self-diagnosing.
5757
RUST_BACKTRACE: 1
@@ -149,7 +149,10 @@ jobs:
149149
# The full stdout/stderr is captured and uploaded as a CI artifact (the
150150
# evidence-graph capture, bd-4yks item 10) even when the gate fails.
151151
- name: Run the gate (scripts/check.sh)
152-
run: ./scripts/check.sh 2>&1 | tee gate-log-${{ matrix.os }}.txt
152+
shell: bash
153+
run: |
154+
set -o pipefail
155+
./scripts/check.sh 2>&1 | tee gate-log-${{ matrix.os }}.txt
153156
154157
- name: Bind successful gate evidence
155158
run: |
@@ -197,9 +200,9 @@ jobs:
197200
python3 scripts/bench_guardrail.py || echo "guardrail reported (advisory; non-blocking)"
198201
199202
advisory-targets:
200-
name: advisory target (${{ matrix.name }})
203+
name: target (${{ matrix.name }})
201204
runs-on: ${{ matrix.os }}
202-
continue-on-error: true
205+
continue-on-error: false
203206
strategy:
204207
fail-fast: false
205208
matrix:
@@ -236,7 +239,7 @@ jobs:
236239
skip_reason: ""
237240
# arm64 Windows checks natively on the hosted windows-11-arm runner.
238241
# The binary build/no-weights smoke passed in dist run 29048523156;
239-
# this remains advisory until full model OCR is proven on that host.
242+
# Full model OCR remains covered by the separate weighted parity gate.
240243
- name: windows-msvc-aarch64
241244
os: windows-11-arm
242245
target: aarch64-pc-windows-msvc
@@ -248,11 +251,11 @@ jobs:
248251
- name: Checkout
249252
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
250253

251-
- name: Explain advisory skip
254+
- name: Explain target skip
252255
if: ${{ matrix.skip }}
253256
shell: bash
254257
run: |
255-
echo "Advisory target '${{ matrix.name }}' is not built in Phase 0:"
258+
echo "Target '${{ matrix.name }}' is not built in Phase 0:"
256259
echo "${{ matrix.skip_reason }}"
257260
258261
- name: Provision sibling path dependencies
@@ -310,7 +313,7 @@ jobs:
310313
if: ${{ !matrix.skip }}
311314
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
312315
with:
313-
key: advisory-${{ matrix.name }}-${{ matrix.target }}
316+
key: target-${{ matrix.name }}-${{ matrix.target }}
314317
cache-all-crates: true
315318

316319
- name: Cargo check target

.github/workflows/dist.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ env:
6060
RUST_TOOLCHAIN: nightly-2026-07-09
6161
# The sibling path dependencies are part of the release input. Keep these
6262
# immutable revisions aligned with the package versions in Cargo.lock.
63-
FRANKENTORCH_REV: f00c3ce79737ffd0e7c7e2f2e81540907ce26562
64-
FRANKENSQLITE_REV: 14c5781680833c248ed18d84914312e233d145df
63+
FRANKENTORCH_REV: 062cf3671c194f6ab184da98f0559ebc76cff7c7
64+
FRANKENSQLITE_REV: cd9990bb16291d8c7c247b75b47faae8d7701adb
6565
ASUPERSYNC_REV: 53aa5c72f855352148c3a88e6961f7f09adb535c
6666

6767
jobs:

.github/workflows/model-parity.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ permissions:
1818
env:
1919
CARGO_TERM_COLOR: always
2020
RUST_TOOLCHAIN: nightly-2026-07-09
21-
FRANKENTORCH_REV: f00c3ce79737ffd0e7c7e2f2e81540907ce26562
22-
FRANKENSQLITE_REV: 14c5781680833c248ed18d84914312e233d145df
21+
FRANKENTORCH_REV: 062cf3671c194f6ab184da98f0559ebc76cff7c7
22+
FRANKENSQLITE_REV: cd9990bb16291d8c7c247b75b47faae8d7701adb
2323
ASUPERSYNC_REV: 53aa5c72f855352148c3a88e6961f7f09adb535c
2424

2525
jobs:
@@ -60,6 +60,15 @@ jobs:
6060
git -C "$destination" remote add origin "https://github.com/Dicklesworthstone/$repo.git"
6161
git -C "$destination" fetch --quiet --depth 1 origin "$revision"
6262
git -C "$destination" checkout --quiet --detach FETCH_HEAD
63+
else
64+
[[ -z "$(git -C "$destination" status --porcelain=v1 --untracked-files=all)" ]] || {
65+
echo "$repo checkout is dirty: $destination" >&2
66+
exit 1
67+
}
68+
if [[ "$(git -C "$destination" rev-parse HEAD)" != "$revision" ]]; then
69+
git -C "$destination" fetch --quiet --depth 1 origin "$revision"
70+
git -C "$destination" checkout --quiet --detach FETCH_HEAD
71+
fi
6372
fi
6473
actual=$(git -C "$destination" rev-parse HEAD)
6574
[[ "$actual" == "$revision" ]] || {

.github/workflows/performance-gauntlet.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ permissions:
3030
env:
3131
CARGO_TERM_COLOR: always
3232
RUST_TOOLCHAIN: nightly-2026-07-09
33-
FRANKENTORCH_REV: f00c3ce79737ffd0e7c7e2f2e81540907ce26562
34-
FRANKENSQLITE_REV: 14c5781680833c248ed18d84914312e233d145df
33+
FRANKENTORCH_REV: 062cf3671c194f6ab184da98f0559ebc76cff7c7
34+
FRANKENSQLITE_REV: cd9990bb16291d8c7c247b75b47faae8d7701adb
3535
ASUPERSYNC_REV: 53aa5c72f855352148c3a88e6961f7f09adb535c
3636

3737
jobs:
@@ -72,6 +72,15 @@ jobs:
7272
git -C "$destination" remote add origin "https://github.com/Dicklesworthstone/$repo.git"
7373
git -C "$destination" fetch --quiet --depth 1 origin "$revision"
7474
git -C "$destination" checkout --quiet --detach FETCH_HEAD
75+
else
76+
[[ -z "$(git -C "$destination" status --porcelain=v1 --untracked-files=all)" ]] || {
77+
echo "$repo checkout is dirty: $destination" >&2
78+
exit 1
79+
}
80+
if [[ "$(git -C "$destination" rev-parse HEAD)" != "$revision" ]]; then
81+
git -C "$destination" fetch --quiet --depth 1 origin "$revision"
82+
git -C "$destination" checkout --quiet --detach FETCH_HEAD
83+
fi
7584
fi
7685
actual=$(git -C "$destination" rev-parse HEAD)
7786
[[ "$actual" == "$revision" ]] || {

scripts/gauntlet_cert.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7152,6 +7152,7 @@ def _bound_source_pack_artifacts(
71527152
root: Path, bundle_dir: Path, entries: dict[str, dict]
71537153
) -> set[str]:
71547154
"""Return only source packs named by canonical colocated PERF row bindings."""
7155+
bundle_dir = bundle_dir.resolve()
71557156
bound: set[str] = set()
71567157
for relative, entry in entries.items():
71577158
if "error" in entry or Path(relative).name != "row.json":
@@ -7220,6 +7221,7 @@ def _snapshot_bundle_artifacts(
72207221
max_bundle_bytes: int = CERTIFICATION_MAX_BUNDLE_BYTES,
72217222
) -> tuple[list[str], float, int, set[str]]:
72227223
"""Verify artifacts and materialize an immutable replay snapshot."""
7224+
bundle_dir = bundle_dir.resolve()
72237225
reasons: list[str] = []
72247226
max_age = 0.0
72257227
total_artifact_bytes = 0
@@ -13204,9 +13206,21 @@ def write_large_row_binding(pack_sha256: str, pack_size: int) -> None:
1320413206
snapshotted_large_pack = (
1320513207
Path(large_snapshot_tmp) / large_pack_relative
1320613208
)
13207-
snapshotted_identity = _stream_file_identity(
13208-
snapshotted_large_pack, PERF_MAX_SOURCE_PACK_BYTES
13209-
)
13209+
snapshotted_identity: dict | None = None
13210+
if not large_snapshot_reasons:
13211+
if snapshotted_large_pack.is_file():
13212+
try:
13213+
snapshotted_identity = _stream_file_identity(
13214+
snapshotted_large_pack, PERF_MAX_SOURCE_PACK_BYTES
13215+
)
13216+
except (OSError, ValueError) as error:
13217+
large_snapshot_reasons.append(
13218+
f"large source-pack snapshot is unreadable: {error}"
13219+
)
13220+
else:
13221+
large_snapshot_reasons.append(
13222+
"large source-pack snapshot is missing"
13223+
)
1321013224
check(
1321113225
"bundle-large-bound-source-pack-streams-through-manifest-and-snapshot",
1321213226
not large_stale
@@ -13215,6 +13229,7 @@ def write_large_row_binding(pack_sha256: str, pack_size: int) -> None:
1321513229
and not large_snapshot_reasons
1321613230
and large_streamed_paths == {large_pack_relative}
1321713231
and large_snapshot_total > CERTIFICATION_MAX_ARTIFACT_BYTES
13232+
and snapshotted_identity is not None
1321813233
and snapshotted_identity["sha256"]
1321913234
== large_entries[large_pack_relative]["sha256"]
1322013235
and snapshotted_identity["size"] == large_pack_size,

tests/installer_e2e.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,27 @@ fi
350350
rm -rf "$atomic_work"
351351

352352
if command -v pwsh >/dev/null 2>&1; then
353-
if pwsh -NoLogo -NoProfile -NonInteractive \
354-
-Command '$null = [scriptblock]::Create((Get-Content -Raw -LiteralPath $args[0]))' \
355-
"$INSTALL_PS1" >/dev/null 2>&1; then
353+
if powershell_parse_output="$(
354+
# shellcheck disable=SC2016
355+
INSTALL_PS1="$INSTALL_PS1" pwsh -NoLogo -NoProfile -NonInteractive -Command '
356+
$ErrorActionPreference = "Stop"
357+
$tokens = $null
358+
$errors = $null
359+
[void][System.Management.Automation.Language.Parser]::ParseFile(
360+
$env:INSTALL_PS1,
361+
[ref]$tokens,
362+
[ref]$errors
363+
)
364+
if ($errors.Count -gt 0) {
365+
$errors | ForEach-Object { [Console]::Error.WriteLine($_.ToString()) }
366+
exit 1
367+
}
368+
' 2>&1
369+
)"; then
356370
pass "PowerShell installer parses"
357371
else
358372
bad "PowerShell installer has a parse error"
373+
printf '%s\n' "$powershell_parse_output" >&2
359374
fi
360375
else
361376
skip "pwsh not installed — PowerShell parse check not exercised"

0 commit comments

Comments
 (0)