The feeder-v1 contract, its fixtures and a fake Feeder #8

Closed
opened 2026-11-12 20:18:15 +00:00 by svc-agent-writer · 1 comment

Parent: #6. Records: ADR 0002 (docs/adr/0002-own-feeder-not-bluebubbles.md), ADR 0004 (docs/adr/0004-source-mac-and-feeder-network-face.md), ADR 0005 (docs/adr/0005-chat-selection-and-redaction.md), ADR 0006 (docs/adr/0006-retention-deletion-and-forget.md).

Human act

ruling: the operator approves dispatch and reads the diff before merge, because this slice fixes the closed list of fields that may leave the Source Mac (CONV-40)

What to build

The wire contract between the Feeder and sync, under contracts/feeder-v1/, with fixtures that both the Swift tests and the Python tests read. A fake Feeder serves the fixtures so that every service slice can be built without a Mac.

The contract is read-only and pull-only. The token travels in an Authorization header and never in a query string. Operations:

  • check: the schema-pin state, the newest row id, the newest message time and the all-time count of hard deletions.
  • new rows: a page of rows in ascending row id from a position.
  • backfill: a page of rows in descending row id from a position.
  • changed rows: a page of rows by edit time from a position. A changed row carries its current body only; an empty body is an Unsend.
  • Recently Deleted: a page of deletion records by deletion time.
  • hard deletions: the deletion records that are still present, by position.
  • Reconcile listing: a page of row identifiers, each with a hash of the body that the Feeder serves.
  • Chats: each Chat with its Members.

A row has a closed field list: its identifiers, its Chat, its sender as a typed Handle (phone, email, other), its date, the flag that says whether the Owner sent it, its Transport, its body, its edit time, its reply target, and a list of attachments as type and size only. A Tapback is a row of its own kind with its sender and its target, and it never has a body.

The contract states what the Feeder never serves: a row that belongs to no Chat, a denied Chat or Handle, the edit history, the text of a deleted part, and a body before Redaction.

Acceptance criteria

  • A schema for every operation, and fixtures that cover: both Transports, a group Chat, an Edit, an Unsend, a Tapback, a reply, a row with an attachment, a move to Recently Deleted, a hard deletion whose record is gone while the count has moved, and a row with a redacted code.
  • A serialisation test refuses any field outside the closed list.
  • The fake Feeder passes the same contract tests that the real Feeder must pass.
  • The contract document lists each field with its meaning, in the words of GLOSSARY.md.

Blocked by

  • none

Filed under: operator word "go" sha256:4cd0e21a9a07

Parent: #6. Records: ADR 0002 (`docs/adr/0002-own-feeder-not-bluebubbles.md`), ADR 0004 (`docs/adr/0004-source-mac-and-feeder-network-face.md`), ADR 0005 (`docs/adr/0005-chat-selection-and-redaction.md`), ADR 0006 (`docs/adr/0006-retention-deletion-and-forget.md`). ## Human act ruling: the operator approves dispatch and reads the diff before merge, because this slice fixes the closed list of fields that may leave the Source Mac (CONV-40) ## What to build The wire contract between the Feeder and `sync`, under `contracts/feeder-v1/`, with fixtures that both the Swift tests and the Python tests read. A fake Feeder serves the fixtures so that every service slice can be built without a Mac. The contract is read-only and pull-only. The token travels in an `Authorization` header and never in a query string. Operations: - **check**: the schema-pin state, the newest row id, the newest message time and the all-time count of hard deletions. - **new rows**: a page of rows in ascending row id from a position. - **backfill**: a page of rows in descending row id from a position. - **changed rows**: a page of rows by edit time from a position. A changed row carries its current body only; an empty body is an Unsend. - **Recently Deleted**: a page of deletion records by deletion time. - **hard deletions**: the deletion records that are still present, by position. - **Reconcile listing**: a page of row identifiers, each with a hash of the body that the Feeder serves. - **Chats**: each Chat with its Members. A row has a closed field list: its identifiers, its Chat, its sender as a typed Handle (`phone`, `email`, `other`), its date, the flag that says whether the Owner sent it, its Transport, its body, its edit time, its reply target, and a list of attachments as type and size only. A Tapback is a row of its own kind with its sender and its target, and it never has a body. The contract states what the Feeder never serves: a row that belongs to no Chat, a denied Chat or Handle, the edit history, the text of a deleted part, and a body before Redaction. ## Acceptance criteria - A schema for every operation, and fixtures that cover: both Transports, a group Chat, an Edit, an Unsend, a Tapback, a reply, a row with an attachment, a move to Recently Deleted, a hard deletion whose record is gone while the count has moved, and a row with a redacted code. - A serialisation test refuses any field outside the closed list. - The fake Feeder passes the same contract tests that the real Feeder must pass. - The contract document lists each field with its meaning, in the words of `GLOSSARY.md`. ## Blocked by - none Filed under: operator word "go" sha256:4cd0e21a9a07
Author
Member

ADR 0011 (pull request #24) adds the single-host shape. The contract does not change. Its transport is HTTP over one TCP port in the split shape, and HTTP over one Unix socket in the single-host shape. The fake Feeder serves both.

ADR 0011 (pull request #24) adds the single-host shape. The contract does not change. Its transport is HTTP over one TCP port in the split shape, and HTTP over one Unix socket in the single-host shape. The fake Feeder serves both.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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/messages-mind-mcp#8
No description provided.