1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Generated release train for Adapter-For-All-Agents.
# Regenerate from the release declaration instead of editing this file by
# hand; .github/release.lock records the source inputs that produced it.
#
# The per-change gate: pushes to the default branch and pull requests
# targeting it run the repository's own verify command, then recompute the
# generated-file hashes recorded in .github/release.lock so a hand edit to
# a generated file cannot pass undetected. The generated helper ships its
# own tests beside it, and the verify command owns running them — this
# file deliberately carries no second helper-test step. The signed release
# machinery lives in verify.yml/publish.yml — this file holds no OIDC
# identity and needs no credentials.
name: ci
on:
permissions:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
# Pushes gate the default branch only; pull requests gate when they
# target it. Other refs skip — the release train and the publish gate
# cover release-relevant history.
if: >-
(github.event_name == 'push' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) ||
(github.event_name == 'pull_request' &&
github.base_ref == github.event.repository.default_branch)
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
env:
DIR: 'Adapter-For-All-Agents'
defaults:
run:
shell: bash
working-directory: Adapter-For-All-Agents
steps:
# Pull-request code runs this repository's verify scripts; the token
# must never sit in a readable credential file while it does.
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
path: ${{ env.DIR }}
persist-credentials: false
- name: Check out Agent-Context-Operators at its default branch
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
repository: Unka-Malloc/Agent-Context-Operators
path: Agent-Context-Operators
persist-credentials: false
- name: Check out Hook-Engine at its default branch
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
repository: Unka-Malloc/Agent-Hook-Engine
path: Hook-Engine
persist-credentials: false
- name: Check out Metera at its default branch
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
repository: Unka-Malloc/Metera
path: Metera
persist-credentials: false
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
components: rustfmt, clippy
- name: Install the pinned toolchain
run: |
if [ -f rust-toolchain.toml ] || [ -f rust-toolchain ]; then
rustup toolchain install
fi
- name: Verify
run: |
scripts/verify.sh
# Provenance: a hand edit to a generated file changes its hash, so
# recompute every output recorded in .github/release.lock and fail on
# a mismatch. Reads only the checkout — no network, no credentials.
- name: Check generated files against release.lock
run: |
python3 - <<'PY'
import hashlib, pathlib, tomllib
lock = tomllib.loads(pathlib.Path(".github/release.lock").read_text())
recorded = lock.get("outputs", {})
stale = []
for rel, digest in recorded.items():
path = pathlib.Path(rel)
actual = (path.is_file()
and "sha256:" + hashlib.sha256(path.read_bytes()).hexdigest())
if actual != digest:
stale.append(rel)
if stale:
raise SystemExit("generated files drifted from .github/release.lock; "
"regenerate instead of editing: " + ", ".join(stale))
print(f"release.lock provenance verified for {len(recorded)} file(s)")
PY