Repository navigation
176 lines (166 loc) · 7.16 KB
/
Copy pathtest.yml
File metadata and controls
176 lines (166 loc) · 7.16 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Test Suite
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
# ─── URL STABILITY (Article XXIII — the permanent URL contract) ──
# Published agent paths are a public contract, exactly like an npm
# version. People install agents by URL and those URLs live inside
# other people's brainstems, scripts and products. We cannot see a
# broken install and we cannot notify anyone it happened. So this
# gate runs first and blocks the merge: no rename, no move, no
# delete of anything already published on main. Ever.
url-stability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Verify every published agent URL still resolves
run: python scripts/check_url_stability.py
- name: Verify every published skill URL still resolves
run: python scripts/check_skill_url_stability.py
- name: Verify the committed Skills catalog projection
run: python scripts/build_skills_catalog.py --check
# ─── RAPP/1 BOUNDED SCAN (the conformance checker must finish) ──
# kody-w/rapp-1's rapp_check.py stops after a fixed number of files and
# then reports all of RAR as DRIFT, whatever the artifacts say. This fails
# at 90% of every bound, while there is still room to act. It is a job of
# its own that nothing needs: a red budget never skips the rest of the
# suite, and approval and aggregation, which run the unit tests before
# they commit, never gate on it. Nightly measures it too, because bot
# commits never start this workflow. See docs/RAPP1-CONFORMANCE.md.
rapp-scan-budget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Verify RAR stays inside the RAPP/1 checker's bounded scan
run: python scripts/check_rapp_scan_budget.py
- name: Clutter ratchet (top-level files, pages, folders, kinds and tiers may shrink, never grow)
run: python scripts/check_ratchet.py
# ─── SMOKE (fast gate — runs on every PR) ───────────────────────
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test deps
run: pip install pytest pyyaml
- name: Smoke tests
run: pytest -m smoke -v --tb=short
# ─── PIPELINE (staging, security, integrity) ────────────────────
pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test deps
run: pip install pytest pyyaml
- name: Pipeline integrity tests
run: pytest tests/test_pipeline_integrity.py -v --tb=short
# ─── CONTRACT (all agents — parametrized) ───────────────────────
contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test deps
run: pip install pytest
- name: Agent contract tests
run: pytest tests/test_agent_contract.py -v --tb=short
# ─── PUBLISHED CLAIMS (reporting + the release path) ───────────
# Everything RAR asserts in public: the per-agent numbers, and the release
# that stamps them. A wrong number is worse than a missing one because
# nobody re-checks a plausible-looking figure, and a release defect can
# only otherwise be found by publishing something wrong. Hermetic by
# design — no network, no token — so it runs on every push and a red here
# always means the code broke, never that GitHub was having a bad day.
# The live half is driven by hand; see docs/REPORTING-TESTS.md.
reporting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# pyyaml: the release-path suite parses the workflow files themselves to
# check that no run: body carries an interpolated or empty expression.
- name: Install test deps
run: pip install pytest pyyaml
- name: Reporting machinery tests
run: pytest tests/test_reporting.py -v --tb=short
- name: Release path tests
run: pytest tests/test_release_path.py -v --tb=short
# ─── NOTARY (trusted PR policy lives in notary-policy.yml) ─────
notary:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Verify changed agent receipts
env:
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: python scripts/check_notarized_changes.py --base "$BASE_SHA"
# ─── FULL (all tests) ──────────────────────────────────────────
full:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [url-stability, smoke, pipeline, contract]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test deps
run: pip install pytest pyyaml requests # requests: layer files (providers) import it
- name: Prepare trusted pending migrations
run: |
result=$(python scripts/apply_maintainer_migrations.py)
echo "$result"
changed=$(python -c \
'import json,sys; print("true" if json.load(sys.stdin)["changed"] else "false")' \
<<< "$result")
if [ "$changed" = "true" ]; then
python scripts/mint_maintainer_receipts.py \
--agent @kody-w/connected_solution_agent \
--agent @kody-w/copilot_studio_forge_agent \
--agent @rapp/forge_provenance_agent \
--agent @rapp/learn_new \
--agent @rapp/rapp_dogg_agent \
--agent @rapter/hive_census_agent \
--agent @rapter/hive_shape_agent \
--agent @rapter/rapp_dogg_agent \
--note "test exact hash-pinned legacy registry migrations"
python build_registry.py
python scripts/check_url_stability.py --update
python scripts/build_pokedex_api.py
python scripts/build_static_api.py
python scripts/build_front_page.py
fi
- name: Full test suite
# Scout source commits are only final after the trusted main-branch
# migration commit. The dedicated build job validates the current
# projection; aggregate.yml validates the post-commit projection.
run: pytest -v --tb=short --ignore=tests/test_scout_rapp_skill.py