-
Notifications
You must be signed in to change notification settings - Fork 5
1910 lines (1794 loc) · 79 KB
/
Copy pathci.yml
File metadata and controls
1910 lines (1794 loc) · 79 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: CI
on:
push:
branches: [main, python-adcp-sdk-setup]
pull_request:
branches:
- main
- conductor/reporting-webhook-activity-1168b
- conductor/reporting-status-notifications-1168c
- conductor/1167b1-materializer-contracts
- conductor/1167b2-durable-managed-reporting
- conductor/reporting-receipt-ingress-b22
- conductor/reporting-frozen-account-feed-b23
- conductor/reporting-schema-proof-receipt-diagnostics-hardening
- conductor/reporting-production-tier-capabilities-b24
- conductor/reporting-adcp-rc4-adoption
# Default @adcp/sdk runner alias for storyboard jobs. Tracks the current
# stable @adcp/sdk release via the ``latest`` npm dist-tag.
env:
ADCP_SDK_VERSION: "latest"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
workflow-security:
name: Workflow security
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- name: Lint workflows
uses: raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2.2.0
with:
version: 1.7.7
shellcheck: false
# actionlint v1.7.x predates GitHub's `queue: max` concurrency
# syntax. Keep linting every other workflow field until its parser
# catches up.
flags: >-
-ignore ^unexpected\s+key\s+\x22queue\x22\s+for\s+\x22concurrency\x22\s+section
- name: Test Ladon review-state helper
run: node --test scripts/retire-superseded-ladon-reviews.test.cjs
- name: Audit workflows
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
with:
inputs: >-
.github/workflows/claude-issue-triage.yml
.github/workflows/ipr-agreement.yml
.github/workflows/sync-agent-roles.yml
.github/workflows/slash-command-dispatch.yml
.github/workflows/ai-review.yml
.github/workflows/release-please.yml
.github/workflows/release-proposal.yml
.github/workflows/release-acceptance.yml
.github/workflows/release-publish.yml
version: 1.29.0
min-severity: high
min-confidence: high
advanced-security: false
annotations: true
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
# The job ceiling is not the suite's budget: it also has to absorb
# checkout, Python setup, the editable [dev] install and, on 3.12 only,
# ruff/mypy/mypy --strict/the type-ignore contract before pytest starts,
# then post-job cleanup after it ends. On an ubuntu-latest runner that
# pre-test work is ~1m30s and the plain suite is ~16m, but 3.12 adds
# coverage tracing on the full suite: even a 45-minute coverage step can
# time out near 99% on a loaded runner with no failing test. Bound the
# suite itself so a hang fails the named step. The 3.12 job keeps 15
# minutes beyond that step for setup and cleanup; other jobs keep 60.
timeout-minutes: ${{ matrix.python-version == '3.12' && 70 || 60 }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run linter
if: matrix.python-version == '3.12'
run: ruff check src/
- name: Run type checker
if: matrix.python-version == '3.12'
run: mypy src/adcp/
- name: Run adopter type-check suite
if: matrix.python-version == '3.12'
run: mypy --strict tests/type_checks/ examples/reporting_webhook_activity.py examples/reporting_status_notifications.py examples/reporting_destination_writer.py examples/reporting_durable_materializer.py examples/reporting_receipt_ingress.py examples/reporting_production.py
- name: Enforce adopter type-check fixture contract
if: matrix.python-version == '3.12'
run: python scripts/check_type_ignore_contract.py
# Bound the plain and coverage runs separately so a genuinely stuck
# suite fails its named step rather than cancelling the entire job.
- name: Run tests
if: matrix.python-version != '3.12'
timeout-minutes: 45
run: python scripts/reporting_test_harness.py pytest tests/ -v -ra
- name: Run tests with coverage
if: matrix.python-version == '3.12'
timeout-minutes: 55
run: python scripts/reporting_test_harness.py pytest tests/ -v -ra --cov=src/adcp --cov-report=term-missing
pg-conformance:
name: Postgres conformance tests (Postgres 16, ${{ matrix.lane }})
runs-on: ubuntu-latest
timeout-minutes: ${{ matrix.timeout_minutes }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
# Core also builds and installs the reporting wheel/sdist fixtures.
- lane: core
timeout_minutes: 30
- lane: process
timeout_minutes: 15
services:
postgres:
# CI-local ephemeral database. POSTGRES_HOST_AUTH_METHOD=trust
# avoids shipping any password literal (real or placeholder) in
# this workflow — GitHub's default CI network is already the
# trust boundary for this throwaway service.
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch reviewed reporting baseline for rolling binary tests
timeout-minutes: 1
run: git fetch --no-tags --depth=1 origin 17ee407ae3978c8a2bb54437287afbf9dafb8130
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies (with [pg] extra)
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,pg]"
- name: Run Postgres conformance tests
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_test
PG_LANE: ${{ matrix.lane }}
run: |
# Keep every case and its per-case deadline. The core lane includes
# installed artifact coverage and has a larger overall job budget.
case "$PG_LANE" in
core)
python scripts/reporting_test_harness.py pytest tests/conformance/signing/test_pg_replay_store.py \
tests/conformance/signing/test_pg_replay_store_e2e.py \
tests/conformance/decisioning/test_pg_buyer_agent_registry.py \
tests/conformance/decisioning/test_pg_idempotency_backend.py \
tests/conformance/decisioning/test_pg_task_webhook_outbox.py \
tests/conformance/decisioning/test_pg_reference_workflow_queue.py \
tests/conformance/reporting/ \
--ignore=tests/conformance/reporting/test_reporting_notification_process_matrix.py \
--ignore-glob='tests/conformance/reporting/test_reporting_status_*.py' \
--ignore=tests/conformance/reporting/test_reporting_materializer_rolling.py \
--ignore=tests/conformance/reporting/test_reporting_materializer_process.py \
--ignore=tests/conformance/reporting/test_reporting_materializer_migration.py \
--ignore=tests/conformance/reporting/test_reporting_materializer_installed_pg.py \
--ignore-glob='tests/conformance/reporting/test_reporting_receipt_*.py' \
--ignore-glob='tests/conformance/reporting/test_reporting_feed_*.py' \
--ignore-glob='tests/conformance/reporting/test_reporting_production*.py' \
--ignore-glob='tests/conformance/reporting/test_reporting_projection*.py' \
--ignore=tests/conformance/reporting/test_reporting_tier_projection.py \
--ignore=tests/conformance/reporting/test_reporting_schedule_schema.py \
--ignore=tests/conformance/reporting/test_reporting_rc6_rolling.py \
-v -ra
;;
process)
python scripts/reporting_test_harness.py pytest tests/conformance/reporting/test_reporting_notification_process_matrix.py -v -ra
;;
*)
echo "Unknown Postgres conformance lane"
exit 1
;;
esac
pg-conformance-required-gate:
name: Postgres conformance tests (Postgres 16)
runs-on: ubuntu-latest
timeout-minutes: 5
permissions: {}
needs: [pg-conformance, pg-reporting-status, pg-reporting-materializer, pg-reporting-receipts, pg-reporting-receipt-compatibility, pg-reporting-feed, pg-reporting-feed-compatibility, pg-reporting-feed-installed, pg-reporting-production, pg-reporting-production-compatibility, pg-reporting-production-installed]
if: ${{ always() }}
steps:
- name: Require every Postgres conformance lane
env:
PG_RESULT: ${{ needs.pg-conformance.result }}
STATUS_RESULT: ${{ needs.pg-reporting-status.result }}
MATERIALIZER_RESULT: ${{ needs.pg-reporting-materializer.result }}
RECEIPTS_RESULT: ${{ needs.pg-reporting-receipts.result }}
RECEIPT_COMPATIBILITY_RESULT: ${{ needs.pg-reporting-receipt-compatibility.result }}
FEED_RESULT: ${{ needs.pg-reporting-feed.result }}
FEED_COMPATIBILITY_RESULT: ${{ needs.pg-reporting-feed-compatibility.result }}
FEED_INSTALLED_RESULT: ${{ needs.pg-reporting-feed-installed.result }}
PRODUCTION_RESULT: ${{ needs.pg-reporting-production.result }}
PRODUCTION_COMPATIBILITY_RESULT: ${{ needs.pg-reporting-production-compatibility.result }}
PRODUCTION_INSTALLED_RESULT: ${{ needs.pg-reporting-production-installed.result }}
run: |
if [ "$PG_RESULT" != "success" ] || [ "$STATUS_RESULT" != "success" ] || [ "$MATERIALIZER_RESULT" != "success" ] || [ "$RECEIPTS_RESULT" != "success" ] || [ "$RECEIPT_COMPATIBILITY_RESULT" != "success" ] || [ "$FEED_RESULT" != "success" ] || [ "$FEED_COMPATIBILITY_RESULT" != "success" ] || [ "$FEED_INSTALLED_RESULT" != "success" ] || [ "$PRODUCTION_RESULT" != "success" ] || [ "$PRODUCTION_COMPATIBILITY_RESULT" != "success" ] || [ "$PRODUCTION_INSTALLED_RESULT" != "success" ]; then
echo "Postgres conformance matrix result: $PG_RESULT"
echo "Reporting status conformance result: $STATUS_RESULT"
echo "Durable materializer conformance result: $MATERIALIZER_RESULT"
echo "Authenticated receipt conformance result: $RECEIPTS_RESULT"
echo "Receipt rolling compatibility result: $RECEIPT_COMPATIBILITY_RESULT"
echo "Frozen feed conformance result: $FEED_RESULT"
echo "Feed rolling compatibility result: $FEED_COMPATIBILITY_RESULT"
echo "Installed frozen feed result: $FEED_INSTALLED_RESULT"
echo "pg-reporting-production result: $PRODUCTION_RESULT"
echo "pg-reporting-production-compatibility result: $PRODUCTION_COMPATIBILITY_RESULT"
echo "pg-reporting-production-installed result: $PRODUCTION_INSTALLED_RESULT"
exit 1
fi
echo "All Postgres conformance lanes passed"
pg-reporting-status:
name: Reporting status conformance (Postgres 16)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_status_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch exact reviewed A, B and C compatibility artifacts
timeout-minutes: 1
run: |
git fetch --no-tags --depth=1 origin \
17ee407ae3978c8a2bb54437287afbf9dafb8130 \
0f34c666ac1961e9832fce43ef0ef6937b3c1dde \
967b6e286301d7e5d089aea6fdbb90bea8ee5a16
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies (with [pg] extra)
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,pg]"
- name: Run status semantics, transaction, clock/process and rolling gates
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_status_test
run: python scripts/reporting_test_harness.py pytest tests/conformance/reporting/test_reporting_status_*.py -v -ra
pg-reporting-materializer:
name: Durable materializer and frozen artifacts (Postgres 16)
runs-on: ubuntu-latest
# Actual wheel builds/installations plus isolated worker processes are a
# separate bounded job; do not consume the existing conformance headroom.
# Seven real installations plus process/crash and Python 3.10 distribution
# cells approach twenty minutes locally; allow runner variance and retain
# five minutes outside the suite for setup and cleanup.
timeout-minutes: 35
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_materializer_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch exact frozen reporting artifacts
timeout-minutes: 2
run: |
git fetch --no-tags --depth=1 origin \
3e76aa54623529a3dda01cd690b8a5c287c75641 \
3c405a21f978ed9d3208611bb4a7a8434a056933 \
037de4ac822ecefb2f95d32c15c297fb4c45d683 \
17ee407ae3978c8a2bb54437287afbf9dafb8130 \
0f34c666ac1961e9832fce43ef0ef6937b3c1dde \
967b6e286301d7e5d089aea6fdbb90bea8ee5a16 \
5487f2bdef23c5102118b305be9e868228f6ce61
- uses: actions/setup-python@v6
id: materializer-python310
with:
python-version: "3.10"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run installed frozen binaries and materializer migrations
# Propagate pytest failures through tee while retaining evidence for upload.
shell: bash
timeout-minutes: 30
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_materializer_test
ADCP_PYTHON310: ${{ steps.materializer-python310.outputs.python-path }}
run: |
python scripts/reporting_test_harness.py pytest \
tests/conformance/reporting/test_reporting_materializer_rolling.py \
tests/conformance/reporting/test_reporting_materializer_migration.py \
tests/conformance/reporting/test_reporting_materializer_process.py \
tests/conformance/reporting/test_reporting_materializer_installed_pg.py \
-v -s -ra | tee materializer-evidence.log
- name: Preserve installed module and worker evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: materializer-evidence-${{ github.run_attempt }}
path: materializer-evidence.log
if-no-files-found: error
pg-reporting-receipts:
name: Authenticated receipts and installed replay (Postgres 16)
runs-on: ubuntu-latest
# Separate databases avoid shared account advisory locks. Keep five minutes
# outside the bounded suite for checkout, installations and cleanup.
timeout-minutes: 35
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_receipts_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
id: receipt-python310
with:
python-version: "3.10"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run receipt transactions, real mounts, crash and installed gates
shell: bash
timeout-minutes: 30
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_receipts_test
ADCP_PYTHON310: ${{ steps.receipt-python310.outputs.python-path }}
run: |
# Explicit pytest paths bypass --ignore; exclude rolling before invocation.
shopt -s nullglob
receipt_tests=()
for test_file in tests/conformance/reporting/test_reporting_receipt_*.py; do
if [[ "$test_file" != tests/conformance/reporting/test_reporting_receipt_rolling.py ]]; then
receipt_tests+=("$test_file")
fi
done
if (( ${#receipt_tests[@]} == 0 )); then
echo "No receipt test files selected" >&2
exit 1
fi
python scripts/reporting_test_harness.py pytest \
"${receipt_tests[@]}" \
-v -s -ra | tee pg-reporting-receipts-evidence.log
- name: Preserve commands, counts, installed provenance and skip reasons
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-receipts-evidence-${{ github.run_attempt }}
path: pg-reporting-receipts-evidence.log
if-no-files-found: error
pg-reporting-receipt-compatibility-shard:
name: Receipt rolling shard (${{ matrix.artifact }})
runs-on: ubuntu-latest
timeout-minutes: 35
permissions:
contents: read
strategy:
fail-fast: false
matrix:
artifact: [beta15, records, integration, a, b, c, b1, b21]
env:
RECEIPT_ARTIFACT: ${{ matrix.artifact }}
RECEIPT_SOURCE_HEAD: ${{ github.event.pull_request.head.sha || github.sha }}
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_receipt_rolling_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
# runner.temp survives checkout cleanup. Setup failures still identify the
# attempted shard; an incomplete artifact can never satisfy the aggregate.
- name: Record attempted shard identity before checkout
timeout-minutes: 1
shell: bash
run: |
python3 - <<'PYTHON'
import json
import os
import re
from pathlib import Path
root = Path(os.environ["RUNNER_TEMP"]) / "receipt-rolling-evidence"
root.mkdir(mode=0o700)
fields = {
"source_head": "RECEIPT_SOURCE_HEAD", "event_sha": "GITHUB_SHA",
"event_name": "GITHUB_EVENT_NAME", "run_id": "GITHUB_RUN_ID",
"run_attempt": "GITHUB_RUN_ATTEMPT", "repository": "GITHUB_REPOSITORY",
"artifact": "RECEIPT_ARTIFACT",
}
values = {key: os.environ[value] for key, value in fields.items()}
valid = (
all(re.fullmatch(r"[0-9a-f]{40}", values[k]) for k in ("source_head", "event_sha"))
and all(re.fullmatch(r"[1-9][0-9]{0,19}", values[k]) for k in ("run_id", "run_attempt"))
and values["repository"] == "adcontextprotocol/adcp-client-python"
and values["event_name"] in {"pull_request", "push"}
and values["artifact"] in {"beta15", "records", "integration", "a", "b", "c", "b1", "b21"}
and (values["event_name"] != "push" or values["source_head"] == values["event_sha"])
)
if not valid:
raise SystemExit("invalid shard attempt identity")
(root / "attempted.json").write_text(json.dumps(values) + "\n")
PYTHON
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
timeout-minutes: 2
with:
ref: ${{ env.RECEIPT_SOURCE_HEAD }}
persist-credentials: false
- name: Fetch all eight exact approved historical artifacts
timeout-minutes: 2
run: |
git fetch --no-tags --depth=1 origin \
3e76aa54623529a3dda01cd690b8a5c287c75641 \
3c405a21f978ed9d3208611bb4a7a8434a056933 \
037de4ac822ecefb2f95d32c15c297fb4c45d683 \
17ee407ae3978c8a2bb54437287afbf9dafb8130 \
0f34c666ac1961e9832fce43ef0ef6937b3c1dde \
967b6e286301d7e5d089aea6fdbb90bea8ee5a16 \
5487f2bdef23c5102118b305be9e868228f6ce61 \
3fd62121c96a074e3ea458c30c5224d6a586f169
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
timeout-minutes: 2
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test and workflow-control dependencies
timeout-minutes: 5
run: pip install -e ".[dev,pg]" "PyYAML==6.0.3"
# The unchanged single node includes its notification branches and all
# builds/migrations/recovery. Inner timeout is 15m plus <=30s cleanup;
# all step ceilings total 33m, below this job's unchanged 35m ceiling.
- name: Verify collection and run one complete historical parameter
shell: bash
timeout-minutes: 18
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_receipt_rolling_test
run: |
timeout --signal=TERM --kill-after=5s 60s python -m unittest discover -s scripts -p test_receipt_rolling_ci.py -v
python scripts/receipt_rolling_ci.py run
- name: Preserve safe partial output and exact shard result
if: always()
timeout-minutes: 3
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: receipt-rolling-shard-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.artifact }}
path: ${{ runner.temp }}/receipt-rolling-evidence/
if-no-files-found: error
pg-reporting-receipt-compatibility:
name: Receipt rolling compatibility (eight actual artifacts)
needs: pg-reporting-receipt-compatibility-shard
if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 8
permissions:
contents: read
actions: read
env:
RECEIPT_SOURCE_HEAD: ${{ github.event.pull_request.head.sha || github.sha }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
timeout-minutes: 2
with:
ref: ${{ env.RECEIPT_SOURCE_HEAD }}
persist-credentials: false
- name: Download this attempt's unmerged shard directories
id: shard-download
timeout-minutes: 3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: receipt-rolling-shard-${{ github.run_id }}-${{ github.run_attempt }}-*
path: receipt-rolling-aggregate
merge-multiple: false
digest-mismatch: error
# Hard job cancellation can prevent an always-upload step. Missing,
# incomplete, duplicate or mismatched evidence is deliberately fatal.
- name: Require every shard and verify exact run evidence
if: ${{ always() && !cancelled() }}
timeout-minutes: 2
env:
GH_TOKEN: ${{ github.token }}
RECEIPT_MATRIX_RESULT: ${{ needs.pg-reporting-receipt-compatibility-shard.result }}
RECEIPT_DOWNLOAD_RESULT: ${{ steps.shard-download.outcome }}
run: python scripts/receipt_rolling_ci.py aggregate
pg-reporting-feed:
name: Frozen authorized feed and mounted isolation (Postgres 16)
runs-on: ubuntu-latest
# Crash processes and shared memory/SQL vectors have their own database
# and bounded suite; setup and cleanup have five minutes of headroom.
timeout-minutes: 25
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_feed_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run frozen feeds, checkpoints, mounts, transaction faults and migrations
shell: bash
timeout-minutes: 20
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_feed_test
run: |
# Filter before pytest receives explicit paths; --ignore cannot do this.
shopt -s nullglob
feed_tests=()
for test_file in tests/conformance/reporting/test_reporting_feed_*.py; do
case "$test_file" in
tests/conformance/reporting/test_reporting_feed_rolling.py|tests/conformance/reporting/test_reporting_feed_packaging.py|tests/conformance/reporting/test_reporting_feed_installed_pg.py|tests/conformance/reporting/test_reporting_feed_hardening_installed.py) ;;
*) feed_tests+=("$test_file") ;;
esac
done
if (( ${#feed_tests[@]} == 0 )); then
echo "No native feed test files selected" >&2
exit 1
fi
python scripts/reporting_test_harness.py pytest \
"${feed_tests[@]}" \
-v -s -ra | tee pg-reporting-feed-evidence.log
- name: Preserve exact public, private, restart and fault evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-feed-evidence-${{ github.run_attempt }}
path: pg-reporting-feed-evidence.log
if-no-files-found: error
pg-reporting-feed-compatibility:
name: Feed rolling compatibility (nine actual artifacts)
runs-on: ubuntu-latest
# Actual B2.1 produces the artifact and actual B2.2 mounts receipts on
# both sides of migration for every historical reader/writer cell.
timeout-minutes: 50
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_feed_rolling_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch all nine exact approved historical artifacts
timeout-minutes: 2
run: |
git fetch --no-tags --depth=1 origin \
3e76aa54623529a3dda01cd690b8a5c287c75641 \
3c405a21f978ed9d3208611bb4a7a8434a056933 \
037de4ac822ecefb2f95d32c15c297fb4c45d683 \
17ee407ae3978c8a2bb54437287afbf9dafb8130 \
0f34c666ac1961e9832fce43ef0ef6937b3c1dde \
967b6e286301d7e5d089aea6fdbb90bea8ee5a16 \
5487f2bdef23c5102118b305be9e868228f6ce61 \
3fd62121c96a074e3ea458c30c5224d6a586f169 \
09fd87f79a746665d828dea66b3a1dd9d1fc189e
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run historical binaries before and after the isolated feed migration
shell: bash
timeout-minutes: 45
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_feed_rolling_test
run: |
python scripts/reporting_test_harness.py pytest \
tests/conformance/reporting/test_reporting_feed_rolling.py \
-v -s -ra | tee pg-reporting-feed-compatibility-evidence.log
- name: Preserve exact artifact origins, catalogs and original replay responses
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-feed-compatibility-evidence-${{ github.run_attempt }}
path: pg-reporting-feed-compatibility-evidence.log
if-no-files-found: error
pg-reporting-feed-installed:
name: Installed frozen feed (Python 3.10 VCS and sdist)
runs-on: ubuntu-latest
timeout-minutes: 50
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_feed_installed_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch the exact integrated B2.3 hardening comparison artifact
timeout-minutes: 1
run: git fetch --no-tags origin 2d777ace7b4bf8be519ce0abd4fd0a25ed4f1da7
- uses: actions/setup-python@v6
id: feed-python310
with:
python-version: "3.10"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run installed base and PostgreSQL restart cells
shell: bash
timeout-minutes: 40
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_feed_installed_test
ADCP_PYTHON310: ${{ steps.feed-python310.outputs.python-path }}
ADCP_HARDENING_EVIDENCE: ${{ runner.temp }}/hardening-installed-evidence
run: |
python scripts/reporting_test_harness.py pytest \
tests/conformance/reporting/test_reporting_feed_packaging.py \
tests/conformance/reporting/test_reporting_feed_installed_pg.py \
tests/conformance/reporting/test_reporting_feed_hardening_installed.py \
-v -s -ra | tee pg-reporting-feed-installed-evidence.log
- name: Preserve installed origins, SQL, strict adopter and cold page evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-feed-installed-evidence-${{ github.run_attempt }}
path: |
pg-reporting-feed-installed-evidence.log
${{ runner.temp }}/hardening-installed-evidence
if-no-files-found: error
pg-reporting-production:
name: Production reporting status, ownership and notification contracts
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 45
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_production_test
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready --health-interval 5s
--health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run complete production and projection conformance
shell: bash
# A passing suite plus harness cleanup can exceed 30 minutes.
timeout-minutes: 40
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_production_test
run: |
# Explicit pytest paths bypass --ignore; preselect and reject empty globs.
shopt -s nullglob
source_tests=()
for test in tests/conformance/reporting/test_reporting_production*.py; do
case "$test" in
*test_reporting_production_packaging.py|*test_reporting_production_rolling.py) continue ;;
esac
source_tests+=("$test")
done
projection_tests=(tests/conformance/reporting/test_reporting_projection*.py)
if (( ${#source_tests[@]} == 0 || ${#projection_tests[@]} == 0 )); then
echo "Production or projection test selection is empty"
exit 1
fi
python scripts/reporting_test_harness.py pytest \
"${source_tests[@]}" \
"${projection_tests[@]}" \
tests/conformance/reporting/test_reporting_tier_projection.py \
tests/conformance/reporting/test_reporting_schedule_schema.py \
tests/test_reporting_capability_models.py \
tests/test_reporting_revision_ownership.py \
tests/test_reporting_production_public.py \
tests/test_schema_datetime_formats.py \
tests/test_rc6_adoption.py \
-v -s -ra | tee pg-reporting-production-evidence.log
- name: Preserve production contract evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-production-evidence-${{ github.run_attempt }}
path: pg-reporting-production-evidence.log
if-no-files-found: error
pg-reporting-production-installed:
name: Installed production reporting (${{ matrix.cell }}, Python 3.10)
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
cell: [base-vcs, base-sdist, pg-vcs, pg-sdist]
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_production_installed_test
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready --health-interval 5s
--health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
id: production-python310
with:
python-version: "3.10"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run installed source-equivalent production contract
shell: bash
timeout-minutes: 45
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_production_installed_test
ADCP_PYTHON310: ${{ steps.production-python310.outputs.python-path }}
ADCP_PRODUCTION_EVIDENCE: ${{ runner.temp }}/production-installed-evidence
PRODUCTION_CELL: ${{ matrix.cell }}
run: |
python scripts/reporting_test_harness.py pytest \
tests/conformance/reporting/test_reporting_production_packaging.py \
-k "$PRODUCTION_CELL" -v -s -ra | tee pg-reporting-production-installed.log
- name: Preserve installed origins, original inner logs and exact asset hashes
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-production-installed-${{ matrix.cell }}-${{ github.run_attempt }}
path: |
pg-reporting-production-installed.log
${{ runner.temp }}/production-installed-evidence
if-no-files-found: error
pg-reporting-production-compatibility:
name: B2.3 and hardening to installed B2.4 activation and restart
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 50
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: adcp_production_rolling_test
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready --health-interval 5s
--health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v6
- name: Fetch integrated feed, hardening and production comparison artifacts
timeout-minutes: 1
run: git fetch --no-tags origin 2d777ace7b4bf8be519ce0abd4fd0a25ed4f1da7 e16eb8cf3074cabd45aab42840950f05ad6d2b43 34c8f6d929aeac3407e2f595104a8e903e572623
- uses: actions/setup-python@v6
id: production-python310
with:
python-version: "3.10"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install test dependencies
run: pip install -e ".[dev,pg]"
- name: Run actual historical page one, activation, SIGKILL and cold continuations
shell: bash
timeout-minutes: 42
env:
ADCP_PG_TEST_URL: postgresql://postgres@localhost:5432/adcp_production_rolling_test
ADCP_PYTHON310: ${{ steps.production-python310.outputs.python-path }}
ADCP_PRODUCTION_EVIDENCE: ${{ runner.temp }}/production-rolling-evidence
run: |
python scripts/reporting_test_harness.py pytest \
tests/conformance/reporting/test_reporting_production_rolling.py \
tests/conformance/reporting/test_reporting_rc6_rolling.py \
-v -s -ra | tee pg-reporting-production-rolling.log
- name: Preserve exact installed historical continuity and fence evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pg-reporting-production-rolling-${{ github.run_attempt }}
path: |
pg-reporting-production-rolling.log
${{ runner.temp }}/production-rolling-evidence
if-no-files-found: error
ipr-policy:
name: IPR Policy / Signature
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
permissions:
contents: read
pull-requests: read # Resolve the actual merged contributions and numeric PR author IDs.
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
# The existing PR/comment workflow records agreements. This job only
# reads the canonical ledger and verifies the actual included PR authors.
# Actions itself supplies the required App 15368 check-run provenance.
- name: Verify contribution agreements for the exact source
run: python3 -m scripts.check_main_policies ipr
env:
GH_TOKEN: ${{ github.token }}
conventional-commits:
name: Validate conventional commit format
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
permissions:
contents: read
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Validate PR source or every integrated main commit and breaking footer
run: python3 -m scripts.check_main_policies conventional
downstream-imports:
name: Downstream import smoke (representative consumer symbols)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
cache-dependency-path: pyproject.toml
- name: Build sdist and install its wheel
run: |
python -m pip install --upgrade pip build
test ! -e src/adcp/_schemas
# The default build path creates the sdist first, then builds the
# wheel from that sdist. This covers both VCS and sdist consumers.
python -m build --outdir dist/
pip install dist/*.whl
- name: Verify VCS-built wheel schemas