Repository navigation
1651 lines (1624 loc) · 77.9 KB
/
Copy pathci.yml
File metadata and controls
1651 lines (1624 loc) · 77.9 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
# release/** too: a supported line's patches get the same checks.
on:
push:
branches: [main, "release/**"]
pull_request:
branches: [main, "release/**"]
workflow_dispatch:
inputs:
expected_sha:
description: Exact generated translation commit to validate
required: true
type: string
# A new push to a pull request cancels its superseded run. Every push (to main
# or a release/X.Y line) runs to completion in its own group, so a failure on
# one merge commit is never hidden by the next one.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Every job only reads the repository; none needs a write scope.
permissions:
contents: read
env:
PYTHON_VERSION: "3.12"
NODE_VERSION: "22"
RUST_CODEGEN_VERSION: "1.84.1"
# The Python jobs install the exact versions in uv.lock with this uv.
UV_VERSION: "0.12.19"
jobs:
validate-ref:
name: validate requested commit
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Bind a dispatched run to its generated commit
env:
EVENT: ${{ github.event_name }}
REF: ${{ github.ref }}
SHA: ${{ github.sha }}
EXPECTED_SHA: ${{ inputs.expected_sha }}
run: |
if [ "$EVENT" = "workflow_dispatch" ]; then
test "$REF" = "refs/heads/i18n/update"
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
test "$SHA" = "$EXPECTED_SHA"
fi
clickhouse:
needs: validate-ref
name: the ClickHouse release this run tests
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
image: ${{ steps.resolve.outputs.image }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# `latest` moves; every job of this run takes the release it names now.
# Assigned first: a failed lookup then fails the step instead of writing "image=".
- id: resolve
run: |
image=$(bash dev/clickhouse_release.sh)
echo "image=$image" >> "$GITHUB_OUTPUT"
lint:
needs: validate-ref
name: ruff + mypy-gate
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (dev, code extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}" --extra dev --extra code
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: ruff
run: ruff check server extractor sdk/python tests scripts .claude
- name: Install Rust formatter for generated contracts
run: |
rustup toolchain install "$RUST_CODEGEN_VERSION" --profile minimal --component rustfmt
rustup override set "$RUST_CODEGEN_VERSION"
- name: generated Rust contracts are current
run: |
python scripts/codegen/sdk_rust_gen.py --check
python scripts/codegen/sdk_rust_gen.py --fixtures --check
- name: ruff format
run: ruff format --check .
# The Python SDK's op table, TypedDicts and per-op client are generated
# from the registry; a server change that alters a wire shape
# must regenerate them in the same PR.
- name: generated loom/ops.py and loom/client.py are current
run: |
python scripts/codegen/sdk_py_gen.py --check
python scripts/codegen/sdk_py_client_gen.py --check
python scripts/codegen/sdk_py_admin_gen.py --check
# The Codex plugin's hook scripts, library and skills are copies of the
# Claude Code plugin's; a change to one must be synced. The check compares
# bytes and the executable bit.
- name: codex plugin copies are current (bytes and executable bit)
run: python scripts/codegen/agent_plugin_sync.py --check
# docs/reference/ (configuration and the generated tables) and
# server/operations/reach_manifest.py are generated too; the unit suite
# checks them, this step fails faster.
- name: docs reference and reach manifest are current
run: |
python scripts/codegen/settings_reference.py --check
python scripts/codegen/settings_schema.py --check
python scripts/codegen/docs_reference.py --check
python scripts/codegen/op_reach_census.py --check
# The SDK ships py.typed: it is type-checked strictly
# on its own, apart from the server's ratchet below.
- name: mypy --strict on the Python SDK
run: mypy --strict sdk/python/loom
# mypy is gated as a RATCHET, not all-or-nothing: the codebase carries
# pre-existing strict-mypy errors frozen as a baseline in
# scripts/gates/mypy_baseline.json. This step fails only on NEW errors past that
# baseline; lower the baseline as the debt is paid down.
- name: mypy-gate
run: python scripts/gates/mypy_gate.py
# Function-length ratchet: ruff PLR0915 against a
# committed per-file baseline that only shrinks — no file may gain an
# oversized function; today's inventory is tolerated until split.
- name: function-length-gate
run: python scripts/gates/function_length_gate.py
# Content-based, not filename-based: .gitignore only stops the next file
# with a name you already thought of.
- name: no committed secrets
run: python scripts/gates/check_no_secrets.py
# The unit suite in parts, each on its own runner (LOOM_TEST_SHARD, whole files:
# tests/_shards.py) and over that runner's cores; unit-coverage combines their
# coverage data and applies the floors.
unit:
name: pytest unit part ${{ matrix.part }}
needs: [validate-ref, clickhouse]
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# Patch coverage and the unit test instructions also use this part count.
part: [1, 2, 3, 4, 5, 6]
env:
LOOM_CLICKHOUSE_IMAGE: ${{ needs.clickhouse.outputs.image }}
# No ClickHouse service: unit tests skip cleanly when env config is absent.
# The clickhouse binary is installed for clickhouse-local / -format checks.
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
# Node runs the TypeScript SDK's credentials beside the Python SDK's
# (test_sdk_ts_credentials_compat.py).
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (dev, code extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}" --extra dev --extra code
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Fetch origin/main for the migration-number check
run: git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main
# The clickhouse binary (as clickhouse-local and clickhouse-format) for the
# unit tests that run production SQL locally, such as the pending-grant
# checks. The run's release, so the parser and engine are the
# integration job's server.
- name: Install the clickhouse binary
run: |
id=$(docker create "$LOOM_CLICKHOUSE_IMAGE")
sudo docker cp -L "$id:/usr/bin/clickhouse" /usr/local/bin/clickhouse
docker rm "$id" >/dev/null
sudo ln -sf clickhouse /usr/local/bin/clickhouse-format
clickhouse local --query "SELECT version()"
# Random order over one worker per core, so a test that depends on another
# fails here; reproduce a failure as tests/README.md describes.
- name: Install the native worker debugger
if: matrix.part == 3
run: |
sudo apt-get update -qq
sudo apt-get install --no-install-recommends -y gdb
- name: Prepare native diagnostic core policy
if: matrix.part == 3
env:
NATIVE_RUNNER_ENVIRONMENT: ${{ runner.environment }}
NATIVE_JOB_CONTAINER_ID: ${{ job.container.id }}
run: |
test "$NATIVE_RUNNER_ENVIRONMENT" = github-hosted
test "$RUNNER_OS" = Linux
test -z "$NATIVE_JOB_CONTAINER_ID"
sudo sysctl -w kernel.core_pattern=core
test "$(cat /proc/sys/kernel/core_pattern)" = core
- name: Check native worker transport and termination
if: matrix.part == 3
run: |
ulimit -S -c 0
python -m tests.unit.test_native_worker --mechanism
- name: pytest unit (this part, random order)
env:
SHARD_PART: ${{ matrix.part }}
LOOM_TEST_SHARD: ${{ matrix.part }}/${{ strategy.job-total }}
COVERAGE_FILE: .coverage.unit-${{ matrix.part }}
run: |
SEED="${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}"
echo "pytest-randomly seed: $SEED"
NATIVE_ARGS=()
if [ "${SHARD_PART}" = 3 ]; then
ulimit -S -c 0
NATIVE_ARGS=(--native-worker-signatures)
fi
pytest tests/unit -vv -n auto -p randomly -p tests._worker_status --randomly-seed="$SEED" --durations=15 \
"${NATIVE_ARGS[@]}" \
--cov=server --cov=sdk/python/loom --cov-branch --cov-report= \
--junitxml="junit-unit-${SHARD_PART}.xml"
# Also after a failure: the failing part's test times are what a reader needs.
- name: Upload this part's coverage data and test times
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: coverage-unit-${{ matrix.part }}
path: |
.coverage.unit-${{ matrix.part }}
junit-unit-${{ matrix.part }}.xml
.pytest_cache/worker-status/
include-hidden-files: true
if-no-files-found: warn
# A re-run of one failed part replaces the data its first attempt uploaded.
overwrite: true
unit-coverage:
name: pytest unit coverage, floors and bench
needs: [validate-ref, unit]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (dev, code extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}" --extra dev --extra code
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Download the parts' coverage data and test times
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: coverage-unit-*
merge-multiple: true
# This run's seconds per test file, the weights the next split balances by
# when committed as tests/shard_weights.json (tests/_shards.py).
- name: Shard weights from this run
run: python -m tests._shards junit-unit-*.xml
- name: Upload shard weights
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: shard-weights
path: tests/shard_weights.json
# One data file per part, measured in the same checkout path, so they combine
# into the totals one run over the whole suite measures.
- name: Combine coverage (floor 40%)
run: |
coverage combine .coverage.unit-*
coverage report --fail-under=40
coverage xml
coverage json -o coverage.json
# Per-module branch floors for the auth, write-path, erasure, migration
# and supervisor modules (tests/inventory/coverage_floors.toml).
- name: branch-coverage floors
run: python -m tests.inventory.coverage_floors coverage.json
# The published benchmark harnesses' scoring and dataset readers.
- name: pytest bench harnesses
run: pytest bench -q -p randomly --randomly-seed="${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}"
# The generic ingest script's dry run goes through this checkout's CLI.
- name: generic integration sample
run: PYTHON=python bash integrations/generic/test.sh
- name: Upload coverage xml
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: coverage-xml
path: coverage.xml
python-patch-coverage:
name: Python changed-line coverage (report only)
needs: [validate-ref, unit]
if: >-
github.event_name == 'pull_request' && !cancelled() &&
needs.validate-ref.result == 'success' &&
(needs.unit.result == 'success' || needs.unit.result == 'failure')
runs-on: ubuntu-latest
timeout-minutes: 5
continue-on-error: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 2
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Download the parts' coverage data
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: coverage-unit-*
merge-multiple: true
- name: Combine and export the Python coverage data
run: |
parts=(.coverage.unit-{1..6})
for part in "${parts[@]}"; do
test -s "$part"
done
coverage_package=$(python3 - <<'PY'
import tomllib
with open("uv.lock", "rb") as lock:
packages = tomllib.load(lock)["package"]
version = next(package["version"] for package in packages if package["name"] == "coverage")
print(f"coverage=={version}")
PY
)
uvx --python "$PYTHON_VERSION" --from "$coverage_package" coverage combine "${parts[@]}"
# Coverage can skip unreadable data without failing the combine.
for part in "${parts[@]}"; do
test ! -e "$part"
done
uvx --python "$PYTHON_VERSION" --from "$coverage_package" coverage lcov -o "$RUNNER_TEMP/python.lcov"
- name: Report Python changed-line coverage
uses: ClickHouse/loom/.github/actions/patch-coverage@df405e9ed5d032b8248f6cfa8cf87e856685e490
with:
component: Python server and SDK
report: ${{ runner.temp }}/python.lcov
sandbox:
needs: validate-ref
name: repository-job sandbox (real bubblewrap)
runs-on: ubuntu-24.04
timeout-minutes: 15
# The hostile suite skips where bwrap cannot create namespaces;
# LOOM_TEST_REQUIRE_SANDBOX=1 turns that skip into a failure here.
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (dev, code extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}" --extra dev --extra code
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
# prlimit comes with util-linux. Ubuntu 24.04 restricts unprivileged user
# namespaces through AppArmor; the sandbox needs them.
- name: Install bubblewrap and allow user namespaces
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends bubblewrap util-linux
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
bwrap --unshare-user --ro-bind / / true
- name: pytest hostile sandbox suite
env:
LOOM_TEST_REQUIRE_SANDBOX: "1"
run: pytest tests/unit/test_repo_job_sandbox_hostile.py -q -p randomly --randomly-seed="${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}"
schema-check:
name: schema.sql in sync with migrations
needs: [validate-ref, clickhouse]
runs-on: ubuntu-latest
timeout-minutes: 15
env:
LOOM_CLICKHOUSE_IMAGE: ${{ needs.clickhouse.outputs.image }}
LOOM_CH_HOST: localhost
LOOM_CH_PORT: "8123"
LOOM_CH_USER: loom
LOOM_CH_PASSWORD: loomdev
LOOM_CH_DATABASE: loom
LOOM_CH_SECURE: "false"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (no extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}"
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Start ClickHouse (loom config + lemmagen dictionary)
run: bash dev/ci_start_clickhouse.sh
- name: Apply every migration to fresh ClickHouse
run: python -m server.core.schema.migrate
# The ledger reader the deploy preflight relies on:
# after applying everything, ledger ⊆ repo files, no checksum drift,
# nothing pending — or the strict dry-run exits 1.
- name: Ledger is a subset of the repo (strict dry-run)
run: python -m server.core.schema.migrate --dry-run --strict
- name: Verify schemas/schema.sql matches what migrations produce
id: schema_current
run: make schema-check
- name: Export the generated schema after a mismatch
if: failure() && steps.schema_current.outcome == 'failure'
run: python -m scripts.ops.dump_schema --out "$RUNNER_TEMP/schema.sql"
- name: Upload the generated schema after a mismatch
if: failure() && steps.schema_current.outcome == 'failure'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: generated-schema
path: ${{ runner.temp }}/schema.sql
if-no-files-found: error
ts-typecheck:
needs: validate-ref
name: tsc (frontend)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: Install + build frontend (build runs tsc -b internally)
working-directory: frontend
run: |
npm ci --no-audit --no-fund
npm run build
# The index chunk stays under budget and carries
# no surface that opens on a click (a flow dialog, the search body, a view).
- name: bundle budget (index chunk)
working-directory: frontend
run: npm run budget
format:
needs: validate-ref
name: format (biome, prettier, taplo, shfmt)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: install shfmt v3.10.0
run: |
curl -sSfL -o /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.10.0/shfmt_v3.10.0_linux_amd64
echo "1f57a384d59542f8fac5f503da1f3ea44242f46dff969569e80b524d64b71dbc /usr/local/bin/shfmt" | sha256sum -c -
chmod +x /usr/local/bin/shfmt
- name: biome
run: npx --yes @biomejs/biome@2.5.14 format .
# The dashboard's accessibility rules (biome.json overrides): a new violation fails here.
- name: biome lint (dashboard accessibility)
run: npx --yes @biomejs/biome@2.5.14 lint frontend/src
- name: prettier
run: npx --yes prettier@3.9.9 --check --log-level warn "**/*.{md,yml,yaml}"
- name: taplo
run: npx --yes @taplo/cli@0.7.0 format --check
- name: shfmt
run: git ls-files '*.sh' ':!tests/fixtures' | xargs shfmt -d
helm:
needs: validate-ref
name: helm chart (lint, kubeconform)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: install helm v3.16.2 and kubeconform v0.6.7
run: |
curl -sSfL -o /tmp/helm.tgz https://get.helm.sh/helm-v3.16.2-linux-amd64.tar.gz
echo "9318379b847e333460d33d291d4c088156299a26cd93d570a7f5d0c36e50b5bb /tmp/helm.tgz" | sha256sum -c -
tar -xzf /tmp/helm.tgz -C /tmp && sudo install /tmp/linux-amd64/helm /usr/local/bin/helm
curl -sSfL -o /tmp/kubeconform.tgz https://github.com/yannh/kubeconform/releases/download/v0.6.7/kubeconform-linux-amd64.tar.gz
echo "95f14e87aa28c09d5941f11bd024c1d02fdc0303ccaa23f61cef67bc92619d73 /tmp/kubeconform.tgz" | sha256sum -c -
tar -xzf /tmp/kubeconform.tgz -C /tmp && sudo install /tmp/kubeconform /usr/local/bin/kubeconform
- name: lint and validate every overlay
run: |
set -euo pipefail
chart=deploy/helm/loom
secret=$(openssl rand -hex 32)
# Every optional object on, so each template renders at least once.
on=(--set analyticsExport.enabled=true --set analyticsExport.bucket=ci --set analyticsExport.nameKeySecret.name=ci)
extractor=(--set extractor.enabled=true --set secrets.extractorToken="$(openssl rand -hex 24)")
assistant=(--set assistant.enabled=true --set assistant.existingSecret=ci)
# TLS on Loom's port, which the assistant (in "all") cannot reach: its own render.
tls=(--set tls.secretName=ci --set 'ingress.annotations.alb\.ingress\.kubernetes\.io/backend-protocol=HTTPS' --set workers.enabled=true --set networkPolicy.enabled=true "${on[@]}" "${extractor[@]}")
all=(--set workers.enabled=true --set workers.replicaCount=2 --set autoscaling.enabled=true --set networkPolicy.enabled=true --set alerts.prometheusRule.enabled=true --set mustMatchChange.publish=ci --set cellProbe.port=8777 --set settingsFile.memory_ask_recency_weight=0.3 "${on[@]}" "${extractor[@]}" "${assistant[@]}")
# The PrometheusRule's schema: the CRD catalog at a pinned commit.
crd='https://raw.githubusercontent.com/datreeio/CRDs-catalog/c86448cbf1a840ca62d119259864863897c8748a/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
# The Cloud overlay layers on the EKS one.
for overlays in values-eks.yaml values-kind.yaml "values-eks.yaml values-clickhouse-cloud.yaml"; do
args=(--set secrets.jwtSecret="$secret")
for overlay in $overlays; do args+=(-f "$chart/$overlay"); done
helm lint --strict "$chart" "${args[@]}"
helm lint --strict "$chart" "${args[@]}" "${all[@]}"
helm template loom "$chart" "${args[@]}" | kubeconform -strict -summary -kubernetes-version 1.30.0
helm template loom "$chart" "${args[@]}" "${all[@]}" | kubeconform -strict -summary -kubernetes-version 1.30.0 -schema-location default -schema-location "$crd"
helm lint --strict "$chart" "${args[@]}" "${tls[@]}"
helm template loom "$chart" "${args[@]}" "${tls[@]}" | kubeconform -strict -summary -kubernetes-version 1.30.0
done
kubeconform -strict -summary -kubernetes-version 1.30.0 deploy/okf-sync/cronjob.yaml
# Values the chart must refuse, each with its own message. A refused render
# exits non-zero, so the output is taken first and read after.
refused() {
local want=$1; shift
if out=$(helm template loom "$chart" -f "$chart/values-kind.yaml" --set secrets.jwtSecret="$secret" "$@" 2>&1); then
echo "the chart accepted $*"; exit 1
fi
grep -qF "$want" <<<"$out" || { echo "unexpected refusal for $*: $out"; exit 1; }
echo "refused as expected: $*"
}
# The analytics name key reaches the export pod only, never the web pods.
key="set LOOM_ANALYTICS_EXPORT_NAME_KEY through analyticsExport.nameKeySecret"
refused "$key" --set env.LOOM_ANALYTICS_EXPORT_NAME_KEY=x
refused "$key" --set secrets.extra.LOOM_ANALYTICS_EXPORT_NAME_KEY=x
refused "$key" --set "extraEnv[0].name=LOOM_ANALYTICS_EXPORT_NAME_KEY"
refused "$key" --set settingsFile.analytics_export_name_key=x
refused "needs analyticsExport.bucket" "${on[@]}" --set analyticsExport.bucket=
refused "needs analyticsExport.nameKeySecret.name" "${on[@]}" --set analyticsExport.nameKeySecret.name=
refused "expectedBucketOwner must be a quoted string" "${on[@]}" --set analyticsExport.expectedBucketOwner=123456789012
refused "assistant.existingSecret is required" --set assistant.enabled=true
refused "assistant.enabled calls Loom's port over plain HTTP" "${assistant[@]}" --set tls.secretName=ci
refused 'set ingress.annotations."alb.ingress.kubernetes.io/backend-protocol" to HTTPS' -f "$chart/values-eks.yaml" --set tls.secretName=ci
# The release Secret (named after the release here) and envFrom Secrets reach every pod.
shared="is a Secret every web and workers pod loads"
refused "$shared" "${on[@]}" --set analyticsExport.nameKeySecret.name=loom
refused "$shared" "${on[@]}" --set "envFrom[0].secretRef.name=ci"
# The extractor's token is the release Secret's, 16 characters or more.
refused "extractor.enabled needs secrets.extractorToken" --set extractor.enabled=true
refused "secrets.extractorToken must be at least 16 characters" --set extractor.enabled=true --set secrets.extractorToken=short
refused "through secrets.extractorToken, not secrets.extra" "${extractor[@]}" --set secrets.extra.LOOM_DOCUMENT_EXTRACTOR_TOKEN=x
refused "extractor.env cannot set LOOM_EXTRACTOR_TOKEN" "${extractor[@]}" --set extractor.env.LOOM_EXTRACTOR_TOKEN=x
token="set it through secrets.extractorToken"
refused "$token" "${extractor[@]}" --set env.LOOM_DOCUMENT_EXTRACTOR_TOKEN=x
refused "$token" "${extractor[@]}" --set "extraEnv[0].name=LOOM_DOCUMENT_EXTRACTOR_TOKEN"
refused "$token" "${extractor[@]}" --set settingsFile.document_extractor_token=x
# guardMetadata is a bool and egressExcept a list; anything else is refused by name.
refused "networkPolicy.guardMetadata must be true or false" --set-string networkPolicy.guardMetadata=false
refused "networkPolicy.guardMetadata must be true or false" --set networkPolicy.guardMetadata=0
refused "networkPolicy.guardMetadata must be true or false" --set networkPolicy.enabled=true --set-string networkPolicy.guardMetadata=true
refused "networkPolicy.egressExcept must be a list of CIDRs" --set networkPolicy.egressExcept=169.254.169.254/32
refused "networkPolicy.egressExcept must be a list of CIDRs" --set networkPolicy.egressExcept=
refused "networkPolicy.egressExcept must be a list of CIDRs" --set networkPolicy.egressExcept=0
- name: install PyYAML for the render gates
run: |
python3 -m pip install --quiet --user --require-hashes --only-binary=:all: -r scripts/gates/requirements.txt
# What the extractor's pods can be reached by and reach, read off the render.
- name: extractor isolation
run: python3 scripts/gates/helm_extractor_isolation.py
# No Loom pod reaches the instance metadata service, with the policy on or off.
- name: metadata egress
run: python3 scripts/gates/helm_metadata_egress.py
# What LibreChat and its MongoDB can be reached by and reach, read off the render.
- name: assistant isolation
run: python3 scripts/gates/helm_assistant_isolation.py
# The Postgres authority's DSN, password, CA mount and egress, and its refusals.
- name: postgres
run: python3 -m scripts.gates.helm_postgres
# TLS on Loom's port: the Secret's mount, the settings, HTTPS probes, and the refusals.
- name: tls
run: python3 -m scripts.gates.helm_tls
- name: private cell probe
run: python3 -m scripts.gates.helm_cell_probe
agent-plugins:
needs: validate-ref
name: coding-agent plugins (node --test)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
# The hook scripts have no dependencies and run under any Node >= 18;
# their tests are node:test files beside them.
- name: node --test (hook scripts shared by the Claude Code and Codex plugins)
run: node --test integrations/claude-code-plugin/tests/*.test.mjs
- name: node --test (grep shim)
run: node --test integrations/grep-shim/tests/*.test.mjs
- name: Cursor hook sample
run: bash integrations/cursor/test.sh
- name: node --test (Cline hooks)
run: node --test integrations/cline/tests/*.test.mjs
- name: every hook, helper, shim and adapter script parses
run: for f in integrations/{claude-code-plugin,codex-plugin}/{hooks,lib,bin}/*.mjs integrations/cline/*.mjs integrations/grep-shim/bin/* integrations/grep-shim/lib/*.mjs; do node --check "$f"; done
- name: the Node launcher and the Cline hooks parse
run: for f in integrations/{claude-code-plugin,codex-plugin}/bin/loom-node integrations/cline/hooks/*; do sh -n "$f"; done
# The shim is installed by putting grep-shim/bin on PATH, and Cline runs
# the copied hook files directly, so each must be an executable file.
# The plugins' executable bits are compared source-to-copy by the plugin
# sync check in the lint job.
- name: grep shim and Cline hook entry points are executable
run: for f in integrations/grep-shim/bin/* integrations/cline/hooks/*; do test -x "$f" || { echo "::error file=$f::not executable"; exit 1; }; done
# The dashboard's vitest and Playwright suites share nothing but `npm ci`, so
# each runs as its own job, split into parts on separate runners.
frontend-vitest:
needs: validate-ref
name: frontend vitest part ${{ matrix.part }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
part: [1, 2]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: npm ci
working-directory: frontend
run: npm ci --no-audit --no-fund
# Unit tests on the landing rule, formatters, navigation and hooks;
# component tests; axe-core over the components that render in
# isolation. jsdom, no browser.
- name: vitest (unit + component + axe)
working-directory: frontend
env:
SHARD: ${{ matrix.part }}/${{ strategy.job-total }}
run: npm run test -- --shard="$SHARD"
frontend-coverage:
needs: validate-ref
if: github.event_name == 'pull_request'
name: Dashboard changed-line coverage (report only)
runs-on: ubuntu-latest
timeout-minutes: 20
continue-on-error: true
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 2
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: npm ci
run: npm ci --no-audit --no-fund
- name: Collect dashboard unit coverage
run: npm run test -- --coverage --testTimeout=10000
- name: Report dashboard changed-line coverage
uses: ClickHouse/loom/.github/actions/patch-coverage@df405e9ed5d032b8248f6cfa8cf87e856685e490
with:
component: Dashboard
working-directory: frontend
report: frontend/coverage/lcov.info
# With fullyParallel: false, --shard splits by spec file per project, not by test.
frontend-e2e:
needs: validate-ref
name: frontend playwright part ${{ matrix.part }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
part: [1, 2, 3]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: npm ci
working-directory: frontend
run: npm ci --no-audit --no-fund
- name: Install Chromium for Playwright
working-directory: frontend
run: npx playwright install --with-deps chromium
# The e2e specs in frontend/e2e/ against the production build, every /v1/*
# call answered from fixtures.
- name: playwright (e2e specs)
working-directory: frontend
env:
SHARD: ${{ matrix.part }}/${{ strategy.job-total }}
run: npm run e2e -- --shard="$SHARD"
- name: Upload screenshots and traces
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: frontend-e2e-${{ matrix.part }}
path: |
frontend/e2e-screenshots
frontend/test-results
if-no-files-found: ignore
# Each part is its own runner and ClickHouse. The numbered parts each run their
# share of tests/integration (LOOM_TEST_SHARD, whole files: tests/_shards.py)
# against an auth-off server; the isolation gates part runs the provider staging
# tests, the tenant-isolation gates against an auth-on server, and the
# analyzer corpus.
integration:
name: pytest integration ${{ matrix.part == 'isolation' && 'isolation gates' || format('part {0} of 4', matrix.part) }}
needs: [validate-ref, clickhouse]
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
# The part count, 4, is also in this job's name, its LOOM_TEST_SHARD, the docs
# bullet on parts (docs/development/testing.md) and the loom-investigate-ci row.
part: ["1", "2", "3", "4", isolation]
env:
LOOM_CLICKHOUSE_IMAGE: ${{ needs.clickhouse.outputs.image }}
LOOM_CH_HOST: localhost
LOOM_CH_PORT: "8123"
LOOM_CH_USER: loom
LOOM_CH_READER_USER: loom_reader
LOOM_CH_PASSWORD: loomdev
LOOM_CH_DATABASE: loom
LOOM_CH_SECURE: "false"
LOOM_AUTH_REQUIRED: "false"
LOOM_JWT_SECRET: ci-only-jwt-secret
# Overrides reach every web process within one refresh; the tests wait it out.
LOOM_RUNTIME_OVERRIDES_REFRESH_SECONDS: "1"
# Extraction policies and the model-call switch likewise; the tests wait it out.
LOOM_MODEL_CALLS_POLICY_REFRESH_SECONDS: "2"
LOOM_BASE_URL: http://localhost:7777
LOOM_EMBEDDING_MODEL: fake-ngram-1024
LOOM_LLM_PROVIDER: fake
# GH Actions runners are noisy enough that the default per-op
# budgets (e.g. memory.set p99=30ms) fire violations on most
# runs. Multiply by 10x — same knob docs/operations/deployment.md recommends
# for CH Cloud over WAN. Per-op overrides at runtime go through
# POST /v1/admin/budget.set, not env vars.
LOOM_LATENCY_BUDGET_MULTIPLIER: "10"
# Memory webhook tests POST to a receiver on 127.0.0.1 over http, and wait one
# registry refresh after registering.
LOOM_MEMORY_WEBHOOK_ALLOW_HTTP: "true"
LOOM_MEMORY_WEBHOOK_PRIVATE_HOSTS: "127.0.0.1"
LOOM_MEMORY_WEBHOOK_REFRESH_SECONDS: "1"
# A pure web replica: tests that exercise a worker call its `run_pass`
# in-process against their own namespace. A live supervisor's workers
# have no namespace filter and would drain those tests' rows.
LOOM_BACKGROUND_WORKERS: "off"
# A process outside the compose deployment must say who
# launched it, or it refuses to boot.
LOOM_INSTANCE_LABEL: "ci:integration"
# The deployment's default code namespace, which bare code.* calls resolve to.
LOOM_CODE_ORG: ci
LOOM_CODE_NAMESPACE: code-ci
LOOM_CODE_REPO: example/ci
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
id: python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
- name: Install Loom from uv.lock (dev, code extras)
env:
PYTHON_PATH: ${{ steps.python.outputs.python-path }}
run: |
uv sync --locked --python "${PYTHON_PATH}" --extra dev --extra code
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Start ClickHouse (loom config + lemmagen dictionary)
run: bash dev/ci_start_clickhouse.sh
- name: Apply migrations
id: migrate
run: python -m server.core.schema.migrate
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
if: matrix.part == '1'
with:
node-version: ${{ env.NODE_VERSION }}
package-manager-cache: false
- name: Install native framework clients
if: matrix.part == '1'
run: |
uv pip install --python "$PWD/.venv/bin/python" --target "$RUNNER_TEMP/loom-adk-client" './sdk/python[google-adk]'
npm --prefix sdk/typescript ci --no-audit --no-fund
# Provider staging tests create private, UUID-owned copies and run before
# the web process starts, against this job's disposable migrated database.
- name: Provider rebuild storage and recovery
if: matrix.part == 'isolation'
env:
LOOM_PROVIDER_STAGING_LIVE_TEST: "1"
run: >-
pytest -q
tests/integration/test_provider_cache_live_ch.py
tests/integration/test_provider_coordination_live_ch.py
tests/integration/test_provider_cleanup_live_ch.py
tests/integration/test_provider_inventory_live_ch.py
tests/integration/test_provider_large_page_live_ch.py
tests/integration/test_provider_prefix_live_ch.py
tests/integration/test_provider_prepared_live_ch.py
tests/integration/test_provider_publish_live_ch.py
tests/integration/test_provider_source_policy_live_ch.py
tests/integration/test_provider_staging_live_ch.py
tests/integration/test_provider_views_live_ch.py
# The service in front of Loom that signs a token per end user: the part's
# server trusts its fresh key (LOOM_JWT_END_USER_ISSUERS_JSON) and the
# tests sign with it (LOOM_TEST_END_USER_KEY).
- name: Test end-user issuer
id: issuer
if: steps.migrate.outcome == 'success' && !cancelled()
run: python -m tests.end_user_issuer "$RUNNER_TEMP" >> "$GITHUB_ENV"
# The reference extractor, before the part's server boots so it reads its URL and token:
# the ingestion tests' jobs call it and knowledge.inspect reports it as configured.
- name: Start the reference extractor
id: extractor
if: steps.migrate.outcome == 'success' && !cancelled()
run: |
token="$(openssl rand -hex 24)"
echo "::add-mask::$token"
(cd extractor && LOOM_EXTRACTOR_TOKEN="$token" LOOM_EXTRACTOR_PORT=8790 \
nohup python -m loom_extractor > "$GITHUB_WORKSPACE/extractor.log" 2>&1 &)
for _ in $(seq 1 30); do
curl -fsS http://127.0.0.1:8790/healthz >/dev/null && break
sleep 1
done
curl -fsS http://127.0.0.1:8790/healthz >/dev/null || { tail -50 extractor.log; exit 1; }
echo "LOOM_DOCUMENT_EXTRACTOR_URL=http://127.0.0.1:8790" >> "$GITHUB_ENV"
echo "LOOM_DOCUMENT_EXTRACTOR_TOKEN=$token" >> "$GITHUB_ENV"
# The image's launcher with several web processes, so state that must
# bind every process (rate limits, budgets, schema caches) is tested.
- name: Boot control plane
if: matrix.part != 'isolation'
run: |
LOOM_WEB_WORKERS=3 nohup sh scripts/serve.sh > server.log 2>&1 &
for _ in $(seq 1 60); do
curl -fsS http://localhost:7777/v1/health && exit 0
sleep 1
done
echo "control plane never became healthy"
tail -100 server.log
exit 1
- name: Mastra native memory against the control plane
if: matrix.part == '1'
run: |
token="$(python -c 'from server.auth import keyring; keyring.sign_with_root_only(); from server.auth.jwt import mint_token; print(mint_token(subject="ci-mastra-memory", org="mastra-memory-ci", namespaces=["native"], roles=["writer"], ttl_seconds=600, is_service_account=True))')"
echo "::add-mask::$token"
LOOM_API_KEY="$token" LOOM_ORG=mastra-memory-ci LOOM_NAMESPACE=native make test-sdk-mastra-memory-live
# A local S3-compatible store for the document object-store tests
# (tests/integration/test_document_object_store_live.py).
- name: Start a local S3-compatible store
if: matrix.part != 'isolation'
run: |
docker run -d --name loom-ci-s3 -p 127.0.0.1:5000:5000 \
motoserver/moto@sha256:32d7805d8bd4c81db789c4fff2c36f96a8837cbd8e7a3853116b6516b9490dde
for _ in $(seq 1 30); do
curl -sf http://127.0.0.1:5000/ >/dev/null && break
sleep 1
done
curl -sf http://127.0.0.1:5000/ >/dev/null
echo "LOOM_TEST_S3_ENDPOINT=http://127.0.0.1:5000" >> "$GITHUB_ENV"
# Split ordinary integration cases over the parts. Signed mirror HTTP cases
# run in the authenticated isolation step below on every pull request.
- name: pytest (this part of tests/integration)
if: matrix.part != 'isolation'
env:
LOOM_TEST_SHARD: ${{ matrix.part }}/4
run: >-
pytest tests/integration -q --durations=20
--ignore=tests/integration/test_mirror_checked_search_http.py
--ignore=tests/integration/test_mirror_checked_list_http.py
- name: Native Google ADK live tests (Python and TypeScript)
if: matrix.part == '1'
run: python -m tests.integration._google_adk_ci "$RUNNER_TEMP/loom-adk-client"
# The tenant-isolation gates against a server that enforces auth. The numbered
# parts run them with auth off, where every token is ignored and no refusal is seen.
# The three checks of the isolation gates part are independent: a failure in
# one does not skip the next (`!cancelled()`).
- name: Boot control plane with auth on
id: auth_on
if: >-
matrix.part == 'isolation' && !cancelled() && steps.issuer.outcome == 'success'
&& steps.extractor.outcome == 'success'
env:
LOOM_AUTH_REQUIRED: "true"
LOOM_INSTANCE_LABEL: "ci:integration-auth"
# The analysis probe cases wait on it; the test step reads the same value.
LOOM_CH_ANALYSIS_PROBE_INTERVAL_S: "10"
# Several web processes, as the image runs: a session's MCP calls and its
# DELETE land on different ones.
run: |
LOOM_WEB_WORKERS=3 PORT=7778 nohup sh scripts/serve.sh > server-auth.log 2>&1 &
for _ in $(seq 1 60); do
curl -fsS http://localhost:7778/v1/health && exit 0
sleep 1
done
echo "auth-on control plane never became healthy"
tail -100 server-auth.log
exit 1
- name: Install the native Pipecat client in a private target
id: pipecat_client
if: matrix.part == 'isolation' && !cancelled() && steps.auth_on.outcome == 'success'
run: >-
uv pip install --python "$PWD/.venv/bin/python"
--target "$RUNNER_TEMP/loom-pipecat-native" './sdk/python[pipecat]'
- name: Native Pipecat text example (auth on)
id: pipecat_demo
if: >-
matrix.part == 'isolation' && !cancelled()
&& steps.pipecat_client.outcome == 'success'
timeout-minutes: 5
env:
LOOM_AUTH_REQUIRED: "true"
LOOM_BASE_URL: http://localhost:7778
PYTHONPATH: ${{ runner.temp }}/loom-pipecat-native
LOOM_PIPECAT_EVIDENCE: ${{ runner.temp }}/pipecat-native-demo.json
run: pytest -q tests/integration/_pipecat_demo_ci.py
- name: Upload native Pipecat qualification receipt
if: >-
always() && matrix.part == 'isolation'
&& steps.pipecat_demo.outcome != 'skipped'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: pipecat-native-demo
path: ${{ runner.temp }}/pipecat-native-demo.json
if-no-files-found: error
- name: Install Rust for live SDK contracts
if: matrix.part == 'isolation' && !cancelled() && steps.auth_on.outcome == 'success'
run: rustup toolchain install stable --profile minimal
- name: Rust SDK live contracts (auth on)
if: matrix.part == 'isolation' && !cancelled() && steps.auth_on.outcome == 'success'
timeout-minutes: 6
env:
LOOM_AUTH_REQUIRED: "true"
LOOM_BASE_URL: http://localhost:7778
RUSTUP_TOOLCHAIN: stable
run: pytest -q tests/integration/_rust_sdk_ci.py
- name: pytest isolation gates (auth on)
if: matrix.part == 'isolation' && !cancelled() && steps.auth_on.outcome == 'success'
env:
LOOM_AUTH_REQUIRED: "true"