Skip to content

CI: run the Python unit suite so the vs-context7 drift guards fire at the PR gate (#48)#54

Merged
kiki830621 merged 2 commits into
mainfrom
idd/48-wire-vs-context7-drift-check-into-ci
Jul 5, 2026
Merged

CI: run the Python unit suite so the vs-context7 drift guards fire at the PR gate (#48)#54
kiki830621 merged 2 commits into
mainfrom
idd/48-wire-vs-context7-drift-check-into-ci

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Refs #48

Summary

Adds a python-tests job to ci.yml (ubuntu, pip install -r evals/look-up/requirements.txt, pytest evals/look-up/tests/). The 66-test unit suite makes zero network / claude -p calls — 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) and run_eval.py (real claude -p calls — remains periodic/manual).

Changes

  • .github/workflows/ci.yml — new python-tests job (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 to run_eval.py)

Verification

This PR's own CI run is the end-to-end test — the python unit tests check below must appear and pass. Local simulation of the exact step: 66 passed.

Checklist

  • Diagnose (decision documented: full unit suite > single --check step)
  • Implement (1 commit, Refs #48)
  • Verify: the PR's own python unit tests check green + /idd-verify #48
  • Verify-gated — no close trailer; manual /idd-close after merge

🤖 /idd-all batch (#48 #49) · Do NOT add Closes/Fixes/Resolves.

…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.
- 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.
@kiki830621
kiki830621 merged commit c525407 into main Jul 5, 2026
2 checks passed
@kiki830621
kiki830621 deleted the idd/48-wire-vs-context7-drift-check-into-ci branch July 5, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant