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
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ permissions:
contents: write
id-token: write
attestations: write
# Read main's CI run on the tagged commit for the North Star O3 input.
actions: read

jobs:

Expand Down Expand Up @@ -379,6 +381,54 @@ jobs:
cp "${files[0]}" release-assets/
echo "::notice::staged $(basename "${files[0]}")"

# FEAT-105 (pulseengine.eu#393): the North Star O3 input, staged before
# SHA256SUMS.txt so the signed manifest (and the FEAT-109 check below)
# covers it. The facts come from what was measured: the required-check
# contexts from the branch rules API now, and the "Rocq Formal Proofs"
# job of main's CI run on the tagged commit, whose log carries the kernel
# audit, the ledger and their planted controls. A missing input makes the
# fact ran=false (counted as failed by the consumer), never zero-filled.
- name: Stage North Star O3 input (north-star-input.O3.json)
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
run: |
set -euo pipefail
N="$RUNNER_TEMP/north-star"; mkdir -p "$N"
SHA=$(git rev-parse "$VERSION^{commit}")
ARGS=(--repo "$REPO" --version-tag "$VERSION" --generated-at "$(date -u +%Y-%m-%dT%H:%M:%SZ)")
if gh api "repos/$REPO/rules/branches/main" \
--jq '.[] | select(.type=="required_status_checks") | .parameters.required_status_checks[].context' \
> "$N/required.txt"; then
ARGS+=(--required "$N/required.txt" --rules-evidence "https://api.github.com/repos/$REPO/rules/branches/main")
else
echo "::warning::could not read the branch rules; proof_check_required is ran=false"
fi
JOB=""
for _ in $(seq 1 15); do
RUN=$(gh api "repos/$REPO/actions/workflows/ci.yml/runs?head_sha=$SHA&event=push&branch=main&per_page=1" \
--jq '.workflow_runs[0].id // empty')
if [ -n "$RUN" ]; then
JOB=$(gh api "repos/$REPO/actions/runs/$RUN/jobs?per_page=100" \
--jq '.jobs[] | select(.name=="Rocq Formal Proofs" and .status=="completed") | "\(.id) \(.conclusion) \(.html_url)"' | head -1)
[ -n "$JOB" ] && break
fi
sleep 60
done
if [ -n "$JOB" ]; then
read -r JID CONCL URL <<< "$JOB"
curl -sSfL -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$REPO/actions/jobs/$JID/logs" -o "$N/rocq.log"
ARGS+=(--rocq-log "$N/rocq.log" --job-conclusion "$CONCL" --job-evidence "$URL")
else
echo "::warning::no completed Rocq Formal Proofs job in main's CI run for $SHA; axiom_audit and ledger are ran=false"
fi
cargo run --locked -q --manifest-path tools/proof-audit/Cargo.toml -- north-star "${ARGS[@]}" \
> release-assets/north-star-input.O3.json
jq -e '.schema_version == 1 and .objective == "O3" and (.facts | length) == 3' \
release-assets/north-star-input.O3.json > /dev/null
jq -c '.facts[] | {id, ran, pass, control_failed_as_expected}' release-assets/north-star-input.O3.json

- name: Generate SHA256SUMS.txt
run: |
set -euo pipefail
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ Versioning: [SemVer 2.0](https://semver.org/spec/v2.0.0.html).

### Added

- **North Star O3 input as a signed release asset** (FEAT-105, pulseengine.eu#393).
Each release attaches `north-star-input.O3.json` (schema_version 1 of
pulseengine.eu's `data/north-star/input.schema.json`), listed in the
cosign-signed `SHA256SUMS.txt`. It carries three facts:
- `proof_check_required`, read from the branch rules API when the release
runs;
- `axiom_audit` and `ledger`, read from the log of the "Rocq Formal Proofs"
job of main's CI run on the tagged commit, together with whether their
planted controls turned red.

A missing input gives `ran: false`, never a zero. `proof-audit north-star`
generates the file, and its tests use a recorded main job log and the
vendored schema.
- **Trust-escape ledger** (FEAT-105 slice 3, #207). `proofs/trust-ledger.tsv`
lists what scry's proofs rest on without proving: 10 generated rows (the
Section `Variable`/`Hypothesis` premises of Poly.v, Reachable.v and
Expand Down Expand Up @@ -102,7 +115,8 @@ Versioning: [SemVer 2.0](https://semver.org/spec/v2.0.0.html).
and a code-only PR never ran it. A planted false lemma fails the job's build
step (`coqc failed ... Unable to unify "2" with "1"`, run 44628952211).
Verus stays informational: it builds from an unmerged rules_verus branch.
Still open in FEAT-105: checking the required list against the live ruleset, and the O3 release asset.
On 2026-11-22, `tools/check-required-checks.py` in live-ruleset mode
reported that the file and ruleset 16891064 agree on 13 contexts.
- **zstd advisories removed from the dependency graph.** wasmtime's default
`cache` feature pulled `wasmtime-internal-cache` -> zstd 0.13 / zstd-safe 7 /
zstd-sys 2.0 (RUSTSEC-2026-0391, -0398, -0403, -0410, plus a run of unsound
Expand Down
98 changes: 98 additions & 0 deletions tools/proof-audit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion tools/proof-audit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# FEAT-105: kernel axiom audit for scry's Rocq proofs.
#
# Standalone `[workspace]` (not a root member), like crates/scry-mcdc: a CI
# gate, not a shipped crate, with no dependencies beyond std.
# gate, not a shipped crate. The binary uses std only; serde_json is a
# dev-dependency so the tests can parse the North Star output against the
# vendored schema (tests/fixtures/input.schema.json).
[package]
name = "proof-audit"
version = "0.1.0"
Expand All @@ -15,3 +17,6 @@ name = "proof-audit"
path = "src/main.rs"

[workspace]

[dev-dependencies]
serde_json = "1"
Loading
Loading