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
10 changes: 5 additions & 5 deletions .github/workflows/main-estate-audit.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# SPDX-License-Identifier: MPL-2.0
name: Central Estate CI/CD Audit

# Thin caller of the estate audit, which lives in hyperpolymath/cicd-suite as
# Thin caller of the estate audit, which lives in hyperpolymath/proven-cicd-and-workflows as
# a reusable workflow and reports five component checks: governance,
# hygiene, manifests, languages, advisory. Do not copy the audit's steps in
# here. A copy freezes this repository at whatever cicd-suite commit its
# here. A copy freezes this repository at whatever suite commit its
# actions.lock happened to hold, and fixes made upstream never arrive.
#
# The pin is a full SHA, advanced weekly by track-estate-audit.yml (a PR
# whose own run of this audit is the check).
#
# ⚠ DE-ONBOARDED from actions.lock, deliberately, like the secret-scanner
# caller. A reusable workflow onboarded cross-repo startup-fails with zero
# jobs under sha_pinning_required (see the header of cicd-suite's
# jobs under sha_pinning_required (see the header of the suite's
# main-estate-audit.yml). Do not run a full-directory `gh actions-lock` that
# re-onboards this file. If one does, cicd-suite/scripts/deonboard-estate-audit.sh
# re-onboards this file. If one does, the suite's scripts/deonboard-estate-audit.sh
# reverses it.

on:
Expand All @@ -28,4 +28,4 @@ permissions:

jobs:
estate:
uses: hyperpolymath/cicd-suite/.github/workflows/main-estate-audit.yml@b17ec1af1bbf097d77a58ac3363c4cf5db4d7f4a # cicd-suite main
uses: hyperpolymath/proven-cicd-and-workflows/.github/workflows/main-estate-audit.yml@9eb0bbf9bd80b7964ce5b9957e75821b3cd4a55b # proven-cicd-and-workflows main
42 changes: 27 additions & 15 deletions .github/workflows/track-estate-audit.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: MPL-2.0
name: Track latest estate audit

# Weekly: is the cicd-suite estate audit this repository calls behind
# cicd-suite's main? If so, open a PR that moves the pin in
# main-estate-audit.yml to cicd-suite HEAD. The PR's own estate-audit run is
# Weekly: is the estate audit this repository calls behind
# hyperpolymath/proven-cicd-and-workflows main? If so, open a PR that moves the pin in
# main-estate-audit.yml to the suite's HEAD. The PR's own estate-audit run is
# the check: merge it when the five components are green. Nothing reaches
# main unreviewed.
#
Expand Down Expand Up @@ -40,24 +40,35 @@ jobs:
CALLER: .github/workflows/main-estate-audit.yml
BOT_EMAIL: 41898583+github-actions[bot]@users.noreply.github.com
steps:
- name: Move the cicd-suite pin to HEAD and open a PR
- name: Move the estate-audit pin to the suite HEAD and open a PR
run: |
set -euo pipefail
gh auth setup-git
base=$(gh repo view "$GITHUB_REPOSITORY" --json defaultBranchRef --jq .defaultBranchRef.name)
gh repo clone "$GITHUB_REPOSITORY" repo -- --quiet --depth 1 --branch "$base"
cd repo

pinned=$(grep -oE 'cicd-suite/\.github/workflows/main-estate-audit\.yml@[0-9a-f]{40}' "$CALLER" \
# The suite was renamed from cicd-suite to proven-cicd-and-workflows
# on 2026-11-09. Actions does not follow a rename in `uses:`, so a
# caller still on the old name is moved to the new one with its SHA.
suite=hyperpolymath/proven-cicd-and-workflows
ref_re='hyperpolymath/(cicd-suite|proven-cicd-and-workflows)/\.github/workflows/main-estate-audit\.yml@'
pinned=$(grep -oE "${ref_re}[0-9a-f]{40}" "$CALLER" \
| sed 's/.*@//' | head -n 1 || true)
if [ -z "$pinned" ]; then
echo "::error::$CALLER does not call cicd-suite's reusable estate audit at a full SHA."
echo "::error::$CALLER does not call the suite's reusable estate audit at a full SHA."
exit 1
fi
head=$(git ls-remote https://github.com/hyperpolymath/cicd-suite.git HEAD | cut -f1)
echo "pinned ${pinned:0:7}, cicd-suite HEAD ${head:0:7}"
if [ "$pinned" = "$head" ]; then
echo "Already at cicd-suite HEAD."
head=$(git ls-remote "https://github.com/$suite.git" HEAD | cut -f1)
# A lookup that succeeds but returns no HEAD would leave $head empty,
# and the rewrite below would strip the pin. Refuse anything else.
if ! [[ "$head" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::could not resolve $suite HEAD (got '${head}'); no pin was touched."
exit 1
fi
echo "pinned ${pinned:0:7}, $suite HEAD ${head:0:7}"
if [ "$pinned" = "$head" ] && ! grep -qE 'hyperpolymath/cicd-suite/' "$CALLER"; then
echo "Already at $suite HEAD."
exit 0
fi

Expand All @@ -73,18 +84,19 @@ jobs:
fi
fi

sed -i "s/$pinned/$head/g" "$CALLER"
# Rewrite only the suite's own reference: name and SHA together.
sed -i -E "s#${ref_re}${pinned}#${suite}/.github/workflows/main-estate-audit.yml@${head}#" "$CALLER"
git switch --quiet -c "$BRANCH"
git -c user.name='github-actions[bot]' -c user.email="$BOT_EMAIL" \
commit --quiet -am "ci(estate-audit): track cicd-suite ${head:0:7}"
commit --quiet -am "ci(estate-audit): track proven-cicd-and-workflows ${head:0:7}"
if ! git push --quiet --force origin "$BRANCH"; then
echo "::error::Push refused: writing under .github/workflows/ needs the AUTOMATION_TOKEN secret described above."
exit 1
fi
body="Moves the estate audit to cicd-suite \`${head:0:7}\` (was \`${pinned:0:7}\`): https://github.com/hyperpolymath/cicd-suite/compare/$pinned...$head. This PR's estate-audit run is the check. Opened by \`track-estate-audit.yml\`."
body="Moves the estate audit to $suite \`${head:0:7}\` (was \`${pinned:0:7}\`): https://github.com/$suite/compare/$pinned...$head. This PR's estate-audit run is the check. Opened by \`track-estate-audit.yml\`."
if [ -n "$(gh pr list --head "$BRANCH" --state open --json number --jq '.[].number')" ]; then
gh pr edit "$BRANCH" --title "ci(estate-audit): track cicd-suite ${head:0:7}" --body "$body"
gh pr edit "$BRANCH" --title "ci(estate-audit): track proven-cicd-and-workflows ${head:0:7}" --body "$body"
else
gh pr create --base "$base" --head "$BRANCH" \
--title "ci(estate-audit): track cicd-suite ${head:0:7}" --body "$body"
--title "ci(estate-audit): track proven-cicd-and-workflows ${head:0:7}" --body "$body"
fi
18 changes: 18 additions & 0 deletions STATE.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
= STATE — cross-session log

== 2026-11-16 — estate audit repointed after the suite rename (not a rung)

* `hyperpolymath/cicd-suite` was renamed to
`hyperpolymath/proven-cicd-and-workflows` on 2026-11-09. Actions does not
follow a rename in `uses:`, so `main-estate-audit.yml` had failed at
startup with zero jobs since then (first seen on #59). The upstream fix,
proven-cicd-and-workflows#94, merged 2026-11-10 as `1fd5e63`.
* `main-estate-audit.yml` now calls
`proven-cicd-and-workflows/.github/workflows/main-estate-audit.yml` at that
suite's HEAD, `9eb0bbf`. At that commit the reusable names no
`cicd-suite` reference. This PR's own estate-audit run is the check.
* `track-estate-audit.yml` finds the pin under either name, reads HEAD from
the new name, refuses a non-SHA HEAD, and rewrites the name and SHA
together in the suite's own reference only. Checked on fixtures: an
old-name caller at `b17ec1a` moves to the new name at `9eb0bbf`, and a
caller already there is left alone. It still needs `AUTOMATION_TOKEN` to
open its PRs.

== 2026-11-09 — proof status under the estate proof policy (not a rung)

* New `PROOF-STATUS.adoc`, as `standards` `3-practice/PROOF-POLICY.adoc`
Expand Down
Loading