From fda2cd9fae717c954e76c089a92d4566b0344fd2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 20:33:40 +0000 Subject: [PATCH 1/5] ci: add CI/gate caller (placeholder suite pin, profile not yet on suite main) Thin caller of proven-cicd-and-workflows ci-gate.yml from the suite template at a0760cea695a815a96b3944f3d03ee015da856d0. The Branch-Floor ruleset requires the commit status CI/gate and nothing here produced it. De-onboarded from actions.lock. The profile is not on suite main yet, so gate-pr fails closed until the coordinator lands it and re-pins this caller. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDft9ZYj7qdZfRQScve --- .github/workflows/ci-gate.yml | 92 +++++++++++++++++++++++++++++++++++ CHANGELOG.adoc | 9 ++++ 2 files changed, 101 insertions(+) create mode 100644 .github/workflows/ci-gate.yml diff --git a/.github/workflows/ci-gate.yml b/.github/workflows/ci-gate.yml new file mode 100644 index 0000000..3accc5a --- /dev/null +++ b/.github/workflows/ci-gate.yml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: MPL-2.0 +# CI gate — thin caller of the estate's interim gate, which lives in +# hyperpolymath/proven-cicd-and-workflows as a reusable workflow. Do not copy +# its jobs in here: a copy freezes at one cicd-suite commit and never receives +# a fix. +# +# It emits the commit status `CI/gate`, which the Branch-Floor ruleset +# requires. It is a COMMIT STATUS, not a check run, because a job inside a +# reusable workflow gets the check-run name ` / ` +# (see rust-ci-caller.yml: `rust-ci / Cargo test`), which always contains +# " / " and can never equal `CI/gate`. +# +# It triggers on workflow_run, schedule and workflow_dispatch, all of which GitHub runs from the +# DEFAULT branch: a pull request cannot alter this file, its pin or its list. The consequence: +# the pull request that adds this caller can never receive `CI/gate` itself, and +# would be merged past the gate once (owner action) without the gate-pr job at the end. There is no +# pull_request start here except the gate-pr job at the end (docs/CI-GATE.adoc, "The pull_request start"), +# whose shape tests/ci-gate.sh asserts. +# +# `schedule` and `workflow_dispatch` run a SWEEP: the reusable lists the open pull requests and the +# default branch head and re-evaluates each distinct head SHA with the same guarded publisher. A stale state +# then normally lasts until the next sweep. It is still last-writer-wins, a sweep is itself an evaluator, +# and GitHub may delay or skip scheduled runs (docs/CI-GATE.adoc, "Residual limit"). The cron below runs at minutes +# 7, 22, 37 and 52 of every hour; keep the minutes off :00 and :30, where scheduled load is highest. +# The sweep reads open pull requests, so the caller must grant `pull-requests: read`. +# +# It also fires when a workflow run STARTS (`in_progress`, which GitHub also sends for a rerun): +# any active run makes the verdict pending, so a rerun replaces a stale success with pending, +# approximating a native required check. `completed` then re-evaluates it (last-writer-wins; see docs/CI-GATE.adoc, "Residual limit"). +# +# The required-check list is NOT in this repository: it lives in +# proven-cicd-and-workflows/profiles/ci-gate//.json at the pinned +# SHA below, selected by github.repository. A repository with no profile there +# fails the gate closed until one is added to the suite. +# +# The job id MUST stay `gate`. The pin is a full SHA, never `@main` or a tag: +# the account enforces sha_pinning_required. An A3 `estate-gate` replaces this +# interim gate by changing ONE pin and ONE context (`with: context`) here. +# +# ⚠ DE-ONBOARDED from actions.lock, deliberately, like the estate-audit and +# Rust CI callers: an onboarded cross-repo reusable startup-fails with zero +# jobs under sha_pinning_required. cicd-suite/scripts/deonboard-workflow.sh +# reverses a re-onboarding. +# +# There is deliberately NO `concurrency:` block here: serialising per SHA would delay the +# in_progress caller behind a running evaluation that then writes a stale success. The reusable's +# own job cancels a running evaluation of the same SHA instead, and re-reads the runs just before it +# writes (scripts/ci-gate-publish.sh; tests/ci-gate.sh asserts the template has no concurrency). +# +# API budget: "**" starts the gate for every workflow. If the profile's required checks come from a +# few workflows, naming them (workflows: ["CI", "Lint"]) cuts the events; keep that list in step with +# the profile (docs/CI-GATE.adoc, "API budget"). +# +# No `secrets:` line: the reusable consumes none. +name: CI gate + +on: + pull_request: + workflow_run: + workflows: ["**", "!CI gate"] + types: [completed, in_progress] + schedule: + - cron: "7,22,37,52 * * * *" + workflow_dispatch: {} + +permissions: + statuses: write + actions: read + contents: read + pull-requests: read + +jobs: + gate: + if: github.event_name != 'pull_request' && (github.event_name != 'workflow_run' || github.event.workflow_run.name != 'CI gate') + uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@a0760cea695a815a96b3944f3d03ee015da856d0 # cicd-suite ci-gate + with: + context: "CI/gate" + # timeout_minutes: 180 # how long a missing check keeps the gate pending + + # The pull_request start. workflow_run, schedule and workflow_dispatch run only from the default + # branch, so without this job the pull request that adds or changes the gate never gets the status + # and a ruleset requiring it blocks that very pull request. This job runs from the pull request's own + # branch and posts the same verdict, waiting (bounded) for the checks named in the profile to report. + # Same-repository branches only: a fork's or Dependabot's pull_request token cannot write statuses, + # and those are covered by the workflow_run job. No trust decision uses github.actor. + # Because a pull request can edit this file, the Gate tamper guard (ci-gate-tamper-guard.yml, run from + # the default branch) fails a pull request that touches gate files unless the owner has approved it. + gate-pr: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@a0760cea695a815a96b3944f3d03ee015da856d0 # cicd-suite ci-gate + with: + context: "CI/gate" diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2c2d136..d0e8cf4 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -7,6 +7,15 @@ Changelog]. === [Unreleased] +==== Added (2026-11-23) + +* _CI/gate caller._ `+.github/workflows/ci-gate.yml+`, a thin caller of the +estate gate in `+proven-cicd-and-workflows+` that publishes the commit status +`+CI/gate+` required by the Branch-Floor ruleset. De-onboarded from +`+actions.lock+` on purpose (a cross-repository reusable startup-fails when +onboarded). The suite pin is a placeholder until the repository profile is on +the suite `+main+`; until then the gate fails closed. + ==== Added (2026-11-09) * _squeakwell / VeriSimDB recovery ladder._ `+EchoPartialSection.agda+` From 9e0f09915dc12a4096bc5b6361d9413a0bc6df27 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 20:39:48 +0000 Subject: [PATCH 2/5] ci: list the CI/gate caller in actions.lock The live consumers list the caller in actions.lock, so add the workflow entry and the suite leaf record at the pinned suite commit. Fixes the lockfile verification failure on this PR. The earlier de-onboarding note was wrong. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDft9ZYj7qdZfRQScve --- .github/workflows/actions.lock | 7 +++++++ CHANGELOG.adoc | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 7079c48..6e94adb 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -8,6 +8,8 @@ workflows: - 'actions/cache@v6.1.0' - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - 'actions/checkout@v7.0.1' + '.github/workflows/ci-gate.yml': + - 'hyperpolymath/proven-cicd-and-workflows@a0760cea695a815a96b3944f3d03ee015da856d0' '.github/workflows/codeql.yml': - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - 'actions/checkout@v7.0.1' @@ -108,6 +110,11 @@ dependencies: commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066' owner_id: 9919 repo_id: 259445878 + 'hyperpolymath/proven-cicd-and-workflows@a0760cea695a815a96b3944f3d03ee015da856d0': + ref: 'main' + commit: 'sha1-a0760cea695a815a96b3944f3d03ee015da856d0' + owner_id: 6759885 + repo_id: 1326697643 'hyperpolymath/smtp-notify-action@e384daf6167a7a7567642d6a62060106244d2413': ref: 'v0.5.1' commit: 'sha1-e384daf6167a7a7567642d6a62060106244d2413' diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index d0e8cf4..bc69a2d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,9 +11,8 @@ Changelog]. * _CI/gate caller._ `+.github/workflows/ci-gate.yml+`, a thin caller of the estate gate in `+proven-cicd-and-workflows+` that publishes the commit status -`+CI/gate+` required by the Branch-Floor ruleset. De-onboarded from -`+actions.lock+` on purpose (a cross-repository reusable startup-fails when -onboarded). The suite pin is a placeholder until the repository profile is on +`+CI/gate+` required by the Branch-Floor ruleset. Listed in +`+actions.lock+`. The suite pin is a placeholder until the repository profile is on the suite `+main+`; until then the gate fails closed. ==== Added (2026-11-09) From a92353261ec468f1f6f0f53eaec716d4855c4645 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 21:18:31 +0000 Subject: [PATCH 3/5] ci: list the CI/gate caller in actions.lock as an empty entry A job-level reusable-workflow call is not pinned by the lockfile, and gh actions-lock reports a leaf record for it as an unused entry. Use the same empty file-level entry as the other cross-repo reusable callers. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDft9ZYj7qdZfRQScve --- .github/workflows/actions.lock | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 6e94adb..c97e4f1 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -8,8 +8,7 @@ workflows: - 'actions/cache@v6.1.0' - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - 'actions/checkout@v7.0.1' - '.github/workflows/ci-gate.yml': - - 'hyperpolymath/proven-cicd-and-workflows@a0760cea695a815a96b3944f3d03ee015da856d0' + '.github/workflows/ci-gate.yml': [] '.github/workflows/codeql.yml': - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - 'actions/checkout@v7.0.1' @@ -110,11 +109,6 @@ dependencies: commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066' owner_id: 9919 repo_id: 259445878 - 'hyperpolymath/proven-cicd-and-workflows@a0760cea695a815a96b3944f3d03ee015da856d0': - ref: 'main' - commit: 'sha1-a0760cea695a815a96b3944f3d03ee015da856d0' - owner_id: 6759885 - repo_id: 1326697643 'hyperpolymath/smtp-notify-action@e384daf6167a7a7567642d6a62060106244d2413': ref: 'v0.5.1' commit: 'sha1-e384daf6167a7a7567642d6a62060106244d2413' From 1bfced5cc274b0099deaba8829bebebd84a5ec17 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 22:18:43 +0000 Subject: [PATCH 4/5] ci: re-pin the CI/gate caller to the suite commit that carries this repository's profile Replace the placeholder suite pin a0760cea695a815a96b3944f3d03ee015da856d0 with d28d73ef10c623b507e98ffddb040268e29b5443 (suite main, which now has profiles/ci-gate/hyperpolymath/.json). Both uses: lines change; nothing else. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDft9ZYj7qdZfRQScve --- .github/workflows/ci-gate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-gate.yml b/.github/workflows/ci-gate.yml index 3accc5a..53bea7a 100644 --- a/.github/workflows/ci-gate.yml +++ b/.github/workflows/ci-gate.yml @@ -72,7 +72,7 @@ permissions: jobs: gate: if: github.event_name != 'pull_request' && (github.event_name != 'workflow_run' || github.event.workflow_run.name != 'CI gate') - uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@a0760cea695a815a96b3944f3d03ee015da856d0 # cicd-suite ci-gate + uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@d28d73ef10c623b507e98ffddb040268e29b5443 # cicd-suite ci-gate with: context: "CI/gate" # timeout_minutes: 180 # how long a missing check keeps the gate pending @@ -87,6 +87,6 @@ jobs: # the default branch) fails a pull request that touches gate files unless the owner has approved it. gate-pr: if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository - uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@a0760cea695a815a96b3944f3d03ee015da856d0 # cicd-suite ci-gate + uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@d28d73ef10c623b507e98ffddb040268e29b5443 # cicd-suite ci-gate with: context: "CI/gate" From 48b93406ebb146e591ae9ff3ac5c619c67b7787c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 22:23:31 +0000 Subject: [PATCH 5/5] docs(changelog): describe the CI/gate caller's real pin and lock entry The caller pins suite main d28d73ef10c623b507e98ffddb040268e29b5443, which carries this repository's profile, and actions.lock holds an empty file-level entry for it. Drop the stale placeholder / fail-closed wording. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDft9ZYj7qdZfRQScve --- CHANGELOG.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index bc69a2d..29d22f3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,8 +12,9 @@ Changelog]. * _CI/gate caller._ `+.github/workflows/ci-gate.yml+`, a thin caller of the estate gate in `+proven-cicd-and-workflows+` that publishes the commit status `+CI/gate+` required by the Branch-Floor ruleset. Listed in -`+actions.lock+`. The suite pin is a placeholder until the repository profile is on -the suite `+main+`; until then the gate fails closed. +`+actions.lock+` as an empty file-level entry (`+[]+`, no leaf record). The caller +pins suite `+main+` `+d28d73ef10c623b507e98ffddb040268e29b5443+`, which carries this +repository's profile. ==== Added (2026-11-09)