Skip to content

Commit 6e674c4

Browse files
authored
Merge pull request #53 from FluffyAIcode/AgentMemory/v030-pr-n1-remove-verifier-doubles-8e7f
PR-N1: remove verifier-protocol test doubles from Linux CI gate
2 parents ac3b1da + 48f43a3 commit 6e674c4

11 files changed

Lines changed: 1653 additions & 1514 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,23 @@ jobs:
7272
# PYTHONPATH route avoids a setuptools build step in CI.
7373
PYTHONPATH: .:sdks/python
7474
run: |
75-
pytest \
75+
# PR-N1 (ADR 0008) split: this gate covers ONLY
76+
# verifier-independent code. The Linux runner cannot load
77+
# real Qwen3 weights, and PR-N1 retired the FakeVerifier
78+
# test double that previously stood in for them.
79+
# Verifier-dependent modules — currently
80+
# ``inference_engine.session.coordinator`` and
81+
# ``inference_engine.session.generator`` — move to the
82+
# tests/integration/ suite, gated on Mac M4 / CUDA hosts.
83+
#
84+
# Coverage is invoked via ``coverage run -m pytest`` rather
85+
# than ``pytest --cov=`` to avoid a torch+pytest-cov race
86+
# at conftest-import time on the hosted Linux runner
87+
# (PR-N1 hit "module functions cannot set METH_CLASS or
88+
# METH_STATIC" / SIGSEGV when --cov= started the tracer
89+
# before torch's C extension finished initializing).
90+
# Same pattern Mac M4 reviewer scripts use.
91+
coverage run -m pytest \
7692
tests/inference_engine/server/ \
7793
tests/inference_engine/memory/ \
7894
tests/inference_engine/scheduler/ \
@@ -82,19 +98,13 @@ jobs:
8298
tests/sdk/python/ \
8399
tests/training/repr_align/ \
84100
tests/backends/mlx/test_env.py \
85-
--cov=inference_engine.server \
86-
--cov=inference_engine.memory \
87-
--cov=inference_engine.scheduler \
88-
--cov=inference_engine.pipeline \
89-
--cov=inference_engine.session \
90-
--cov=inference_engine.bench \
91-
--cov=kakeya \
92-
--cov=training.repr_align \
93-
--cov-report=term \
94-
--cov-report=xml:coverage.xml \
95-
--cov-fail-under=100 \
96101
--junitxml=junit.xml \
97102
-v
103+
coverage report \
104+
--include='inference_engine/server/*,inference_engine/memory/*,inference_engine/scheduler/*,inference_engine/pipeline/*,inference_engine/session/store.py,sdks/python/kakeya/*,training/repr_align/*' \
105+
--fail-under=100
106+
coverage xml -o coverage.xml \
107+
--include='inference_engine/server/*,inference_engine/memory/*,inference_engine/scheduler/*,inference_engine/pipeline/*,inference_engine/session/store.py,sdks/python/kakeya/*,training/repr_align/*'
98108
99109
- name: Upload coverage artifact
100110
if: always()

results/platform-tests/smoke-all-prs-1780370637.junit.xml

Lines changed: 368 additions & 0 deletions
Large diffs are not rendered by default.

scripts/review_pr_n1_on_mac.sh

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/usr/bin/env bash
2+
# Mac M4 review aid for PR-N1 (no-test-doubles cleanup, scope =
3+
# verifier-protocol mirror classes).
4+
#
5+
# PR-N1 retired FakeVerifier, _LyingVerifier, _RegressingVerifier,
6+
# and _LyingFakeVerifier from the Linux test tree. Their dispatch /
7+
# state-mirror tests moved to tests/integration/test_coordinator_real.py
8+
# and tests/integration/test_generator_real.py, where they run
9+
# against the real Qwen3-0.6B SinkWindowVerifier instead of a
10+
# hand-coded mirror. This script runs that integration suite on
11+
# Apple Silicon and produces the JSON evidence reviewers commit.
12+
#
13+
# Produces 1 artifact:
14+
#
15+
# results/platform-tests/pr-n1-mac-integration-tests-<unix>.json
16+
# pytest -m integration tests/integration/ — coordinator and
17+
# generator integration tests against real Qwen3 + the existing
18+
# INV-3 byte-exact GA gate. Acceptance: all tests pass.
19+
#
20+
# Usage (from repo root, on Mac M4 / arm64):
21+
#
22+
# bash scripts/review_pr_n1_on_mac.sh
23+
#
24+
# Then commit:
25+
#
26+
# git add results/platform-tests/pr-n1-mac-*
27+
# git commit -m "Mac M4 review evidence for PR-N1"
28+
# git push
29+
30+
set -euo pipefail
31+
32+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
33+
cd "$ROOT"
34+
35+
stamp="$(date +%s)"
36+
out_dir="results/platform-tests"
37+
mkdir -p "$out_dir"
38+
39+
junit="$out_dir/pr-n1-mac-integration-tests-${stamp}.junit.xml"
40+
report="$out_dir/pr-n1-mac-integration-tests-${stamp}.json"
41+
42+
echo "==> integration suite (PR-N1 migrated tests + INV-3 GA gate)"
43+
PYTHONPATH=.:sdks/python python3 -m pytest \
44+
-m integration \
45+
tests/integration/ \
46+
--junitxml="$junit" \
47+
-v
48+
49+
PYTHONPATH=.:sdks/python python3 - "$junit" "$report" <<'PY'
50+
import json
51+
import platform
52+
import sys
53+
import xml.etree.ElementTree as ET
54+
55+
junit_path, out_path = sys.argv[1:3]
56+
jr = ET.parse(junit_path).getroot()
57+
58+
testsuites = list(jr.iter("testsuite"))
59+
total_tests = sum(int(ts.get("tests", "0")) for ts in testsuites)
60+
total_failures = sum(int(ts.get("failures", "0")) for ts in testsuites)
61+
total_errors = sum(int(ts.get("errors", "0")) for ts in testsuites)
62+
total_skipped = sum(int(ts.get("skipped", "0")) for ts in testsuites)
63+
64+
cases = []
65+
for tc in jr.iter("testcase"):
66+
cases.append({
67+
"classname": tc.get("classname"),
68+
"name": tc.get("name"),
69+
"time": float(tc.get("time", 0.0)),
70+
"outcome": (
71+
"failed" if tc.find("failure") is not None
72+
else "errored" if tc.find("error") is not None
73+
else "skipped" if tc.find("skipped") is not None
74+
else "passed"
75+
),
76+
})
77+
78+
report = {
79+
"schema_version": 1,
80+
"kind": "pr_n1_mac_integration_tests",
81+
"host": {
82+
"platform": platform.platform(),
83+
"machine": platform.machine(),
84+
"python": platform.python_version(),
85+
},
86+
"junit": {
87+
"tests": total_tests,
88+
"failures": total_failures,
89+
"errors": total_errors,
90+
"skipped": total_skipped,
91+
"cases": cases,
92+
},
93+
}
94+
with open(out_path, "w", encoding="utf-8") as fh:
95+
json.dump(report, fh, indent=2)
96+
print(f" -> {out_path}")
97+
PY
98+
99+
echo
100+
echo "==> Done. Commit:"
101+
echo " git add $out_dir/pr-n1-mac-*"
102+
echo " git commit -m 'Mac M4 review evidence for PR-N1'"
103+
echo " git push"

0 commit comments

Comments
 (0)