Skip to content

test(cross-impl): make the Python signer parity check run for real#45

Open
ucekmez wants to merge 1 commit into
mainfrom
test/cross-impl-real-signer-parity
Open

test(cross-impl): make the Python signer parity check run for real#45
ucekmez wants to merge 1 commit into
mainfrom
test/cross-impl-real-signer-parity

Conversation

@ucekmez

@ucekmez ucekmez commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Problem

The only cross-language test that exercises the Python signer against the canonical wire fixtures always skipped:

  1. it imported eep_signer, which is not installed in test.sh --full or the cross-impl CI job (CI installs it only into a throwaway audit venv), and
  2. even when present, it called verify(..., now=...) — a kwarg the Python signer doesn't accept — skipping on the TypeError.

So a green suite proved nothing about Python↔TS signing parity.

Fix

  • Rewrite the test to assert sign() reproduces the recorded fixture signature — deterministic, no frozen-time dependency, no silent skip.
  • Gate on EEP_REQUIRE_PYTHON_SIGNER=1: a missing import becomes a failure, not a skip.
  • Install eep-signer-python and set that flag in test.sh and both CI workflows (publish.yml, test.yml).

Verification

  • With the signer present + flag set → passes.
  • Flag set but signer absent → fails loudly (no silent skip).
  • Both workflows are valid YAML.

Surfaced by the EEP protocol audit (finding python-signer-crossimpl-check-dead).

🤖 Generated with Claude Code

The sole cross-language signer wire-vector test always skipped: it
imported eep_signer (not installed in test.sh or the cross-impl CI job)
and, even when present, called verify() with a `now` kwarg the Python
signer does not accept — skipping on the TypeError. Rewrite it to assert
sign() reproduces the recorded fixture signature (deterministic, no
frozen-time dependency), and to FAIL rather than skip when
EEP_REQUIRE_PYTHON_SIGNER=1. Install eep-signer-python and set that flag
in test.sh and both CI workflows so the parity check can never silently
no-op where it is meant to run.

Surfaced by the EEP protocol audit (finding python-signer-crossimpl-check-dead).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugur Cekmez <ucekmez@gmail.com>
Copilot AI review requested due to automatic review settings June 1, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the cross-implementation conformance suite actually exercise the Python signer against the canonical signature fixtures, preventing the previous “green but skipped” parity check.

Changes:

  • Replace the Python-signer cross-impl test from a verify(..., now=...) flow (which could skip) to a deterministic sign()-equals-fixture assertion.
  • Add EEP_REQUIRE_PYTHON_SIGNER=1 gating so missing eep_signer becomes a hard failure in CI / test.sh --full.
  • Install the Python signer in test.sh --full and in the cross-impl steps of the test.yml and publish.yml workflows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/cross-impl/test_conformance_fixtures.py Reworks Python signer parity test to compare sign() output to recorded fixture signature; adds env-gated import behavior.
test.sh Installs the Python signer and sets EEP_REQUIRE_PYTHON_SIGNER=1 when running cross-impl tests in --full mode.
.github/workflows/test.yml Ensures cross-impl CI job installs the Python signer and enforces it via EEP_REQUIRE_PYTHON_SIGNER=1.
.github/workflows/publish.yml Ensures publish preflight cross-impl tests install the Python signer and enforce it via EEP_REQUIRE_PYTHON_SIGNER=1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 115 to +119
try:
from eep_signer import EEPSigner # type: ignore
except Exception:
except Exception as exc: # pragma: no cover - exercised via env in CI
if os.environ.get("EEP_REQUIRE_PYTHON_SIGNER") == "1":
raise AssertionError(
Comment thread test.sh

set +e
(cd "$ROOT_DIR" && pip install -r tests/cross-impl/requirements.txt -q && EEP_BASE_URL="${EEP_BASE_URL:-http://localhost:3002}" python3 -m pytest tests/cross-impl -v)
(cd "$ROOT_DIR" && pip install -r tests/cross-impl/requirements.txt -q && pip install -e packages/eep-signer-python -q && EEP_REQUIRE_PYTHON_SIGNER=1 EEP_BASE_URL="${EEP_BASE_URL:-http://localhost:3002}" python3 -m pytest tests/cross-impl -v)
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.

2 participants