Feeder policy: the deny list, Redaction and what never leaves the Mac #10

Open
opened 2026-11-12 20:18:15 +00:00 by svc-agent-writer · 2 comments

Parent: #6. Records: ADR 0005 (docs/adr/0005-chat-selection-and-redaction.md), SECURITY.md.

Human act

ruling: the operator approves dispatch and reads the diff before merge, because this slice decides which text leaves the Source Mac, and the operator reviews the keyword list and the code fixtures (CONV-40)

What to build

The policy that the Feeder alone applies, at the one filter point that the read service leaves.

  • Deny list. A file on the Source Mac, empty by default. An entry is typed: chat: names one Chat, and handle: names one Handle. A handle: entry drops the one-to-one Chat with that Handle and that Handle's rows in every group Chat. The Feeder applies the list to every operation, including the Reconcile listing and every count.
  • Redaction. In a body that holds a code keyword, the Feeder replaces every candidate code token with the marker [code]. The keyword list is broad and covers several languages. The rules lean towards replacing too much. Redaction applies to every body, including a body served again after an Edit. No switch turns it off.
  • Tapbacks. The Feeder never serves the body of a Tapback.
  • Body hash. The hash in the Reconcile listing is computed over the body after Redaction.
  • A change to the deny list takes effect at the next request, with no restart.

Acceptance criteria

  • A fixture set of real one-time-code formats, in several languages and from several kinds of sender, guards the rules. Each fixture names its source format, and none is a live code.
  • A property test loads a deny list and the code fixtures, calls every operation, and finds no denied row, no denied Handle and no fixture code in any response.
  • A test proves that a hash never covers a body before Redaction.
  • A test proves that appointment and delivery notices with no code keyword keep their text.
  • The accepted risk is documented beside the rules: a code with no keyword is not redacted.
  • The full contract run (conformance.run) passes against the real Feeder at every step, and its expected-failure marker from #9 is removed.
  • The policy that this slice installs declares that it serves the owner's history. The Feeder then accepts a history under the user's Library/Messages/ directory; with the open policy of #9 it still refuses one.
  • README.md and SECURITY.md state that the Feeder exists, what it never serves and how the deny list and Redaction apply. The sentence "The real feeder is not built yet" goes, and the tests that assert it change with it.
  • The status line of contracts/feeder-v1/README.md states that a real Feeder exists and passes the tests in that directory.

Blocked by

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

Parent: #6. Records: ADR 0005 (`docs/adr/0005-chat-selection-and-redaction.md`), `SECURITY.md`. ## Human act ruling: the operator approves dispatch and reads the diff before merge, because this slice decides which text leaves the Source Mac, and the operator reviews the keyword list and the code fixtures (CONV-40) ## What to build The policy that the Feeder alone applies, at the one filter point that the read service leaves. - **Deny list.** A file on the Source Mac, empty by default. An entry is typed: `chat:` names one Chat, and `handle:` names one Handle. A `handle:` entry drops the one-to-one Chat with that Handle and that Handle's rows in every group Chat. The Feeder applies the list to every operation, including the Reconcile listing and every count. - **Redaction.** In a body that holds a code keyword, the Feeder replaces every candidate code token with the marker `[code]`. The keyword list is broad and covers several languages. The rules lean towards replacing too much. Redaction applies to every body, including a body served again after an Edit. No switch turns it off. - **Tapbacks.** The Feeder never serves the body of a Tapback. - **Body hash.** The hash in the Reconcile listing is computed over the body after Redaction. - **A change to the deny list** takes effect at the next request, with no restart. ## Acceptance criteria - A fixture set of real one-time-code formats, in several languages and from several kinds of sender, guards the rules. Each fixture names its source format, and none is a live code. - A property test loads a deny list and the code fixtures, calls every operation, and finds no denied row, no denied Handle and no fixture code in any response. - A test proves that a hash never covers a body before Redaction. - A test proves that appointment and delivery notices with no code keyword keep their text. - The accepted risk is documented beside the rules: a code with no keyword is not redacted. - The full contract run (`conformance.run`) passes against the real Feeder at every step, and its expected-failure marker from #9 is removed. - The policy that this slice installs declares that it serves the owner's history. The Feeder then accepts a history under the user's `Library/Messages/` directory; with the open policy of #9 it still refuses one. - `README.md` and `SECURITY.md` state that the Feeder exists, what it never serves and how the deny list and Redaction apply. The sentence "The real feeder is not built yet" goes, and the tests that assert it change with it. - The status line of `contracts/feeder-v1/README.md` states that a real Feeder exists and passes the tests in that directory. ## Blocked by - #9 - #62 Filed under: operator word "go" sha256:4cd0e21a9a07
Author
Member

Facts from a read-only schema probe that the operator ran on a real Messages history (2026-11-13). The probe printed names, value types and yes-or-no answers only. It printed no text, no identifier and no count. These facts bind this slice and #9. The notes on #9 say which read of MessagesCore serves which contract field.

Confirmed. MessagesCore 0.2.0 agrees with each.

  • No column that the package reads is missing.
  • Both hard-deletion tables exist: deleted_messages and sync_deleted_messages. sqlite_sequence holds an integer entry for message and for deleted_messages.
  • chat.style is 43 for a Chat with two or more Members, and 45 for a Chat with one Member.
  • message.date, message.date_edited and the deletion time are integers in nanoseconds. date_edited is 0 for a message with no edit.
  • A Tapback target occurs in all three stored forms: a bare guid, bp: and p:N/. No malformed p: value occurs.
  • A row that the Owner sent can hold a Handle. The package gives no sender for such a row.
  • A message can belong to no Chat. No message belongs to two Chats.
  • A reply names its target.
  • One index starts with message.date and one with message.guid. date_edited has no index.

New. This slice decides each.

  • Codes that are not a Tapback. associated_message_type also holds 2, 3, 1000 and 4000. Each such row names a target. MessagesCore gives no Tapback and no target for them, so the package returns each as a plain message row. I do not know what code 4000 means. Recommendation: the Feeder does not serve a row with one of these codes in 0.1.0, the list of what never leaves the Mac says so, and a fixture covers code 1000 and code 4000.
  • Records that are not messages. message.item_type holds 0 to 6. The contract serves no record such as a renamed group, so the Feeder serves a row with item_type 0 only. A fixture covers one row with a type above 0.
  • A group with no Member row. A Chat with style 43 and no Member row exists. The Feeder serves it as a group with an empty list of Members. A fixture covers it.
  • Not seen, so not verified. The history holds no RCS row and no row with code 2007. The RCS clause of ADR 0005 still waits. rcs is a value on the wire and has no fixture.
Facts from a read-only schema probe that the operator ran on a real Messages history (2026-11-13). The probe printed names, value types and yes-or-no answers only. It printed no text, no identifier and no count. These facts bind this slice and `#9`. The notes on `#9` say which read of `MessagesCore` serves which contract field. **Confirmed. `MessagesCore` 0.2.0 agrees with each.** - No column that the package reads is missing. - Both hard-deletion tables exist: `deleted_messages` and `sync_deleted_messages`. `sqlite_sequence` holds an integer entry for `message` and for `deleted_messages`. - `chat.style` is 43 for a Chat with two or more Members, and 45 for a Chat with one Member. - `message.date`, `message.date_edited` and the deletion time are integers in nanoseconds. `date_edited` is 0 for a message with no edit. - A Tapback target occurs in all three stored forms: a bare `guid`, `bp:` and `p:N/`. No malformed `p:` value occurs. - A row that the Owner sent can hold a Handle. The package gives no sender for such a row. - A message can belong to no Chat. No message belongs to two Chats. - A reply names its target. - One index starts with `message.date` and one with `message.guid`. `date_edited` has no index. **New. This slice decides each.** - **Codes that are not a Tapback.** `associated_message_type` also holds 2, 3, 1000 and 4000. Each such row names a target. `MessagesCore` gives no Tapback and no target for them, so the package returns each as a plain message row. I do not know what code 4000 means. Recommendation: the Feeder does not serve a row with one of these codes in `0.1.0`, the list of what never leaves the Mac says so, and a fixture covers code 1000 and code 4000. - **Records that are not messages.** `message.item_type` holds 0 to 6. The contract serves no record such as a renamed group, so the Feeder serves a row with `item_type` 0 only. A fixture covers one row with a type above 0. - **A group with no Member row.** A Chat with style 43 and no Member row exists. The Feeder serves it as a group with an empty list of Members. A fixture covers it. - **Not seen, so not verified.** The history holds no RCS row and no row with code 2007. The RCS clause of ADR 0005 still waits. `rcs` is a value on the wire and has no fixture.
Author
Member

Ruling for this slice: Redaction also covers keys and passwords, on by default, for every Consumer, with no switch.

  • The Feeder replaces a secret-shaped token with a marker when the body holds a key or password keyword, in the same way as a code.
  • The rules lean towards replacing too much, as for codes.
  • Reason: message text is written by other people, and a password or key that leaves the Source Mac cannot be recalled.

The spec of this slice states the keyword list, the token shapes and the marker, with fixtures that hold no live secret.

Filed under: operator word "Accept. Proceed" (2026-11-14)

Ruling for this slice: Redaction also covers keys and passwords, on by default, for every Consumer, with no switch. - The Feeder replaces a secret-shaped token with a marker when the body holds a key or password keyword, in the same way as a code. - The rules lean towards replacing too much, as for codes. - Reason: message text is written by other people, and a password or key that leaves the Source Mac cannot be recalled. The spec of this slice states the keyword list, the token shapes and the marker, with fixtures that hold no live secret. Filed under: operator word "Accept. Proceed" (2026-11-14)
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#10
No description provided.