Add the MessagesCore-backed feeder read service #57

Merged
Collaborator

Implement all eight feeder-v1 operations with one private-address or mode-0600 Unix listener, file-backed bearer authentication, strict configuration checks, per-request schema pins, safe wire shaping, and a shared filter seam. Keep owner history blocked pending the policy slice.

Pin MessagesCore v0.2.0 and its resolved dependencies. Add Swift unit tests, static boundary checks, synthetic-history contract tests, and make feeder-check while preserving make check.

Validation: make check passed with 967 passed and 44 skipped. make feeder-check passed with 21 Swift tests, 35 black-box tests, and 7 strict expected failures for issue #10.

Closes #9
Co-Authored-By: gpt-6.1-sol noreply@openai.com

Implement all eight feeder-v1 operations with one private-address or mode-0600 Unix listener, file-backed bearer authentication, strict configuration checks, per-request schema pins, safe wire shaping, and a shared filter seam. Keep owner history blocked pending the policy slice. Pin MessagesCore v0.2.0 and its resolved dependencies. Add Swift unit tests, static boundary checks, synthetic-history contract tests, and make feeder-check while preserving make check. Validation: make check passed with 967 passed and 44 skipped. make feeder-check passed with 21 Swift tests, 35 black-box tests, and 7 strict expected failures for issue #10. Closes #9 Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Add the MessagesCore-backed feeder read service
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
26539ccee3
Implement all eight feeder-v1 operations with one private-address or mode-0600 Unix listener, file-backed bearer authentication, strict configuration checks, per-request schema pins, safe wire shaping, and a shared filter seam. Keep owner history blocked pending the policy slice.

Pin MessagesCore v0.2.0 and its resolved dependencies. Add Swift unit tests, static boundary checks, synthetic-history contract tests, and make feeder-check while preserving make check.

Validation: make check passed with 967 passed and 44 skipped. make feeder-check passed with 21 Swift tests, 35 black-box tests, and 7 strict expected failures for issue #10.

Closes #9
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Complete Feeder round-two guards and regression coverage
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
08484b36d2
Recheck canonical history ancestry, permissions, link count and file identity before and after every MessagesCore read; discard results when a check fails. Preserve unfiltered policy facts and require every associated Chat to pass admission, including Recently Deleted records. Probe existing Unix sockets before unlinking, check their parent first, return empty HEAD bodies, and log bind errno names. Reselect busy test ports and verify listener addresses, linked symbols, file rules and serving limits.

All 39 test names required by R10–R20 are present. Final validation: five consecutive make feeder-check runs passed, each with 48 Swift tests and 45 real-binary tests plus seven unchanged strict expected failures for #10. Filtered FeederCoreTests passed all 48 tests. Package checks passed 13 tests. Root make check passed 969 tests with 54 skipped; lint, formatting, mypy and git diff --check passed. Swift builds used feeder/Package.swift, pinned versions and external scratch directories; no relative path dependencies were declared.

Mutation verification ran both Swift and Python suites for 39 primary and 10 supplemental mutations; all compiled. An ancestor mutation exposed a fixture gap, which was corrected with an alias-redirection case and verified red in both suites. Removing one redundant hard-link check preserved protection; removing both was killed. Final killing-test mappings:
- history-private-parent: testHistoryRecheckNeedsAPrivateParentForAnExistingFile.
- config-nofollow: testConfigRefusesASymlinkedConfigFile.
- config-owner, config-group-write, config-other-write: testConfigFileOwnerAndModeRule.
- token permission bits 040, 020, 010, 004, 002, 001: testTokenRefusesEachGroupAndOtherBit.
- token-length: testTokenNeeds32Characters.
- owner-history: testTheDefaultPolicyRefusesTheOwnerHistory.
- connection-limit: test_a_ninth_connection_is_not_served_while_eight_are_open.
- idle-deadline, clean rerun: test_an_idle_connection_closes_after_ten_seconds.
- socket-mask, socket-chmod: testSocketModeHoldsWithEitherStepAlone.
- token-early-return: test_same_token_has_no_early_exit.
- unknown-group: testAChatWithUnknownGroupIsNotServed.
- associated-1000: testAssociatedType1000FailsClosed.
- item-type: testNonMessageItemTypesAreNotServed.
- changed-messages-only: testChangedRowsServeMessagesOnly.
- service-rcs: testServiceMapping.
- identifier-length, identifier-controls: testIdentifierRules.
- attachment-cap, member-cap, name-cap: testPerRowAndChatCaps.
- scan-budget: testScanBudgetIs10000Rows.
- hard-count: testIdsAboveTheCountAreDropped.
- changed-position: testChangedRowsPositionNamesAServedRow.
- body-redaction, name-redaction: testRedactionOutputIsServed.
- ancestor-recheck, strengthened rerun: testHistoryRecheckRefusesAChangedAncestor and test_an_ancestor_swap_after_start_is_never_opened.
- after-read-recheck: testHistoryRecheckAfterTheReadDiscardsTheResult.
- complete history-hardlink removal: test_a_hard_link_to_the_history_is_never_opened.
- live-socket-probe: test_a_live_socket_is_never_taken_over.
- head-body: test_head_gets_an_empty_body.
- errno-name: testBindRetryLogsTheErrnoName.
- row-sender-prefilter, recent-sender-prefilter, member-prefilter, policy-group-fact: testThePolicySeesTheUnfilteredSenderAndMembers.
- recent-chat-bypass: testRecentlyDeletedPassesTheChatSeam.
- lowest-chat-only: testARowIsServedOnlyWhenEveryChatIsServed.
- socket-parent-checks: test_an_open_socket_parent_is_refused_before_any_unlink.

MessagesCore names at v0.2.0: forge tag peeled to 3a8262d68ec1a1625921f2ff61aa257eaeb24af8. MessagesStore.swift hits: actor 17; messagesAfter 503; messagesBefore 529; messagesByDateDescending 577; highestIssuedMessageRowID 618; messages(withGUIDs:) 639; messagesEditedAfter 669; chatsWithMembers 702; recentlyDeleted 780; hardDeletions 840; hardDeletionCount 859; attachmentInfo 871; schemaReport 901. Models.swift hits: MirrorMessage.chatIDs 258; TapbackKind.other 358; ChatWithMembers.isGroup 393; SchemaReport 544; TableSchemaReport 554; present/missing/new 557/558/559. Schema.swift: unixMillis 123. Config.swift: maxResultsHardCap property 29 and initializer argument 55. No API renames or missing reads.

Unchanged package pins: apple-messages-blade-mcp 0.2.0, eventsource 1.6.0, sqlcipher.swift 4.20.0, sqlite.swift 0.16.0, stallari-mcp-helpers-swift 0.4.0, swift-atomics 1.3.1, swift-collections 1.7.6, swift-log 1.17.0, swift-nio 2.105.0, swift-sdk 0.12.1, swift-syntax 600.0.1, swift-system 1.9.0.

Recently Deleted evidence: steps 0–2 retain Chat 1 for message 17; steps 3–6 retain Chat 1 for messages 17 and 3, and Chat 5 for message 15. These Chats have known non-group status and remain available through chatsWithMembers. Step 7 retains those Chat records but the missing-column pin refuses reads.

ADR 0011 amendment owed: none; NWListener serves a Unix socket with mode 0600. Residual limitation: MessagesCore opens by path, so the before/after checks narrow the check/open race without eliminating it. Changed results are discarded.

Closes #9
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
svc-agent-writer deleted branch feat/svd-dev-messages-mind-mcp-9-feeder-the-read-service-on-m-1fd0fdf3 2026-11-14 20:46:55 +00:00
Sign in to join this conversation.
No description provided.