Feeder: the read service on MessagesCore with one private-network address #9

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

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 0006 (docs/adr/0006-retention-deletion-and-forget.md), ADR 0008 (docs/adr/0008-feeder-package-signing-and-update.md).

Human act

ruling: the operator approves dispatch and reads the diff before merge, because this slice is the program that holds Full Disk Access and opens a network port on the Source Mac (CONV-40)

What to build

A Swift package in feeder/ that serves the feeder-v1 contract from the Messages history of one macOS user. It depends, by tag, on the MessagesCore library product of dev/apple-messages-blade-mcp, and on no other third-party code.

  • Read-only by construction. The Feeder opens the history read-only. It holds no code that sends a message and no code that writes to the history.
  • Network face (ADR 0004). The Feeder binds one configured private-network address on one port. It never binds every interface. It retries the bind, because the address can arrive after the login session starts.
  • Token. The bearer token is read from a file. It is accepted in the Authorization header only, compared in constant time and never logged.
  • What it offers. Only a message that belongs to a Chat. A move to Recently Deleted by its deletion time. The hard-deletion records that are still present, and their all-time count.
  • What it never reads or serves. The edit history, and the text of a deleted message part.
  • Schema pin. The Feeder knows the columns it depends on. check reports a column that is missing or new, and the Feeder refuses to serve rows when a column it depends on is missing.
  • Logs carry counts and error codes only.

The deny list and Redaction are the next slice (#10). This slice leaves one seam for them: every body and every row passes through one filter point before it is served.

Acceptance criteria

  • The contract tests from contracts/feeder-v1/ pass against a synthetic history that the tests build.
  • A test fails the build when the package holds a send API, a scripting call or a write statement against the history.
  • A test proves that a bind to every interface is impossible from config, and that a request with the token in the query string is refused.
  • A test proves that a row with no Chat, a deleted part and the edit history never appear in any response.
  • A test changes the synthetic schema and reads the drift from check.
  • The package builds with the system toolchain and has no dependency besides MessagesCore.

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 0006 (`docs/adr/0006-retention-deletion-and-forget.md`), ADR 0008 (`docs/adr/0008-feeder-package-signing-and-update.md`). ## Human act ruling: the operator approves dispatch and reads the diff before merge, because this slice is the program that holds Full Disk Access and opens a network port on the Source Mac (CONV-40) ## What to build A Swift package in `feeder/` that serves the `feeder-v1` contract from the Messages history of one macOS user. It depends, by tag, on the `MessagesCore` library product of `dev/apple-messages-blade-mcp`, and on no other third-party code. - **Read-only by construction.** The Feeder opens the history read-only. It holds no code that sends a message and no code that writes to the history. - **Network face** (ADR 0004). The Feeder binds one configured private-network address on one port. It never binds every interface. It retries the bind, because the address can arrive after the login session starts. - **Token.** The bearer token is read from a file. It is accepted in the `Authorization` header only, compared in constant time and never logged. - **What it offers.** Only a message that belongs to a Chat. A move to Recently Deleted by its deletion time. The hard-deletion records that are still present, and their all-time count. - **What it never reads or serves.** The edit history, and the text of a deleted message part. - **Schema pin.** The Feeder knows the columns it depends on. `check` reports a column that is missing or new, and the Feeder refuses to serve rows when a column it depends on is missing. - **Logs** carry counts and error codes only. The deny list and Redaction are the next slice (#10). This slice leaves one seam for them: every body and every row passes through one filter point before it is served. ## Acceptance criteria - The contract tests from `contracts/feeder-v1/` pass against a synthetic history that the tests build. - A test fails the build when the package holds a send API, a scripting call or a write statement against the history. - A test proves that a bind to every interface is impossible from config, and that a request with the token in the query string is refused. - A test proves that a row with no Chat, a deleted part and the edit history never appear in any response. - A test changes the synthetic schema and reads the drift from `check`. - The package builds with the system toolchain and has no dependency besides `MessagesCore`. ## Blocked by - none Filed under: operator word "go" sha256:4cd0e21a9a07
Author
Member

ADR 0011 (pull request #24) adds a second listener form. In the single-host shape the Feeder listens on one Unix socket with mode 0600 in the Owner's home, and on no network address. Check first that the system network framework can listen on a Unix socket with no new dependency. If it cannot, bind one loopback port, and report here so that ADR 0011 is amended with the reason. In both shapes the Feeder refuses an all-interfaces address at startup.

ADR 0011 (pull request #24) adds a second listener form. In the single-host shape the Feeder listens on one Unix socket with mode 0600 in the Owner's home, and on no network address. Check first that the system network framework can listen on a Unix socket with no new dependency. If it cannot, bind one loopback port, and report here so that ADR 0011 is amended with the reason. In both shapes the Feeder refuses an all-interfaces address at startup.
Author
Member

Notes from the review of MessagesCore

The reads that this issue builds on are in review as dev/apple-messages-blade-mcp#3. A review of those reads against contracts/feeder-v1 gave the notes below. Each note is a rule for the Feeder, because the library only reads: it applies no deny list, no Redaction and no access control. The notes on the deny list also bind #10.

Which read serves which field

Contract item Read
newest_row_id highestIssuedMessageRowID(). Do not use the highest present row: it falls when the Owner deletes the newest row, and sync then reports a replaced Source.
newest_date messagesByDateDescending(before:limit:inChatOnly:). Walk the page until the first row that the Feeder serves.
reply_to and a Tapback target messages(withGUIDs:) gives the chat and the sender of each target, so the Feeder can test whether it serves that message.
Chat group ChatWithMembers.isGroup. It is nil for a chat.style value that the library does not know. Decide the rule for nil in #10, and fail closed.
The chat of a row MirrorMessage.chatIDs holds every chat of the row. Test every id against the deny list, not chatID alone.
A Recently Deleted record RecentlyDeletedRecord carries every chat and the sender from one statement. A record whose message row is gone has no sender and no guid.
Tapback other TapbackKind.other. Map emphasize to emphasis.

Rules for the Feeder

  • Time pages and the deny list. The library cuts a page before the Feeder filters it. Loop: read a page, filter it, continue from the last examined position, and publish the position of the last served item. An empty page echoes the request position. Each request scans the message table, because date_edited has no index.
  • The page cap is silent. A paged read gives at most maxResultsHardCap items (default 1000) and does not report the clamp. Set the cap above the largest page of the contract and assert it at start. A clamped Reconcile page that sync reads as the end makes sync remove Mirror rows.
  • Times. Format a wire time from the integer milliseconds (MessagesSchema.unixMillis(fromAppleTimestamp:) on the raw value), never from a Date. Division of a Double can move a millisecond.
  • Hard deletions. No snapshot spans two reads. Read the count first and drop ids above it.
  • The schema pin. SchemaReport.new lists every column that the library does not read. On a real message table that list is long. Keep the Feeder's own list of known columns; the actual columns of a table are present plus new.
  • Bodies. Map an empty body to null. Strip U+FFFC from a body. Drop the body of a Tapback row, because the Source stores a quote of the target there.
  • Sizes. Serve null for a negative attachment size.
  • Errors. Map every library error to a fixed code. permissionDenied and storeMissing hold the path of the store, and no such text may leave the Mac.
  • Reads that the Feeder must never call. attachmentsForMessage and attachmentMeta select the file name and the transfer name of an attachment. Use attachmentInfo(forMessageIDs:) only. A test should fail the build when the Feeder names either read.
  • Size limits. The library copies a body blob before its size cap applies, and the text column has no cap. The Feeder sets its own limit on a response.
  • Rows with associated_message_type 1000. Such a row (a sticker placed on a message) has no parsed Tapback and no target. Decide in #10 whether the Feeder serves it as a message or not at all.
  • Schema facts that only a synthetic fixture tests. chat.style 43 and 45, the unit of the Recently Deleted time, and the Tapback codes 2006 and 2007. The schema report on a real history is the check, before the first run on a real Source.
## Notes from the review of `MessagesCore` The reads that this issue builds on are in review as [`dev/apple-messages-blade-mcp#3`](https://git.groupthink.asia/dev/apple-messages-blade-mcp/pulls/3). A review of those reads against `contracts/feeder-v1` gave the notes below. Each note is a rule for the Feeder, because the library only reads: it applies no deny list, no Redaction and no access control. The notes on the deny list also bind #10. ### Which read serves which field | Contract item | Read | |---|---| | `newest_row_id` | `highestIssuedMessageRowID()`. Do not use the highest present row: it falls when the Owner deletes the newest row, and `sync` then reports a replaced Source. | | `newest_date` | `messagesByDateDescending(before:limit:inChatOnly:)`. Walk the page until the first row that the Feeder serves. | | `reply_to` and a Tapback `target` | `messages(withGUIDs:)` gives the chat and the sender of each target, so the Feeder can test whether it serves that message. | | Chat `group` | `ChatWithMembers.isGroup`. It is `nil` for a `chat.style` value that the library does not know. Decide the rule for `nil` in #10, and fail closed. | | The chat of a row | `MirrorMessage.chatIDs` holds every chat of the row. Test every id against the deny list, not `chatID` alone. | | A Recently Deleted record | `RecentlyDeletedRecord` carries every chat and the sender from one statement. A record whose message row is gone has no sender and no `guid`. | | Tapback `other` | `TapbackKind.other`. Map `emphasize` to `emphasis`. | ### Rules for the Feeder - **Time pages and the deny list.** The library cuts a page before the Feeder filters it. Loop: read a page, filter it, continue from the last examined position, and publish the position of the last served item. An empty page echoes the request position. Each request scans the `message` table, because `date_edited` has no index. - **The page cap is silent.** A paged read gives at most `maxResultsHardCap` items (default 1000) and does not report the clamp. Set the cap above the largest page of the contract and assert it at start. A clamped Reconcile page that `sync` reads as the end makes `sync` remove Mirror rows. - **Times.** Format a wire time from the integer milliseconds (`MessagesSchema.unixMillis(fromAppleTimestamp:)` on the raw value), never from a `Date`. Division of a `Double` can move a millisecond. - **Hard deletions.** No snapshot spans two reads. Read the count first and drop ids above it. - **The schema pin.** `SchemaReport.new` lists every column that the library does not read. On a real `message` table that list is long. Keep the Feeder's own list of known columns; the actual columns of a table are `present` plus `new`. - **Bodies.** Map an empty body to `null`. Strip U+FFFC from a body. Drop the body of a Tapback row, because the Source stores a quote of the target there. - **Sizes.** Serve `null` for a negative attachment size. - **Errors.** Map every library error to a fixed code. `permissionDenied` and `storeMissing` hold the path of the store, and no such text may leave the Mac. - **Reads that the Feeder must never call.** `attachmentsForMessage` and `attachmentMeta` select the file name and the transfer name of an attachment. Use `attachmentInfo(forMessageIDs:)` only. A test should fail the build when the Feeder names either read. - **Size limits.** The library copies a body blob before its size cap applies, and the `text` column has no cap. The Feeder sets its own limit on a response. - **Rows with `associated_message_type` 1000.** Such a row (a sticker placed on a message) has no parsed Tapback and no target. Decide in #10 whether the Feeder serves it as a message or not at all. - **Schema facts that only a synthetic fixture tests.** `chat.style` 43 and 45, the unit of the Recently Deleted time, and the Tapback codes 2006 and 2007. The schema report on a real history is the check, before the first run on a real Source.
Collaborator

⏸ SVD architect gate: dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net

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

Run: 20261113T090303Z-761801b7

Held because: CLEAN but 10 open risk(s) (1 sequencing · 4 verification · 5 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. Dispatch is ordered behind the blade change that creates MessagesCore: issue blade#1, built as PR blade#3 (review comment 2026-11-13T04:33Z; blade spec lines 3, 21, 395). The Feeder cannot compile until it merges. This risk covers ONLY the merge; clearing it does not clear the tag (Risk 2), the API names (Risk 3) or the rename-vs-missing rule (Risk 4). [sequencing — blocked by dev/apple-messages-blade-mcp#1, dev/apple-messages-blade-mcp#3]
  2. Which tag to pin, and the blocker the tracker does not record. The issue body ('depends, by tag, on the MessagesCore library product') and ADR 0008:43 ('The blade must publish MessagesCore before the Feeder can build') require a published tag, but #9's '## Blocked by' says 'none' (issue.json; DD note lines 34-36). The tag is the owner's act after merge (blade spec lines 42, 397, 400), so no blockedBy ref can carry it. Its existence could not be probed (blade checkout: Operation not permitted; forge: cannot exec 'remote-https'). Lean: pin exact v0.2.0; approve #9 only after the owner tags; add blade#1 to #9's Blocked by. Half B step 0a halts with no code if the tag is absent. Question: is v0.2.0 the tag to pin, and should #9's Blocked by be amended to name blade#1? [decision]
  3. The MessagesCore API names in Approach Lean §0 (messagesAfter/Before/EditedAfter, chatsWithMembers, recentlyDeleted, hardDeletions/hardDeletionCount, attachmentInfo, schemaReport, highestIssuedMessageRowID, messagesByDateDescending, messages(withGUIDs:), MirrorMessage.chatIDs, ChatWithMembers.isGroup, TapbackKind.other, MessagesSchema.unixMillis/maxResultsHardCap, SchemaReport) come from a draft blade spec and the review comment, not from read code. Provable only once the tag exists. Check (Half B step 0c, before any edit): in a checkout of the pinned tag, run grep -n for each name over Sources/MessagesCore/*.swift and paste the hits into the PR body. Post-merge check: swift build --package-path feeder is green on the host. [verification]
  4. Scope rule for a mismatch at the tag. Lean (§0d): only a same-semantics rename (same inputs, result type and semantics) is absorbed, and only inside Source.swift. An absent read, or one with different semantics (highest present row instead of highest issued; no inChatOnly; a page cap that cannot be set), halts dispatch as needs-respec, filed as blade-side work. The Feeder never writes SQL or imports SQLite to fill a gap. Question: confirm this rule, or name which mismatches (e.g. a changed argument label, or a read split into two calls) dispatch may resolve on its own. [decision]
  5. Issue AC 1 ('the contract tests from contracts/feeder-v1/ pass') cannot be met in full: conformance.run needs the deny list and Redaction (history.json:8-9 deny ops; [code] bodies in exchanges.json), which the issue defers to #10. Lean: gate on check_refusals + check_walks for steps 0-7 on both listener forms, with full run as a strict xfail that #10 must turn green. Question: accept this narrowing, reorder so #10 lands first, or fold the deny list and Redaction into this slice (over 16 files)? [decision]
  6. 'No dependency besides MessagesCore' vs. transitive code: MessagesCore depends on SQLite.swift (blade spec §1), and Package.resolved will pin every dependency the blade declares. Lean: read AC 6 as direct dependency only (one .package(, only the MessagesCore product). Question: is linking SQLite.swift acceptable for the Full Disk Access program under ADR 0002's smallest-program rule, or must the blade drop it from MessagesCore first? [decision]
  7. SchemaPin.known is built from MessagesCore's expected columns plus known-unread columns; a real macOS 26 chat.db will report unknown-column (it keeps serving; the list caps at 64). Check on the host after merge, before the first real run: GET /v1/check against ~/Library/Messages/chat.db reports missing == []; then copy the unknown columns into known in a follow-up. [verification]
  8. Schema facts covered only synthetically: chat.style 43/45, the Recently Deleted time unit, Tapback codes 2006/2007, and the deleted_messages + sqlite_sequence count. Check on the host after merge: with Full Disk Access granted to a locally built Feeder, GET /v1/check and GET /v1/rows/new?after=0&limit=5 against the real history return 200 and validate under wire.Check / wire.RowsPage. [verification]
  9. The listener primitive. The lean uses NWListener with requiredLocalEndpoint .unix(path:), proven first by a unit test; if that fails, the ADR 0011 rule-1 loopback fallback applies and the reason is reported on #9. Question: is the loopback fallback the ruling, or may dispatch use Darwin BSD sockets (socket/bind/listen + DispatchSource), which add no dependency and support both forms? [decision]
  10. Whether the system toolchain's swift test ships XCTest (Command Line Tools without Xcode has historically lacked it). Check on the host: swift test --package-path feeder --filter FeederCoreTests. If XCTest is missing, use the toolchain's Swift Testing framework with no package dependency, and note it in the PR. [verification]

Change: A new feeder/ Swift package. It depends on exactly one package, the MessagesCore product of apple-messages-blade-mcp, pinned exact: to a tag. Source.swift is the only file that imports MessagesCore. Half B step 0 (§0a–d) is a guard that writes no code: (a) git ls-remote shows the architect-named tag (lean v0.2.0); (b, c) a grep -n proves every §0 read and type name at that tag; (d) a same-semantics rename is adapted in Source.swift only, while an absent read or one with different semantics halts as needs-respec. Then: Config.swift builds the only ListenAddress (fileprivate init; it refuses all-interfaces, hostnames and non-private addresses; exit 2). Listener.swift uses NWListener on a TCP host:port or a .unix 0600 socket, retries the bind forever, and falls back to loopback per ADR 0011. Router.swift mirrors the check order of tests/feeder_fake.py:217-286 (token in the header, constant-time compare → 404 → 405 → the _parameters grammar → 503 schema-pin), with closed FeederLog lines. Operations.swift mirrors the paging of feeder_fake.py:288-355 over a SourceReading protocol, with a page-cap guard of at least 5001. Wire.swift calls encodeNil explicitly for every nullable field (wire.py strict). SchemaPin.swift computes depends/known against present∪new. Filter.swift is one ServePolicy seam, with OpenPolicy for #10 to replace. Tests: a Linux static scan (test_kit_boundary.py pattern); macOS XCTest; a black-box run of conformance.check_refusals and check_walks over a synthetic chat.db built in tests/test_feeder_real.py, with full conformance.run as a strict xfail until #10.

Files: feeder/Package.swift · feeder/Package.resolved · feeder/Sources/Feeder/main.swift · feeder/Sources/FeederCore/Config.swift · feeder/Sources/FeederCore/Listener.swift · feeder/Sources/FeederCore/Router.swift · feeder/Sources/FeederCore/Operations.swift · feeder/Sources/FeederCore/Source.swift · feeder/Sources/FeederCore/Wire.swift · feeder/Sources/FeederCore/SchemaPin.swift · feeder/Sources/FeederCore/Filter.swift · feeder/Tests/FeederCoreTests/FeederCoreTests.swift · tests/test_feeder_package.py · tests/test_feeder_real.py · Makefile · .gitignore

Decision: accept the 10 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-13-feeder-the-read-service-on-messagescore-with-one-private-net.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-feeder-the-read-service-on-messagescore-with-one-private-net.md

### ⏸ SVD architect gate: dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net **Status:** CLEAN after 1 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `substrate` · dispatch effort `high` **Run:** `20261113T090303Z-761801b7` **Held because:** CLEAN but 10 open risk(s) (1 sequencing · 4 verification · 5 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Dispatch is ordered behind the blade change that creates MessagesCore: issue blade#1, built as PR blade#3 (review comment 2026-11-13T04:33Z; blade spec lines 3, 21, 395). The Feeder cannot compile until it merges. This risk covers ONLY the merge; clearing it does not clear the tag (Risk 2), the API names (Risk 3) or the rename-vs-missing rule (Risk 4). [sequencing — blocked by dev/apple-messages-blade-mcp#1, dev/apple-messages-blade-mcp#3] 2. Which tag to pin, and the blocker the tracker does not record. The issue body ('depends, by tag, on the MessagesCore library product') and ADR 0008:43 ('The blade must publish MessagesCore before the Feeder can build') require a published tag, but #9's '## Blocked by' says 'none' (issue.json; DD note lines 34-36). The tag is the owner's act after merge (blade spec lines 42, 397, 400), so no blockedBy ref can carry it. Its existence could not be probed (blade checkout: Operation not permitted; forge: cannot exec 'remote-https'). Lean: pin exact v0.2.0; approve #9 only after the owner tags; add blade#1 to #9's Blocked by. Half B step 0a halts with no code if the tag is absent. Question: is v0.2.0 the tag to pin, and should #9's Blocked by be amended to name blade#1? [decision] 3. The MessagesCore API names in Approach Lean §0 (messagesAfter/Before/EditedAfter, chatsWithMembers, recentlyDeleted, hardDeletions/hardDeletionCount, attachmentInfo, schemaReport, highestIssuedMessageRowID, messagesByDateDescending, messages(withGUIDs:), MirrorMessage.chatIDs, ChatWithMembers.isGroup, TapbackKind.other, MessagesSchema.unixMillis/maxResultsHardCap, SchemaReport) come from a draft blade spec and the review comment, not from read code. Provable only once the tag exists. Check (Half B step 0c, before any edit): in a checkout of the pinned tag, run grep -n for each name over Sources/MessagesCore/*.swift and paste the hits into the PR body. Post-merge check: swift build --package-path feeder is green on the host. [verification] 4. Scope rule for a mismatch at the tag. Lean (§0d): only a same-semantics rename (same inputs, result type and semantics) is absorbed, and only inside Source.swift. An absent read, or one with different semantics (highest present row instead of highest issued; no inChatOnly; a page cap that cannot be set), halts dispatch as needs-respec, filed as blade-side work. The Feeder never writes SQL or imports SQLite to fill a gap. Question: confirm this rule, or name which mismatches (e.g. a changed argument label, or a read split into two calls) dispatch may resolve on its own. [decision] 5. Issue AC 1 ('the contract tests from contracts/feeder-v1/ pass') cannot be met in full: conformance.run needs the deny list and Redaction (history.json:8-9 deny ops; [code] bodies in exchanges.json), which the issue defers to #10. Lean: gate on check_refusals + check_walks for steps 0-7 on both listener forms, with full run as a strict xfail that #10 must turn green. Question: accept this narrowing, reorder so #10 lands first, or fold the deny list and Redaction into this slice (over 16 files)? [decision] 6. 'No dependency besides MessagesCore' vs. transitive code: MessagesCore depends on SQLite.swift (blade spec §1), and Package.resolved will pin every dependency the blade declares. Lean: read AC 6 as direct dependency only (one .package(, only the MessagesCore product). Question: is linking SQLite.swift acceptable for the Full Disk Access program under ADR 0002's smallest-program rule, or must the blade drop it from MessagesCore first? [decision] 7. SchemaPin.known is built from MessagesCore's expected columns plus known-unread columns; a real macOS 26 chat.db will report unknown-column (it keeps serving; the list caps at 64). Check on the host after merge, before the first real run: GET /v1/check against ~/Library/Messages/chat.db reports missing == []; then copy the unknown columns into known in a follow-up. [verification] 8. Schema facts covered only synthetically: chat.style 43/45, the Recently Deleted time unit, Tapback codes 2006/2007, and the deleted_messages + sqlite_sequence count. Check on the host after merge: with Full Disk Access granted to a locally built Feeder, GET /v1/check and GET /v1/rows/new?after=0&limit=5 against the real history return 200 and validate under wire.Check / wire.RowsPage. [verification] 9. The listener primitive. The lean uses NWListener with requiredLocalEndpoint .unix(path:), proven first by a unit test; if that fails, the ADR 0011 rule-1 loopback fallback applies and the reason is reported on #9. Question: is the loopback fallback the ruling, or may dispatch use Darwin BSD sockets (socket/bind/listen + DispatchSource), which add no dependency and support both forms? [decision] 10. Whether the system toolchain's swift test ships XCTest (Command Line Tools without Xcode has historically lacked it). Check on the host: swift test --package-path feeder --filter FeederCoreTests. If XCTest is missing, use the toolchain's Swift Testing framework with no package dependency, and note it in the PR. [verification] **Change:** A new feeder/ Swift package. It depends on exactly one package, the MessagesCore product of apple-messages-blade-mcp, pinned exact: to a tag. Source.swift is the only file that imports MessagesCore. Half B step 0 (§0a–d) is a guard that writes no code: (a) git ls-remote shows the architect-named tag (lean v0.2.0); (b, c) a grep -n proves every §0 read and type name at that tag; (d) a same-semantics rename is adapted in Source.swift only, while an absent read or one with different semantics halts as needs-respec. Then: Config.swift builds the only ListenAddress (fileprivate init; it refuses all-interfaces, hostnames and non-private addresses; exit 2). Listener.swift uses NWListener on a TCP host:port or a .unix 0600 socket, retries the bind forever, and falls back to loopback per ADR 0011. Router.swift mirrors the check order of tests/feeder_fake.py:217-286 (token in the header, constant-time compare → 404 → 405 → the _parameters grammar → 503 schema-pin), with closed FeederLog lines. Operations.swift mirrors the paging of feeder_fake.py:288-355 over a SourceReading protocol, with a page-cap guard of at least 5001. Wire.swift calls encodeNil explicitly for every nullable field (wire.py strict). SchemaPin.swift computes depends/known against present∪new. Filter.swift is one ServePolicy seam, with OpenPolicy for #10 to replace. Tests: a Linux static scan (test_kit_boundary.py pattern); macOS XCTest; a black-box run of conformance.check_refusals and check_walks over a synthetic chat.db built in tests/test_feeder_real.py, with full conformance.run as a strict xfail until #10. **Files:** `feeder/Package.swift` · `feeder/Package.resolved` · `feeder/Sources/Feeder/main.swift` · `feeder/Sources/FeederCore/Config.swift` · `feeder/Sources/FeederCore/Listener.swift` · `feeder/Sources/FeederCore/Router.swift` · `feeder/Sources/FeederCore/Operations.swift` · `feeder/Sources/FeederCore/Source.swift` · `feeder/Sources/FeederCore/Wire.swift` · `feeder/Sources/FeederCore/SchemaPin.swift` · `feeder/Sources/FeederCore/Filter.swift` · `feeder/Tests/FeederCoreTests/FeederCoreTests.swift` · `tests/test_feeder_package.py` · `tests/test_feeder_real.py` · `Makefile` · `.gitignore` **Decision:** accept the 10 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-13-feeder-the-read-service-on-messagescore-with-one-private-net.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-feeder-the-read-service-on-messagescore-with-one-private-net.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify.

  • PR: #35
  • Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1c77cdf4
  • Commit: 15ed56ba7b
  • 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/75/pipeline/13/1
  • Checks: PR #35 head 15ed56b: ci/woodpecker/pr/validation green. Local: swift tests 23/23, feeder-real pytest 32 passed + 8 strict xfail, make check 493 passed. No blockers.
  • Warning: Spec-named Swift tests (all 15 mapped names) exist in FeederCoreTests.swift; the Swift run executed 23 tests with 0 failures.
  • Warning: pytest collection for tests/test_feeder_package.py and tests/test_feeder_real.py found every mapped test (46 collected); make feeder-check ran 32 passed, 8 xfailed (the strict xfail test_full_conformance_after_10 rows, as the spec expects).
  • Warning: The first plain make feeder-check hung at the SQLCipher.xcframework.zip download (0 bytes) because it lacked --disable-keychain --disable-netrc, as spec §8 documents. It passed with SWIFT_FLAGS. This is a host-environment fact, not a code defect.
  • Warning: Subagent deviation: the Evidence Pack was widened to src/messages_mind_mcp/wire.py:189-225 for reading only; the diff does not touch that file.
  • Warning: self-review entries were all recorded as fixed; none open.
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261113T110718Z-1c77cdf4 --confirm-merge)
spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify. - PR: https://git.groupthink.asia/dev/messages-mind-mcp/pulls/35 - Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1c77cdf4 - Commit: 15ed56ba7b0c0184935258f5ae12cac6ae40cd3f - 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/75/pipeline/13/1 - Checks: PR #35 head 15ed56b: ci/woodpecker/pr/validation green. Local: swift tests 23/23, feeder-real pytest 32 passed + 8 strict xfail, make check 493 passed. No blockers. - Warning: Spec-named Swift tests (all 15 mapped names) exist in FeederCoreTests.swift; the Swift run executed 23 tests with 0 failures. - Warning: pytest collection for tests/test_feeder_package.py and tests/test_feeder_real.py found every mapped test (46 collected); make feeder-check ran 32 passed, 8 xfailed (the strict xfail test_full_conformance_after_10 rows, as the spec expects). - Warning: The first plain `make feeder-check` hung at the SQLCipher.xcframework.zip download (0 bytes) because it lacked --disable-keychain --disable-netrc, as spec §8 documents. It passed with SWIFT_FLAGS. This is a host-environment fact, not a code defect. - Warning: Subagent deviation: the Evidence Pack was widened to src/messages_mind_mcp/wire.py:189-225 for reading only; the diff does not touch that file. - Warning: self-review entries were all recorded as fixed; none open. - Decision: review the PR and merge? (`codex-svd ship --run-id 20261113T110718Z-1c77cdf4 --confirm-merge`)
Collaborator

spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify.

  • PR: #57
  • Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1fd0fdf3
  • Commit: 26539ccee3
  • 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/75/pipeline/45/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: The Woodpecker check ci/woodpecker/pr/validation is still pending on PR head 26539cc. The runner should re-poll it.
  • Warning: The runner found no root build manifest, so buildResult is none. The real manifest is feeder/Package.swift, and make feeder-check built it green.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261114T094924Z-1fd0fdf3 --confirm-merge)
spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify. - PR: https://git.groupthink.asia/dev/messages-mind-mcp/pulls/57 - Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1fd0fdf3 - Commit: 26539ccee330a56881ae8ab910b554289747fcdf - 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/75/pipeline/45/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: The Woodpecker check ci/woodpecker/pr/validation is still pending on PR head 26539cc. The runner should re-poll it. - Warning: The runner found no root build manifest, so buildResult is none. The real manifest is feeder/Package.swift, and make feeder-check built it green. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261114T094924Z-1fd0fdf3 --confirm-merge`)
Collaborator

spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify.

  • PR: #57
  • Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1fd0fdf3
  • Commit: 08484b36d2
  • 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/75/pipeline/46/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Remote check ci/woodpecker/pr/validation is still pending on 08484b3; the runner should re-poll it.
  • Warning: Security-critical slice (CONV-40): the operator reads the diff before merge.
  • Warning: The runner reported no root build manifest, so buildResult is none. feeder/Package.swift builds and tests green inside make feeder-check.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Rework: 1 round(s), outcome converged
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261114T094924Z-1fd0fdf3 --confirm-merge)
spec-verify-dispatch Half B for dev/messages-mind-mcp#9 feeder-the-read-service-on-messagescore-with-one-private-net completed integration verify. - PR: https://git.groupthink.asia/dev/messages-mind-mcp/pulls/57 - Branch: feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1fd0fdf3 - Commit: 08484b36d2e2aba7f5a2a96bfecb6a9f39cffedc - 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/75/pipeline/46/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Remote check ci/woodpecker/pr/validation is still pending on 08484b3; the runner should re-poll it. - Warning: Security-critical slice (CONV-40): the operator reads the diff before merge. - Warning: The runner reported no root build manifest, so buildResult is none. feeder/Package.swift builds and tests green inside make feeder-check. - CI wait: ci/woodpecker/pr/validation -> pass - Rework: 1 round(s), outcome converged - Decision: review the PR and merge? (`codex-svd ship --run-id 20261114T094924Z-1fd0fdf3 --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/messages-mind-mcp#9
No description provided.