CI: run the Python unit suite so the vs-context7 drift guards fire at the PR gate (#48)#54
Merged
Merged
Conversation
…e PR gate (#48) The drift guards (README-block byte guard + the chart's matplotlib-version- independent SEMANTIC guard) were genuinely fail-loud but only when a human remembered to run pytest — CI ran swift only, so a hand-edited front-page competitive number merged green. The Python unit suite makes zero network / `claude -p` calls (that policy protected the LIVE eval, not the unit tests), so it now runs per push/PR on ubuntu. Deliberately excluded from CI: `--emit-chart --check` (byte-compare — false-drifts across matplotlib/freetype; the semantic guard re-renders in CI's own env and compares <text> content instead) and run_eval.py (real `claude -p` calls — stays periodic/manual). Docs: CLAUDE.md + Testing.md/-zh-TW CI sections updated (live eval wording scoped to run_eval.py). No test-count changes. Injection surface: the new job contains no ${{ }} expressions at all — static commands + stock actions only.
This was referenced Jul 5, 2026
Closed
- permissions: contents: read at workflow level — pip install + pytest execute PR-influenced code; don't hand them a write-scoped GITHUB_TOKEN (MEDIUM). - timeout-minutes: 10 on the python job (hang guard). - De-overclaim "matplotlib-version-independent by design" → COORDINATE-independent: the semantic guard compares <text> content, so a matplotlib serialization change (entities/tspan) would false-FAIL loudly, never silently pass; matplotlib gets a <4 upper bound via #49's requirements pin (MEDIUM, ci.yml comment + Testing ×2). - README.md CI line was left stale ("swift only") — now includes the Python suite (MEDIUM). - Guard-scope comment: the two R1 HIGHs (snapshot-SOURCE tampering passes the PR gate; wiki Home numbers zero-guarded) are closed by sibling #49/PR #55 — the freshness workflow gains a pull_request paths trigger on the sample (live registry check on any PR touching it) and a Home-pages guard test; landed there to avoid cross-PR count/file conflicts. Cross-referenced in both issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #48
Summary
Adds a
python-testsjob toci.yml(ubuntu,pip install -r evals/look-up/requirements.txt,pytest evals/look-up/tests/). The 66-test unit suite makes zero network /claude -pcalls — the "Python stays off CI" policy protected the live eval, not the unit tests. With this job, the front-page vs-context7 guards fire mechanically at the PR gate: the README-block drift guard and the chart's matplotlib-version-independent semantic guard.Deliberately excluded:
--emit-chart --check(byte-compare — false-drifts across matplotlib/freetype versions per #50 verify; the semantic guard re-renders in CI's own env and compares<text>content instead) andrun_eval.py(realclaude -pcalls — remains periodic/manual).Changes
.github/workflows/ci.yml— newpython-testsjob (no${{ }}expressions: static commands + stock actions only; injection-safe by construction)CLAUDE.md+docs/wiki/Testing.md/Testing-zh-TW.md— CI-policy prose updated (live-eval wording scoped torun_eval.py)Verification
This PR's own CI run is the end-to-end test — the
python unit testscheck below must appear and pass. Local simulation of the exact step: 66 passed.Checklist
Refs #48)python unit testscheck green +/idd-verify #48🤖 /idd-all batch (#48 #49) · Do NOT add Closes/Fixes/Resolves.