-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurrent-code-selected-verification.yml
More file actions
166 lines (148 loc) · 5.88 KB
/
Copy pathcurrent-code-selected-verification.yml
File metadata and controls
166 lines (148 loc) · 5.88 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
name: Current code selected verification
on:
pull_request:
branches: [main]
paths:
- "src/backend/**"
- "tests/**"
- "tools/scripts/**"
- "infra/db/alembic/**"
- "pyproject.toml"
- "poetry.lock"
- ".github/workflows/current-code-selected-verification.yml"
push:
branches: [main]
paths:
- "src/backend/**"
- "tests/**"
- "tools/scripts/**"
- "infra/db/alembic/**"
- "pyproject.toml"
- "poetry.lock"
- ".github/workflows/current-code-selected-verification.yml"
workflow_dispatch:
permissions:
contents: read
env:
PYTHONPATH: src/backend
ZUNO_TEST_DATABASE_URL: postgresql+psycopg://zuno:zuno@localhost:5432/zuno_test
concurrency:
group: current-code-selected-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
selected-code-verification:
runs-on: ubuntu-24.04
timeout-minutes: 25
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: zuno
POSTGRES_PASSWORD: zuno
POSTGRES_DB: zuno_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U zuno -d zuno_test"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
uses: actions/cache@v4
with:
path: .venv
key: current-code-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies from lock file
run: |
poetry install --with test --sync --no-interaction --no-root
git diff --exit-code -- poetry.lock pyproject.toml
- name: Prepare verification artifacts
run: mkdir -p artifacts/current-code-verification
- name: Compile current code and tests
run: |
set -o pipefail
poetry run python -m compileall -q src/backend/zuno tests \
2>&1 | tee artifacts/current-code-verification/compile.log
- name: Verify current model boundary
run: |
set -o pipefail
{
poetry run python tools/scripts/verify_model_gateway_bypass.py --strict
poetry run python tools/scripts/verify_model_gateway_boundaries.py
} 2>&1 | tee artifacts/current-code-verification/model-boundary.log
- name: Run current runtime-batch contract verifiers
run: |
set -o pipefail
{
poetry run python tools/scripts/verify_knowledge_runtime_batch.py
poetry run python tools/scripts/verify_capability_runtime_batch.py
poetry run python tools/scripts/verify_tool_runtime_batch.py
poetry run python tools/scripts/verify_model_gateway_runtime_batch.py
poetry run python tools/scripts/verify_security_runtime_batch.py
} 2>&1 | tee artifacts/current-code-verification/runtime-batches.log
- name: Run selected current behavior tests
run: |
set -o pipefail
poetry run pytest -q \
tests/domain/test_domain_mutation.py \
tests/domain/test_domain_mutation_sqlalchemy.py \
tests/knowledge/test_citation_provenance.py \
tests/repo/test_wave001_domain_mutation_migration.py \
tests/architecture/test_p0_v4_execution.py \
tests/api/test_product_application_boundaries.py \
tests/agent/runtime/test_runtime_plan_execution.py \
tests/agent/runtime/test_runtime_interrupt_resume.py \
tests/agent/runtime/test_runtime_restart_persistence.py \
tests/agent/runtime/test_runtime_reflection_replan.py \
tests/agent/runtime/test_runtime_tool_idempotency.py \
tests/agent/runtime/test_runtime_model_roles.py \
tests/knowledge/test_knowledge_runtime_batch.py \
tests/capability/test_capability_runtime_batch.py \
tests/capability/test_tool_runtime_batch.py \
tests/security/test_security_governance_contract.py \
tests/security/test_security_runtime_batch.py \
tests/platform/test_observability_runtime_batch.py \
tests/retrieval/test_standard_retrieval_composition.py \
tests/retrieval/test_enhanced_retrieval_composition.py \
tests/retrieval/test_retrieval_mode_semantics.py \
tests/evals/test_model_gateway_cost_latency.py \
tests/evals/test_multihop_eval_metrics.py \
tests/evals/test_multihop_eval_route_policy.py \
tests/evals/test_runtime_evidence_binding.py \
--junitxml=artifacts/current-code-verification/pytest-results.xml \
-p no:cacheprovider \
2>&1 | tee artifacts/current-code-verification/pytest.log
- name: Record verification context
if: always()
run: |
{
echo "commit_sha=${GITHUB_SHA}"
echo "event=${GITHUB_EVENT_NAME}"
echo "python=3.12"
echo "dependency_source=poetry.lock"
echo "postgresql_integration=${ZUNO_TEST_DATABASE_URL:+configured}"
} > artifacts/current-code-verification/context.txt
- name: Upload current code verification artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: current-code-selected-verification
path: artifacts/current-code-verification
if-no-files-found: error
retention-days: 14