Skip to content
Open
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
121 changes: 121 additions & 0 deletions .github/workflows/proven-lock-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# SPDX-License-Identifier: MPL-2.0
# proven-cicd: proven-lock-gate@0.3.3 sha256:870340e4ad1ce67b9b9f7080d9c99782abf800aeb2a14b0410d0a60eb4a4f547
# Stamped copy of hyperpolymath/proven-cicd-and-workflows templates/proven-lock-gate.yml.
# Do not edit by hand. A changed body fails this gate as drift. The applier
# moves the pinned suite SHA. The line after each `proven-cicd:local-next`
# marker is local and outside the stamp's hash.
#
# The gate judges this repository's actions.lock against its workflows with the
# proven lock kernel. It exits 0 for consistent, 1 for a defect or drift, and 2
# when it could not run. A run that could not run fails this job: it is never
# skipped and never continue-on-error, so a required check cannot pass without
# a verdict. Every way the gate can fail before its verdict has its own class:
# not_run:pin PROVEN_SHA is not a 40-hex commit
# not_run:identity the suite repository is not the one this gate pins
# (repository id 1326697643 owned by account id 6759885,
# hyperpolymath, after following a rename), it moved to
# another owner, or the name no longer exists: refer,
# never re-run
# not_run:identity-unreadable the repository or owner id could not be read
# (API outage or rate limit): a re-run
# not_run:fetch-missing the pinned commit does not exist in the suite (persistent)
# not_run:fetch the suite could not be fetched after retries (transient)
# not_run:checkout the fetched commit could not be checked out
# not_run:suite-behind the pinned suite is older than this copy: its manifest
# lists an earlier proven-lock-gate (or none). Fix: move
# PROVEN_SHA to a commit whose proven/manifest.json lists
# at least this copy's version
# not_run:suite the checkout is not the pinned commit, is modified, or
# lacks a file or directory the gate runs
# and the suite's own script adds drift, toolchain, build, selftest, extract and
# verdict. The Idris2 RefC runtime is vendored in the suite (dist/), so the build
# needs no network and has no class of its own for a third-party host.
name: Proven lock gate
on:
pull_request:
merge_group:
push:
branches: [main]
permissions:
contents: read
jobs:
proven-lock:
name: Proven lock gate
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
# proven-cicd:local-next
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Judge actions.lock with the proven suite at its pinned commit
env:
# proven-cicd:local-next
PROVEN_SHA: "9009d1dbc49301d098aa3c921f685de4d2ee8e85"
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
fail() { echo "PROVEN_LOCK_CLASS=not_run:$1"; [[ -z ${2:-} ]] || echo "$2" >&2; exit 2; }
[[ $PROVEN_SHA =~ ^[0-9a-f]{40}$ ]] || fail pin
repo=hyperpolymath/proven-cicd-and-workflows
# The suite is pinned by commit; the id pins the repository itself, so a
# recreated repository under the same name is refused. A transfer keeps
# the repository id and GitHub redirects the old name to it, so the
# owner id is pinned as well: a transferred repository is refused, and a
# rename within the owner (same repository id, same owner id) passes.
# Two classes: an id that cannot be read is an availability failure (a
# re-run); an id that differs is a different repository (refer).
# A rename answers 301: follow it (-L) and judge the id it leads to.
# The request and every redirect are HTTPS only (--proto, --proto-redir),
# so a redirect cannot carry the token over plain HTTP. A name that no
# longer exists (404, 410) is permanent, so it is identity; any other
# non-200 (403, 429, 5xx) is availability, a re-run.
code=$(curl -sS -L --proto '=https' --proto-redir '=https' --retry 3 -o "$RUNNER_TEMP/proven-repo.json" -w '%{http_code}' \
-H "Authorization: Bearer $GH_TOKEN" "https://api.github.com/repos/$repo") ||
fail identity-unreadable "could not reach the API for $repo"
case $code in
200) ;;
404|410) fail identity "$repo does not exist (HTTP $code)" ;;
*) fail identity-unreadable "the API answered HTTP $code for $repo" ;;
esac
id=$(jq -r '.id // empty' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null) || fail identity-unreadable "the reply for $repo is not JSON"
[[ $id =~ ^[0-9]+$ ]] || fail identity-unreadable "the reply for $repo has no id"
[[ $id == 1326697643 ]] || fail identity "$repo has id '$id', not 1326697643"
owner=$(jq -r '.owner.id // empty' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null) || fail identity-unreadable "the reply for $repo has a malformed owner"
[[ $owner =~ ^[0-9]+$ ]] || fail identity-unreadable "the reply for $repo has no owner id"
[[ $owner == 6759885 ]] ||
fail identity "$repo (id $id) is owned by account $owner ($(jq -r '.owner.login // "?"' "$RUNNER_TEMP/proven-repo.json" 2>/dev/null)), not 6759885 (hyperpolymath): a transfer"
suite="$RUNNER_TEMP/proven-suite"
git init -q "$suite"
git -C "$suite" remote add origin "https://github.com/$repo.git"
git -C "$suite" config core.sparseCheckout true
printf '%s\n' dist/ scripts/ tests/fixtures/proven-lock/ /proven/manifest.json > "$suite/.git/info/sparse-checkout"
fetched=0
for delay in 0 10 30; do
sleep "$delay"
if git -C "$suite" fetch -q --depth=1 origin "$PROVEN_SHA" 2>"$RUNNER_TEMP/proven-fetch.err"; then fetched=1; break; fi
# A commit the server does not have will not appear on a retry.
if grep -qiE "not our ref|couldn't find remote ref|unadvertised object|no such remote ref" "$RUNNER_TEMP/proven-fetch.err"; then
fail fetch-missing "$(cat "$RUNNER_TEMP/proven-fetch.err")"
fi
done
[[ $fetched == 1 ]] || fail fetch "$(cat "$RUNNER_TEMP/proven-fetch.err")"
git -C "$suite" checkout -q --detach FETCH_HEAD || fail checkout
[[ $(git -C "$suite" rev-parse HEAD) == "$PROVEN_SHA" ]] || fail suite "checked out $(git -C "$suite" rev-parse HEAD), not $PROVEN_SHA"
[[ -z $(git -C "$suite" status --porcelain) ]] || fail suite "the suite checkout is modified"
# This copy needs a suite at least as new as itself (0.3.0 needs the
# vendored runtime): a pin older than the copy is its own class, so the
# fix is plain (move the pin), not a generic refusal.
mine=$(sed -n '1,2s/^# proven-cicd: proven-lock-gate@\([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p' "$GITHUB_WORKSPACE/.github/workflows/proven-lock-gate.yml")
[[ -n $mine ]] || fail suite "this copy has no proven-lock-gate stamp"
theirs=$(jq -r '[.artifacts[] | select(.artifact == "proven-lock-gate") | .version][0] // empty' "$suite/proven/manifest.json" 2>/dev/null || true)
[[ -n $theirs && $(printf '%s\n' "$theirs" "$mine" | sort -V | head -n 1) == "$mine" ]] ||
fail suite-behind "the suite at $PROVEN_SHA lists proven-lock-gate ${theirs:-nothing}, older than this copy's $mine; move PROVEN_SHA"
for f in scripts/proven-lock-gate.sh scripts/proven-stamp.sh scripts/build-proven-lock.sh \
scripts/extract-lock-facts.sh dist/proven-lock/proven-lock-verdict.c; do
[[ -f $suite/$f ]] || fail suite "the suite at $PROVEN_SHA lacks $f"
done
for d in dist/proven-lock/runtime/refc dist/proven-lock/runtime/c tests/fixtures/proven-lock; do
[[ -d $suite/$d ]] || fail suite "the suite at $PROVEN_SHA lacks $d/"
done
bash "$suite/scripts/proven-lock-gate.sh" "$GITHUB_WORKSPACE" .github/workflows/proven-lock-gate.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required workflow action lock

Every pull request and main-branch push reaches this gate invocation, but git ls-tree -r 861aaccf confirms that the commit contains no .github/workflows/actions.lock. The repository's existing workflow documentation states that workflows absent from this path are rejected before their steps run, and this change adds two action-using workflows without generating the lock, so the new lock-gate check will fail rather than produce a successful verdict. Commit the generated lock entries alongside these workflows.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, and already known: this is the missing `.github/workflows/actions.lock` (see the reply on proven.yml). It must be generated by the official `gh actions-lock` v0.2.0, which I cannot run here, so it is waiting on the owner. Nothing else in this thread is open.


Generated by Claude Code

32 changes: 32 additions & 0 deletions .github/workflows/proven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: MPL-2.0
# The estate's umbrella gate: ONE caller, ONE required check (`proven / verdict`).
# Do not copy runner jobs in here: a copy freezes and never receives a fix.
# New categories, aspects and checks reach this repository when Dependabot
# (github-actions ecosystem) bumps the pin below. Repo-local content is the
# repo's own tests and fixtures plus .proven.toml (schema proven/manifest/v1).
#
# The job id MUST be `proven` and the job MUST NOT carry `if:` or
# `continue-on-error` (a skipped gate is void, ER-A8). The pin is a full SHA
# with its release tag in the comment; never a branch or a bare tag.
name: Proven

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled] # labeled: bench-approved re-runs the gate
merge_group:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
actions: read
pull-requests: read # bench-approved label lookup

jobs:
proven:
# PIN: main of proven-cicd-and-workflows after #168 merged; the v0.1.0 tag is not cut yet (owner). Re-pin to the tag SHA if it differs.
uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/proven.yml@9009d1dbc49301d098aa3c921f685de4d2ee8e85 # v0.1.2 (tag pending)
126 changes: 126 additions & 0 deletions .proven.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# SPDX-License-Identifier: MPL-2.0
# Manifest (schema proven/manifest/v1); see hyperpolymath/proven-cicd-and-workflows docs/PROVEN-ADOPTION.adoc.
schema = "proven/manifest/v1"

# Sweep 1 runs through tests/{unit,smoke,build,p2p}.sh (shell) and the Zig standalone FFI build they drive.

[languages.ignore.ada]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.agda]
reason = "Proof or specification sources checked by their own gates (header-theory.yml, echidna-verify.yml), not by a unit runner; the umbrella has no checker for this language in release 0.1. Agda moves to the proven-tests-and-benches kit check when kit-v0.1.0 is tagged."

[languages.ignore.c]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.clojure]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.coq]
reason = "Proof or specification sources checked by their own gates (header-theory.yml, echidna-verify.yml), not by a unit runner; the umbrella has no checker for this language in release 0.1. Agda moves to the proven-tests-and-benches kit check when kit-v0.1.0 is tagged."

[languages.ignore.cpp]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.crystal]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.deno]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.elixir]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.gleam]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.go]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.haskell]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.java]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.julia]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.kotlin]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.lean]
reason = "Proof or specification sources checked by their own gates (header-theory.yml, echidna-verify.yml), not by a unit runner; the umbrella has no checker for this language in release 0.1. Agda moves to the proven-tests-and-benches kit check when kit-v0.1.0 is tagged."

[languages.ignore.lua]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.nim]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.node]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.ocaml]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.php]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.python]
reason = "Residual: bindings/hy is a Hy (Python-hosted) binding with a pyproject.toml; estate Python ban means no Python test source here. Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.ruby]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.rust]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.scala]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.swift]
reason = "Thin binding over the libproven C ABI (CLAUDE.md boundary rule); its tests need the Idris-built libproven, which the umbrella cannot provision in release 0.1. Tracked in .proven/LATER.adoc for sweep 2 onwards."

[languages.ignore.tla]
reason = "Proof or specification sources checked by their own gates (header-theory.yml, echidna-verify.yml), not by a unit runner; the umbrella has no checker for this language in release 0.1. Agda moves to the proven-tests-and-benches kit check when kit-v0.1.0 is tagged."

[categories.unit.idris2.waiver]
reason = "The Idris 2 0.8.0 evidence scripts (header-refc.yml, idris2-ci.yml) need a toolchain the umbrella cannot install in release 0.1; they keep running in their own workflows. Expires when idris2 lands in v0.2."
until = "2026-12-10"

[categories.smoke.idris2.waiver]
reason = "The Idris 2 0.8.0 evidence scripts (header-refc.yml, idris2-ci.yml) need a toolchain the umbrella cannot install in release 0.1; they keep running in their own workflows. Expires when idris2 lands in v0.2."
until = "2026-12-10"

[categories.build.idris2.waiver]
reason = "The Idris 2 0.8.0 evidence scripts (header-refc.yml, idris2-ci.yml) need a toolchain the umbrella cannot install in release 0.1; they keep running in their own workflows. Expires when idris2 lands in v0.2."
until = "2026-12-10"

[categories.p2p.idris2.waiver]
reason = "The Idris 2 0.8.0 evidence scripts (header-refc.yml, idris2-ci.yml) need a toolchain the umbrella cannot install in release 0.1; they keep running in their own workflows. Expires when idris2 lands in v0.2."
until = "2026-12-10"

[categories.unit]
command = "bash tests/unit.sh"

[categories.smoke]
command = "bash tests/smoke.sh"

[categories.build]
command = "bash tests/build.sh"

[categories.p2p]
command = "bash tests/p2p.sh"
[categories.unit.shell]
na = "tests/unit.sh needs the zig toolchain, which only the zig job provisions; that job runs it"

[categories.smoke.shell]
na = "tests/smoke.sh needs the zig toolchain, which only the zig job provisions; that job runs it"

[categories.build.shell]
na = "tests/build.sh needs the zig toolchain, which only the zig job provisions; that job runs it"

[categories.p2p.shell]
na = "tests/p2p.sh needs the zig toolchain, which only the zig job provisions; that job runs it"

10 changes: 10 additions & 0 deletions .proven/LATER.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: CC-BY-SA-4.0
= Later list (proven swap)

Items deliberately deferred by the swap PR, so nothing passes on absence.

* Sweep 2 (regression, proof-regression, type-safe, coupling/drift), sweep 3 (B grade), sweep 4.
* Idris2 provisioning in the umbrella (v0.2); idris2 waivers in `.proven.toml` expire 2026-12-10.
* Proof witnesses and full agda `--cubical`.
* Replace vendored `tests/kit/` with the umbrella-provided copy once kit-v0.1.0 exists; add a drift check.
* Unify the Idris lexer shared by the escape-hatch gate and the proof census.
Loading
Loading