Vendor pinned Mail peer v1 fixtures and verify round trips #62

Merged
Collaborator

Summary

Slice B of #52. It vendors the seven Mail peer v1 fixtures from the pinned Mail Mind commit and round-trips each one through the peer.* models.

 tests/contracts/mind-v1/
 ├── schema.json
 ├── requests.schema.json
 ├── ORIGIN
 ├── LICENSE
+└── fixtures/          # byte-exact from dev/mail-mind-mcp@21e279da
+    ├── busy.json
+    ├── changes.json
+    ├── evidence.json
+    ├── expired-cursor.json
+    ├── info.json
+    ├── no-evidence.json
+    └── snapshot.json
 tests/test_contract_conformance.py
+  test_wire_every_fixture_validates_and_round_trips[<7 fixtures>]

For each fixture the test:

validate fixture against the vendored schema.json
model = RESPONSE_MODELS[fixture.type]
assert model.model_validate(fixture).model_dump(mode="json", by_alias=True) == fixture

The test also asserts that fixtures/ holds exactly the seven files. This is wire conformance only, not recovery conformance: it proves the consumer's models read every field Mail Mind's fixtures carry. It does not exercise retry, backoff or checkpoint recovery.

Evidence

Byte identity against the pin, PIN=21e279da85eab618ef8c76bc8211daaa23e0ca52, for each <name> of the seven:

git -C /Users/piers/src/mailmind-mcp cat-file blob "${PIN}:contracts/mind-v1/fixtures/<name>" | cmp - tests/contracts/mind-v1/fixtures/<name>
Fixture cmp exit
busy.json 0
changes.json 0
evidence.json 0
expired-cursor.json 0
info.json 0
no-evidence.json 0
snapshot.json 0
  • Before: tests/test_contract_conformance.py had 4 tests; make check gave 376 passed.
  • After: the module gives 11 passed (4 existing plus 7 parametrised). make check gives 383 passed, 5 skipped, 4 deselected. ruff check, ruff format --check and mypy strict are clean.

Merge Danger

Door: two-way

Test fixtures and one test module only. No production code changes.

Blast Radius: tests

A future Mail Mind contract change that alters a fixture fails this test until the pin and fixtures move together, which is the intent.

Closes #58
Closes #52

🤖 Generated with Claude Code
Co-Authored-By: gpt-6.1-sol noreply@openai.com

## Summary Slice B of #52. It vendors the seven Mail peer v1 fixtures from the pinned Mail Mind commit and round-trips each one through the `peer.*` models. ```diff tests/contracts/mind-v1/ ├── schema.json ├── requests.schema.json ├── ORIGIN ├── LICENSE +└── fixtures/ # byte-exact from dev/mail-mind-mcp@21e279da + ├── busy.json + ├── changes.json + ├── evidence.json + ├── expired-cursor.json + ├── info.json + ├── no-evidence.json + └── snapshot.json tests/test_contract_conformance.py + test_wire_every_fixture_validates_and_round_trips[<7 fixtures>] ``` For each fixture the test: ```text validate fixture against the vendored schema.json model = RESPONSE_MODELS[fixture.type] assert model.model_validate(fixture).model_dump(mode="json", by_alias=True) == fixture ``` The test also asserts that `fixtures/` holds exactly the seven files. This is wire conformance only, not recovery conformance: it proves the consumer's models read every field Mail Mind's fixtures carry. It does not exercise retry, backoff or checkpoint recovery. ## Evidence Byte identity against the pin, `PIN=21e279da85eab618ef8c76bc8211daaa23e0ca52`, for each `<name>` of the seven: ``` git -C /Users/piers/src/mailmind-mcp cat-file blob "${PIN}:contracts/mind-v1/fixtures/<name>" | cmp - tests/contracts/mind-v1/fixtures/<name> ``` | Fixture | `cmp` exit | |---|---| | busy.json | 0 | | changes.json | 0 | | evidence.json | 0 | | expired-cursor.json | 0 | | info.json | 0 | | no-evidence.json | 0 | | snapshot.json | 0 | - **Before:** `tests/test_contract_conformance.py` had 4 tests; `make check` gave 376 passed. - **After:** the module gives 11 passed (4 existing plus 7 parametrised). `make check` gives 383 passed, 5 skipped, 4 deselected. ruff check, ruff format --check and mypy strict are clean. ## Merge Danger **Door:** two-way Test fixtures and one test module only. No production code changes. **Blast Radius:** tests A future Mail Mind contract change that alters a fixture fails this test until the pin and fixtures move together, which is the intent. Closes #58 Closes #52 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Vendor pinned Mail peer v1 fixtures and verify round trips
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
4240392f9e
Copy all seven fixtures byte-exact from Mail Mind pin 21e279da85eab618ef8c76bc8211daaa23e0ca52. Add parametrised schema validation, exact fixture-set checks and lossless peer-model round trips using wire aliases. Update the module documentation while preserving its wire-conformance-only scope.

Validation: all seven cmp checks passed; all seven fixture tests collected and passed; module regression passed all 11 tests. make check passed with 383 passed, 5 skipped and 4 deselected, compared with the pristine baseline's 376 passed and unchanged skips and deselections.

Closes #58
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
svc-svd-writer deleted branch feat/svd-dev-people-mind-mcp-58-vendor-the-mail-peer-v1-fixtu-029715c4 2026-11-04 00:47:02 +00:00
Sign in to join this conversation.
No description provided.