Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Work items

MOTIR-2234Done

11.6.8 End-to-end conformance — drive BOTH live surfaces over real HTTP against the same rows and assert the payloads agree

This story's E2E, in the form the story actually has: it ships no UI, so the end-to-end proof is two live surfaces, one database, and a diff. 11.6.6's guard compares SCHEMAS; this compares what the two surfaces actually emit at runtime, which is a different fact and the one a consumer experiences.

The walk

For each shared resource: create a row via one surface, read it back through both — MCP over /api/mcp with a real PAT, REST over /api/v1 with the same PAT — against real Postgres, and assert the payloads carry the same values under the same keys. Cover a work item with children and dependency edges, a ready row, a sprint, a project, and one work-loop resource. Include the shapes that are easy to get subtly wrong: an empty collection, a null-vs-absent field, a paged read, and an item whose readiness is cascade-blocked.

Two surfaces can validate against one schema and still disagree — a mapper reading the wrong DTO field produces a payload that is structurally perfect and factually wrong, and no schema check can see it. That gap is precisely what this card exists to close.

Also assert what did NOT change

Drive each tool over real HTTP and confirm its name, tools/list description, argument shape and scope are what they were before the story — the freedom the epic's architecture depends on, checked from outside the process rather than by reading the source.

Scope BOUNDARY

Ends at the two-surface conformance walk. It does NOT re-test either surface's own behaviour — 11.2/11.3's conformance suites and the MCP suites own those. It does NOT duplicate 11.6.7's in-process seam tests; this one goes over sockets. It does NOT change product code: a disagreement it finds is a defect to file against the owning card.

No acceptance video — no user-observable surface, exempt under the non-UI carve-out, exactly as 11.111.3 were. The conformance run is the receipt.

Acceptance criteria

  • For each shared resource, the same underlying row is read through both surfaces over real HTTP with a real PAT against real Postgres, and the payloads are asserted to carry the same values under the same keys.
  • The awkward cases are covered per resource: empty collection, null-vs-absent field, a paged read, and a cascade-blocked readiness verdict.
  • A work item with children asserts the per-child dependency edges match on both surfaces — the exact divergence that started this story.
  • Each tool's name, description, argument shape and scope are asserted unchanged, read from a live tools/list rather than from source.
  • A deliberately introduced mapper bug — right shape, wrong source field — is caught by this suite and NOT by the schema guard, proving the two checks are not redundant.
  • The suite runs in the CI lane that has Postgres, and is a required check.

Context refs

  • 11.6.6 — the schema-level guard this deliberately does not duplicate.
  • tests/helpers/mcpHttpServer.ts — the real-route-over-a-socket adapter; note it serves /api/mcp today and this suite needs the v1 routes too, which take DYNAMIC path segments the adapter has never had to match. 11.5.8 teaches it exactly that — check origin/main before building a second one, and reuse rather than fork.
  • tests/mcp/story-roundtrip.test.ts — the shipped MCP round-trip whose shape this extends to two surfaces.
  • tests/api/v1/ — 11.2/11.3's external-client conformance suites, for the REST half's idiom.
  • Story: 11.6.