Vendor the Mail peer v1 fixtures and round-trip them through the peer models #58

Closed
opened 2026-11-03 22:35:38 +00:00 by piers · 3 comments
Owner

Outcome

People Mind carries the seven Mail peer v1 fixtures from the pinned Mail Mind commit, and a test proves that each one validates against the vendored schema.json and survives a lossless round trip through the peer.* models.

Context

Parent: dev/people-mind-mcp#52. The #52 architect gate (2026-11-04) split #52 into two slices, because the full issue needs 17 written files and the spec ceiling is 16.

  • Slice A (the #52 PR, Refs #52) vendors schema.json, requests.schema.json, ORIGIN and LICENSE into tests/contracts/mind-v1/, and adds tests/test_contract_conformance.py with the request wire-conformance tests.
  • This issue is slice B. It extends slice A's directory and test module, so dispatch it only after the slice A PR merges.

Both slices must land before rc.7 is cut (ADR 0009 Amendment 1, item 1).

Scope

The pin is 21e279da85eab618ef8c76bc8211daaa23e0ca52 in dev/mail-mind-mcp. A local copy is at /Users/piers/src/mailmind-mcp. The fixture names were read at the pin on 2026-11-04 (git ls-tree):

  1. Vendor these seven files byte-exact from contracts/mind-v1/fixtures/ into tests/contracts/mind-v1/fixtures/. Use git cat-file blob, not git show.
    • busy.json
    • changes.json
    • evidence.json
    • expired-cursor.json
    • info.json
    • no-evidence.json
    • snapshot.json
  2. Extend tests/test_contract_conformance.py with test_wire_every_fixture_validates_and_round_trips. For each fixture it:
    • validates the fixture against the vendored schema.json;
    • parses it into the peer.* model chosen by its type;
    • asserts model_dump(mode="json", by_alias=True) == fixture, so no field the consumer reads is lost.
  3. Do not edit ORIGIN. Slice A writes it without a file list, so that this slice can add files.

Acceptance criteria

  • For each of the seven fixtures, git -C <mailmind> cat-file blob 21e279da…:contracts/mind-v1/fixtures/<name> | cmp - tests/contracts/mind-v1/fixtures/<name> exits 0. The PR body quotes the commands and exit codes.
  • tests/contracts/mind-v1/fixtures/ holds exactly the seven files above.
  • The new test is collected and passes for all seven fixtures under python3 -m pytest. make check passes.
  • The PR body says Closes #<this issue> and Closes #52, because this slice completes #52.

Filed under: operator word "ruling leans accepted" sha256:74398dc59a44 (#52 #53 #54 gate)

## Outcome People Mind carries the seven Mail peer v1 fixtures from the pinned Mail Mind commit, and a test proves that each one validates against the vendored `schema.json` and survives a lossless round trip through the `peer.*` models. ## Context Parent: dev/people-mind-mcp#52. The #52 architect gate (2026-11-04) split #52 into two slices, because the full issue needs 17 written files and the spec ceiling is 16. - Slice A (the #52 PR, `Refs #52`) vendors `schema.json`, `requests.schema.json`, `ORIGIN` and `LICENSE` into `tests/contracts/mind-v1/`, and adds `tests/test_contract_conformance.py` with the request wire-conformance tests. - This issue is slice B. It extends slice A's directory and test module, so dispatch it only after the slice A PR merges. Both slices must land before rc.7 is cut (ADR 0009 Amendment 1, item 1). ## Scope The pin is `21e279da85eab618ef8c76bc8211daaa23e0ca52` in `dev/mail-mind-mcp`. A local copy is at `/Users/piers/src/mailmind-mcp`. The fixture names were read at the pin on 2026-11-04 (`git ls-tree`): 1. Vendor these seven files byte-exact from `contracts/mind-v1/fixtures/` into `tests/contracts/mind-v1/fixtures/`. Use `git cat-file blob`, not `git show`. - `busy.json` - `changes.json` - `evidence.json` - `expired-cursor.json` - `info.json` - `no-evidence.json` - `snapshot.json` 2. Extend `tests/test_contract_conformance.py` with `test_wire_every_fixture_validates_and_round_trips`. For each fixture it: - validates the fixture against the vendored `schema.json`; - parses it into the `peer.*` model chosen by its `type`; - asserts `model_dump(mode="json", by_alias=True) == fixture`, so no field the consumer reads is lost. 3. Do not edit `ORIGIN`. Slice A writes it without a file list, so that this slice can add files. ## Acceptance criteria - [ ] For each of the seven fixtures, `git -C <mailmind> cat-file blob 21e279da…:contracts/mind-v1/fixtures/<name> | cmp - tests/contracts/mind-v1/fixtures/<name>` exits 0. The PR body quotes the commands and exit codes. - [ ] `tests/contracts/mind-v1/fixtures/` holds exactly the seven files above. - [ ] The new test is collected and passes for all seven fixtures under `python3 -m pytest`. `make check` passes. - [ ] The PR body says `Closes #<this issue>` and `Closes #52`, because this slice completes #52. Filed under: operator word "ruling leans accepted" sha256:74398dc59a44 (#52 #53 #54 gate)
Collaborator

⏸ SVD architect gate: dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity standard · dispatch effort medium

Run: 20261103T234408Z-53815731

Held because: CLEAN but 2 open risk(s) (2 verification) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. Pinned fixtures must be readable and exactly seven at dispatch. Neither this Half-A sandbox nor slice A's could read /Users/piers/src/mailmind-mcp. What changed since slice A: the names now come from the architect's git ls-tree at the pin (issue body, 2026-11-04), and the #52 gate confirmed the commit resolves on the architect side. Check: lean step 0 git -C /Users/piers/src/mailmind-mcp ls-tree --name-only 21e279da85eab618ef8c76bc8211daaa23e0ca52 contracts/mind-v1/fixtures/ lists exactly the seven names, and the PR body quotes seven cmp exit-0 results. Dispatch halts otherwise. [verification]
  2. The real fixtures have not been round-tripped. The schema and model field sets match field for field, and a synthetic probe passed for all five types, but the strict models (_uuid lowercase canonical form, the timestamp regex, extra=forbid) could reject a fixture the schema accepts. Check: the seven parametrised items of test_wire_every_fixture_validates_and_round_trips pass under uv run python3 -m pytest tests/test_contract_conformance.py -q. If any fails, dispatch halts with the fixture name and the error, and does not edit mailpeer.py or loosen the test; a model fix becomes a new issue. [verification]

Change: Step 0: from /Users/piers/src/mailmind-mcp at pin 21e279da…, run git ls-tree --name-only on contracts/mind-v1/fixtures/ and confirm it lists exactly the seven names; halt otherwise and do not clone. Copy each fixture with git cat-file blob <pin>:contracts/mind-v1/fixtures/<name> > tests/contracts/mind-v1/fixtures/<name> and verify it with cmp. In tests/test_contract_conformance.py, add FIXTURE_DIR, a sorted FIXTURES tuple and RESPONSE_MODELS: dict[str, type[peer.Model]] (info/changes/snapshot/evidence/error → peer.Info/Changes/Snapshot/Evidence/PeerError) after PIN (line 25). Add @pytest.mark.parametrize("name", FIXTURES) def test_wire_every_fixture_validates_and_round_trips(name: str) -> None, placed between the malformed-request test (104) and the ORIGIN test (115). The test asserts the directory listing equals FIXTURES, validates the fixture against the root schema.json with jsonschema.validators.validator_for(schema)(schema) (the idiom at lines 32-33 and 87-88), and asserts RESPONSE_MODELS[fixture["type"]].model_validate(fixture).model_dump(mode="json", by_alias=True) == fixture. Also replace the stale 'slice B (#58)' docstring sentence on line 5. Parametrisation mirrors tests/test_mailpeer.py:347. Do not touch src/, ORIGIN, LICENSE, the schemas, pyproject or uv.lock. If a real fixture fails the round trip, halt and report it; do not edit mailpeer.py.

Files: tests/contracts/mind-v1/fixtures/busy.json · tests/contracts/mind-v1/fixtures/changes.json · tests/contracts/mind-v1/fixtures/evidence.json · tests/contracts/mind-v1/fixtures/expired-cursor.json · tests/contracts/mind-v1/fixtures/info.json · tests/contracts/mind-v1/fixtures/no-evidence.json · tests/contracts/mind-v1/fixtures/snapshot.json · tests/test_contract_conformance.py

Decision: accept the 2 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through.md

### ⏸ SVD architect gate: dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `standard` · dispatch effort `medium` **Run:** `20261103T234408Z-53815731` **Held because:** CLEAN but 2 open risk(s) (2 verification) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Pinned fixtures must be readable and exactly seven at dispatch. Neither this Half-A sandbox nor slice A's could read /Users/piers/src/mailmind-mcp. What changed since slice A: the names now come from the architect's `git ls-tree` at the pin (issue body, 2026-11-04), and the #52 gate confirmed the commit resolves on the architect side. Check: lean step 0 `git -C /Users/piers/src/mailmind-mcp ls-tree --name-only 21e279da85eab618ef8c76bc8211daaa23e0ca52 contracts/mind-v1/fixtures/` lists exactly the seven names, and the PR body quotes seven `cmp` exit-0 results. Dispatch halts otherwise. [verification] 2. The real fixtures have not been round-tripped. The schema and model field sets match field for field, and a synthetic probe passed for all five types, but the strict models (_uuid lowercase canonical form, the timestamp regex, extra=forbid) could reject a fixture the schema accepts. Check: the seven parametrised items of test_wire_every_fixture_validates_and_round_trips pass under `uv run python3 -m pytest tests/test_contract_conformance.py -q`. If any fails, dispatch halts with the fixture name and the error, and does not edit mailpeer.py or loosen the test; a model fix becomes a new issue. [verification] **Change:** Step 0: from /Users/piers/src/mailmind-mcp at pin 21e279da…, run `git ls-tree --name-only` on contracts/mind-v1/fixtures/ and confirm it lists exactly the seven names; halt otherwise and do not clone. Copy each fixture with `git cat-file blob <pin>:contracts/mind-v1/fixtures/<name> > tests/contracts/mind-v1/fixtures/<name>` and verify it with `cmp`. In tests/test_contract_conformance.py, add FIXTURE_DIR, a sorted FIXTURES tuple and RESPONSE_MODELS: dict[str, type[peer.Model]] (info/changes/snapshot/evidence/error → peer.Info/Changes/Snapshot/Evidence/PeerError) after PIN (line 25). Add `@pytest.mark.parametrize("name", FIXTURES) def test_wire_every_fixture_validates_and_round_trips(name: str) -> None`, placed between the malformed-request test (104) and the ORIGIN test (115). The test asserts the directory listing equals FIXTURES, validates the fixture against the root schema.json with `jsonschema.validators.validator_for(schema)(schema)` (the idiom at lines 32-33 and 87-88), and asserts `RESPONSE_MODELS[fixture["type"]].model_validate(fixture).model_dump(mode="json", by_alias=True) == fixture`. Also replace the stale 'slice B (#58)' docstring sentence on line 5. Parametrisation mirrors tests/test_mailpeer.py:347. Do not touch src/, ORIGIN, LICENSE, the schemas, pyproject or uv.lock. If a real fixture fails the round trip, halt and report it; do not edit mailpeer.py. **Files:** `tests/contracts/mind-v1/fixtures/busy.json` · `tests/contracts/mind-v1/fixtures/changes.json` · `tests/contracts/mind-v1/fixtures/evidence.json` · `tests/contracts/mind-v1/fixtures/expired-cursor.json` · `tests/contracts/mind-v1/fixtures/info.json` · `tests/contracts/mind-v1/fixtures/no-evidence.json` · `tests/contracts/mind-v1/fixtures/snapshot.json` · `tests/test_contract_conformance.py` **Decision:** accept the 2 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through completed integration verify.

  • PR: #62
  • Branch: feat/svd-dev-people-mind-mcp-58-vendor-the-mail-peer-v1-fixtu-029715c4
  • Commit: 4240392f9e
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: False
  • Check ci/woodpecker/pr/validation: pending https://ci.groupthink.asia/repos/73/pipeline/23/1
  • Checks: PR #62 head 4240392: ci/woodpecker/pr/validation pending. Local checks green (11/11 module tests, 383 passed full suite, ruff and mypy clean). One PR-metadata blocker: body lacks Closes #52 and the seven cmp results.
  • Blocker: PR metadata: add Closes #52 to the PR body (the spec requires both Closes #58 and Closes #52), quote the seven cmp commands with their exit=0 results, and state that the test is wire conformance only, not recovery conformance.
  • Blocker cause: work for PR metadata: add Closes #52 to the PR body (the spec requires both Closes #58 and Closes #52), quote the seven cmp commands with their exit=0 results, and state that the test is wire conformance only, not recovery conformance.; no denial signature; evidence: PR #62 body ends with only Closes #58; it says "all seven cmp checks passed" but quotes no commands, and has no wire-only statement.
  • Warning: Woodpecker CI ci/woodpecker/pr/validation is still pending at verify time.
  • Warning: PR body carries a Co-Authored-By: gpt-6.1-sol trailer, which is not the expected PR attribution line; cosmetic.
  • Rework: 0 round(s), outcome metadata-hold
  • Escalation: PR metadata blocker(s) hold the run without code rework: PR metadata: add Closes #52 to the PR body (the spec requires both Closes #58 and Closes #52), quote the seven cmp commands with their exit=0 results, and state that the test is wire conformance only, not recovery conformance.; edit the PR title or body by hand, then re-run integrate or run the own-execution gate.
  • Decision: resolve the blockers above and rerun integrate, or park this PR for a human?
spec-verify-dispatch Half B for dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/62 - Branch: feat/svd-dev-people-mind-mcp-58-vendor-the-mail-peer-v1-fixtu-029715c4 - Commit: 4240392f9e778849604bee430e45f9c0def13124 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: False - Check ci/woodpecker/pr/validation: pending https://ci.groupthink.asia/repos/73/pipeline/23/1 - Checks: PR #62 head 4240392: ci/woodpecker/pr/validation pending. Local checks green (11/11 module tests, 383 passed full suite, ruff and mypy clean). One PR-metadata blocker: body lacks `Closes #52` and the seven cmp results. - Blocker: PR metadata: add `Closes #52` to the PR body (the spec requires both `Closes #58` and `Closes #52`), quote the seven `cmp` commands with their `exit=0` results, and state that the test is wire conformance only, not recovery conformance. - Blocker cause: work for PR metadata: add `Closes #52` to the PR body (the spec requires both `Closes #58` and `Closes #52`), quote the seven `cmp` commands with their `exit=0` results, and state that the test is wire conformance only, not recovery conformance.; no denial signature; evidence: PR #62 body ends with only `Closes #58`; it says "all seven cmp checks passed" but quotes no commands, and has no wire-only statement. - Warning: Woodpecker CI ci/woodpecker/pr/validation is still pending at verify time. - Warning: PR body carries a `Co-Authored-By: gpt-6.1-sol` trailer, which is not the expected PR attribution line; cosmetic. - Rework: 0 round(s), outcome metadata-hold - Escalation: PR metadata blocker(s) hold the run without code rework: PR metadata: add `Closes #52` to the PR body (the spec requires both `Closes #58` and `Closes #52`), quote the seven `cmp` commands with their `exit=0` results, and state that the test is wire conformance only, not recovery conformance.; edit the PR title or body by hand, then re-run integrate or run the own-execution gate. - Decision: resolve the blockers above and rerun integrate, or park this PR for a human?
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through completed integration verify.

  • PR: #62
  • Branch: feat/svd-dev-people-mind-mcp-58-vendor-the-mail-peer-v1-fixtu-029715c4
  • Commit: 4240392f9e
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/23/1
  • Checks: PR #62 head 4240392: ci/woodpecker/pr/validation success (1/1 required check green). Local: 7 fixtures cmp-identical to pin, 11 conformance tests pass, ruff, ruff format and mypy clean, 383 passed in full suite.
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261104T003724Z-029715c4 --confirm-merge)
spec-verify-dispatch Half B for dev/people-mind-mcp#58 vendor-the-mail-peer-v1-fixtures-and-round-trip-them-through completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/62 - Branch: feat/svd-dev-people-mind-mcp-58-vendor-the-mail-peer-v1-fixtu-029715c4 - Commit: 4240392f9e778849604bee430e45f9c0def13124 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/23/1 - Checks: PR #62 head 4240392: ci/woodpecker/pr/validation success (1/1 required check green). Local: 7 fixtures cmp-identical to pin, 11 conformance tests pass, ruff, ruff format and mypy clean, 383 passed in full suite. - Decision: review the PR and merge? (`codex-svd ship --run-id 20261104T003724Z-029715c4 --confirm-merge`)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/people-mind-mcp#58
No description provided.