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
104 changes: 96 additions & 8 deletions .github/workflows/_build-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@
# Stage 2 (build): one leg per (python x arch) of this platform:
# tools/build_runtime -> ci/check_symbol_provenance.sh ->
# tools/boot_smoke -> the runtime-packages-<os>-<arch>-<python>
# artifact. The build scripts fetch and sha256-verify every input
# artifact. The boot smoke's compute-floor gate is runner-class-relative
# (tebako#1095's follow-up): a sibling step pair first provisions the
# on-system reference python (setup-python at the leg's base version)
# and times tools/compute_reference_probe.py on THIS runner — the
# per-call-rate ratio's denominator. The build scripts fetch and
# sha256-verify every input
# themselves (the pinned source tarball, the pinned link unit, the tfs
# CLI) — there is NO source-build path for the driver stack here
# (contract.yml's link_unit_release comment), so the ruby factory's
Expand Down Expand Up @@ -685,16 +690,89 @@ jobs:
ci/check_symbol_provenance.sh --exe \
"runtime-packages/tebako-runtime-${{ needs.compute.outputs.tebako_version }}-${{ needs.compute.outputs.lang_infix }}${{ matrix.python }}-${{ matrix.host_id }}.exe"

# --- the compute-floor ratio gate's on-system reference ---------
# The boot smoke's compute-floor tripwire is runner-class-relative
# (tools/boot_smoke's header — tebako#1095's closing verdict
# falsified the fleet-calibrated absolute ceiling: python.org's own
# build reads 4.26-6.66 s fib(35) on the current macos-15-intel
# class, where the tebako pair reads 4.270 s against the
# reference's 4.258 s — parity ≈1.00): each leg gates its fib(35)
# best-of-3 as a per-call-rate ratio against an on-system reference
# measured HERE, on the leg's own runner — setup-python at the
# leg's base version (the covenant's on-system provisioner; a jit
# leg's reference is the plain interpreter — the flavor is a build
# flag) timing tools/compute_reference_probe.py (fib(30), the
# MEDIAN of 25 runs — at ~0.1 s a run, a best-of-3 min samples the
# runner's instantaneous state instead of its sustained rate; the
# first full-matrix run false-red two healthy macos-arm64 legs on
# exactly that class, run 45344792366). The container legs measure
# on the ubuntu host — the container shares the host's silicon. A
# loudly skipped windows leg (the rc-107 carve-out above) measures
# nothing.
- name: Provision the on-system reference python (the compute-floor ratio gate)
if: ${{ matrix.os != 'windows' || steps.build-windows.outputs.skipped != 'true' }}
id: refpy
# The manifest can lag the factory's exact micro pins (3.11.16 /
# 3.12.14 are not carried — run 45344792366): the LINE step below
# is the loud fallback, never a silent skip.
continue-on-error: true
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 (the covenant's pin — the same provisioner, tebako#1095's reference arm)
with:
python-version: ${{ matrix.reference_python }}

- name: Provision the reference at the line (the manifest lacks the micro)
if: ${{ (matrix.os != 'windows' || steps.build-windows.outputs.skipped != 'true') && steps.refpy.outcome == 'failure' }}
id: refpyline
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.reference_line }}

- name: Measure the on-system compute reference (fib(30) median-of-25)
if: ${{ matrix.os != 'windows' || steps.build-windows.outputs.skipped != 'true' }}
id: computeref
shell: bash
run: |
set -euo pipefail
py=python3
command -v python3 >/dev/null 2>&1 || py=python
if [ "${{ steps.refpy.outcome }}" = "failure" ]; then
echo "::notice title=compute-floor reference::setup-python carries no ${{ matrix.reference_python }} — the reference rides the ${{ matrix.reference_line }} line's latest micro (the same interpreter generation)"
fi
# The generation assertion: whatever the provisioning resolved,
# the reference must be the SAME major.minor the leg builds —
# anything else is a wiring bug, named, never a quiet ratio.
got=$("$py" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
if [ "$got" != "${{ matrix.reference_line }}" ]; then
echo "::error::the reference python is the $got line, expected ${{ matrix.reference_line }} — the provisioning steps resolved the wrong interpreter generation"
exit 1
fi
probe_out=$("$py" tools/compute_reference_probe.py)
echo "$probe_out"
median=$(awk '/^median: /{print $2}' <<< "$probe_out")
n=$(awk '/^n: /{print $2}' <<< "$probe_out")
if [ -z "$median" ] || [ -z "$n" ]; then
echo "::error::the reference probe emitted no median:/n: lines — the ratio gate has no denominator"
exit 1
fi
echo "ref_seconds=$median" >> "$GITHUB_OUTPUT"
echo "ref_n=$n" >> "$GITHUB_OUTPUT"

# The boot smoke self-selects the scenario set per platform (the
# POSIX set vs the windows bare + named-error trio) and resolves the
# exe from TEBAKO_RUNTIME_ROOT. TEBAKO_TFS names the tfs CLI the
# build fetched (the fixture-image scenarios pack with it) — inside
# the container legs it is the musl/gnu binary matching the image.
# COMPUTE_FLOOR_REFERENCE_SECONDS/N are the sibling step's same-leg
# on-system measurement (the ratio gate's denominator — above).
- name: Boot smoke (container legs)
if: matrix.container != null
env:
COMPUTE_FLOOR_REFERENCE_SECONDS: ${{ steps.computeref.outputs.ref_seconds }}
COMPUTE_FLOOR_REFERENCE_N: ${{ steps.computeref.outputs.ref_n }}
run: |
set -euo pipefail
docker run --rm -v "${{ github.workspace }}:/mnt/w" -w /mnt/w \
-e COMPUTE_FLOOR_REFERENCE_SECONDS -e COMPUTE_FLOOR_REFERENCE_N \
"${{ matrix.container }}" bash -c '
set -e
export TEBAKO_RUNTIME_ROOT=runtime-packages
Expand All @@ -706,14 +784,21 @@ jobs:
if: matrix.os == 'macos'
env:
TEBAKO_RUNTIME_ROOT: runtime-packages
# The compute-floor carve-out (tebako-runtime-python#79): the
# x86_64 legs carry the LIVE ~3x slow-compute defect on real
# Intel silicon (fib(35) 4.0-5.7 s vs the healthy 1.1-1.5 s,
# run 44910482094) whose root cause is the product repo's
# (tebako#1095) — warn-only there so the factory stays green
# while the fix ships; every other leg keeps the fail-closed
# The ratio gate's denominator: the sibling step's same-leg
# on-system measurement (above).
COMPUTE_FLOOR_REFERENCE_SECONDS: ${{ steps.computeref.outputs.ref_seconds }}
COMPUTE_FLOOR_REFERENCE_N: ${{ steps.computeref.outputs.ref_n }}
# The compute-floor warn tier (tebako-runtime-python#79): the
# macos-x86_64 legs ride warn-only as insurance while the
# runner-class-relative ratio gate proves itself — this is the
# fleet class whose move falsified the old absolute ceiling
# (tebako#1095's verdict: parity ≈1.00 against the same-leg
# on-system reference). Every other leg keeps the fail-closed
# default (tools/boot_smoke's COMPUTE_FLOOR_MODE contract).
# REMOVAL CONDITION: delete this line when tebako#1095 closes.
# REMOVAL CONDITION: revert the x86_64 legs to fail-closed
# (delete this line) once the ratio gate reads green on two
# consecutive runs on the current fleet — the gate's own
# per-call-ratio log lines are the evidence.
COMPUTE_FLOOR_MODE: ${{ matrix.arch == 'x86_64' && 'warn' || 'fail' }}
run: |
set -euo pipefail
Expand All @@ -726,6 +811,9 @@ jobs:
shell: msys2 {0}
env:
TEBAKO_RUNTIME_ROOT: runtime-packages
# The ratio gate's denominator (the sibling step, above).
COMPUTE_FLOOR_REFERENCE_SECONDS: ${{ steps.computeref.outputs.ref_seconds }}
COMPUTE_FLOOR_REFERENCE_N: ${{ steps.computeref.outputs.ref_n }}
run: |
set -euo pipefail
TEBAKO_TFS=$(echo .build/downloads/tfs/*/tfs-*)
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,16 @@ platform ships).
reports the JIT capability under `PYTHON_JIT=1`, a plain line reports
its absence), the `compute-floor` tripwire (a slow BUILD ships green
under a boot-only gate — tebako-runtime-python#79; the leg times a
fixed pure-compute loop inside the interpreter and fails past a
generous ceiling — fail-closed everywhere except the macos-x86_64
legs, which ride warn-only via `COMPUTE_FLOOR_MODE=warn` while the
live defect's root cause ships in the product repo, tebako#1095, and
revert to fail-closed once it closes), and on windows the
fixed pure-compute loop inside the interpreter and gates it as a
per-call-rate ratio (≤1.5x) against a same-leg on-system reference —
the workflow's sibling step provisions setup-python at the leg's base
version and times `tools/compute_reference_probe.py` (fib(30), the
median of 25 runs) on the same runner; tebako#1095's verdict falsified the
old absolute ceiling, which no x86_64 CPython meets on the current
macos-15-intel class — fail-closed everywhere except the macos-x86_64
legs, which ride warn-only via `COMPUTE_FLOOR_MODE=warn` as insurance
while the ratio gate proves itself, reverting to fail-closed after
two consecutive green runs on the current fleet), and on windows the
`alias-closure` self-containment
proof (static-import-only pair, the image's declared PE closure, and
every boot under a PATH scrubbed to the Windows system directories)
Expand Down
11 changes: 11 additions & 0 deletions contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ macos_deployment_target: "14.0"
# GCC's 4-byte padding no longer ships a pre-rename aws-lc export
# directive into the windows leg's link (this repo's #53). Contract
# unchanged (2).
# KNOWN-BAD (fleet, tebako#1095's side finding): the published v0.3.0
# pair — this factory's 0.3.0 runtime, link unit v2.8.49 — reproducibly
# WEDGES on the current macos-15-intel fleet, never reaching the
# interpreter (3/3 reproductions: a >=40-minute hang in run 45324096740,
# hard-killed at the 420 s bound in runs 45330380303/45338794570). The
# v0.2.0 (v2.3.2) and v0.3.5 (v2.8.78) pairs boot unaffected on the same
# runners, so the line the factory builds today is clear; the note
# stands for old-line consumers — published pairs stay installable
# forever (spec 05 §2's era law), and a catalog/mop-up rerun of the
# v0.3.0 line would relink the same wedging unit. Old-line consumers on
# that fleet resolve v0.3.5+.
# v2.8.53: the lazy mount at both TFS layers (tebako#848) — the preload
# shim's TEBAKO_TFS_MOUNTS builder state-detects a LAZY_SEEDING env image
# and mounts its caching range source, so a fresh lazy line serves the
Expand Down
17 changes: 17 additions & 0 deletions scripts/compute_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@
# the build re-verifies it against the
# extracted source's Tools/jit/_llvm.py
# (the parity arm — PythonBuild's gate)
# reference_python — the on-system reference interpreter's
# version for the compute-floor ratio
# gate's sibling step (the line's
# base_version — a jit leg's reference is
# the PLAIN interpreter of the same
# version; the flavor is a build flag).
# PythonVersion owns the -jit grammar, so
# this flow replaces any workflow-side
# suffix strip (ecosystem SSOT invariant).
# reference_line — the reference's major.minor line
# ("3.14"): the provisioning fallback
# when setup-python's manifest carries no
# exact micro (it lags the factory's pins
# on the older lines), and the measure
# step's generation assertion.
# container — the tpkg-builder image ref with
# contract.yml's container_version tag
# applied, null for the runner-native legs
Expand Down Expand Up @@ -306,6 +321,8 @@ def usage_error(message)
# platform is the runner's, never the artifact's.
sign_tool_host_id: (os == "linux-musl" ? "linux-gnu-#{arch}" : host_id),
jit_llvm: line.jit? ? line.jit_llvm_major.to_s : "",
reference_python: line.base_version,
reference_line: line.major_minor.join("."),
container: container,
link_unit_pid: LINK_UNIT_PID.fetch([os, arch])
}
Expand Down
Loading
Loading