Sync: state the [feeder] keys, the client limits and the codes in the README #32
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #6. Records: ADR 0004 (
docs/adr/0004-source-mac-and-feeder-network-face.md), the contract incontracts/feeder-v1/README.md.What to build
The README states every control, limit and code of the api. For the sync worker from #12 it has one paragraph. A reader cannot learn the config keys, the limits or the meaning of a code without the source. Make the sync worker as explicit as the api.
Add to
README.md:[feeder]keys and their bounds:urlorsocket, exactly one;urlmust have: schemehttp, a host, an optional port, no path, no query, no fragment, no user name;token_file: an owner-only file with at least 32 characters;poll_seconds: 5 to 300, default 60.syncthen asks again with half thelimit, down to 1.syncrefuses a Unix socket that another user can open.sync=ok new=N backfill=N changed=N backfill_left=Nandsync=error code=<code>.synccan print. For each code: its cause, its exit status with--once, and whether the loop tries again.syncmigrates the store. The api refuses a store with an older schema withstore-schema-behind. So an operator startssyncbefore the api after an upgrade.Add to
SECURITY.md:/healthz/syncthen answers and after how long.In code:
SourceErrorandSyncErrorlive in one closed set, with the stop codes as a subset of it.FeederSource, its request function and the pass function each get a docstring that states every refusal and every step in order.Acceptance criteria
source.py,sync.pyorconfig.py. No number appears in code as a bare literal.store-schema-behindfor a store of schema version 1 and that it writes nothing to that store.Blocked by
Filed under: operator word "go" sha256:4cd0e21a9a07
⏸ SVD architect gate: dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
standard· dispatch effortmediumRun:
20261113T120735Z-32062ec6Held because: CLEAN but 7 open risk(s) (2 verification · 5 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
5d5c8a5before the first edit, record the failing set, and confirm it is unchanged after the change. [verification]Change: Mirror tests/test_layout.py:111-123 (README/SECURITY phrases built from named constants) and tests/test_face.py:245-248 / tests/test_feeder_contract.py:1249-1250 (doc list/table vs. closed code tuple). Code changes: (1) config.py names the poll bounds as POLL_SECONDS_MIN/MAX/DEFAULT, plus the ServerConfig rate/port bounds and the control-char bound, with values unchanged. (2) source.py uses SOCKET_SHARED_BITS=0o077 and HTTPStatus in place of 401/503/200, and gets docstrings on FeederSource and _get that list each refusal in code order. (3) sync.py replaces STOP_CODES with CODES, a closed frozenset of all 17 sync=error codes (SourceError + SyncError + feeder-missing + the six writer/Tombstone StoreError codes, needed because STOP_CODES already holds StoreError codes), keeps STOP_CODES as a subset, adds EXIT_OK/FAILED/SETUP/STOP and SMALLEST_LIMIT, used in _run (sync.py:248-280) and _smaller (sync.py:161-168), and gives run_pass a docstring with the step order. Docs: README gets a new '## The sync worker' section after Current capabilities, with the Config key table, client limits, the two line forms, a code table (cause / --once exit / loop behaviour, including 'loop exits at start' for open-time failures), and the order after an upgrade. SECURITY gets '## What the sync worker limits': a slow Feeder can hold a pass open, and /healthz/sync then stays ok until 15 minutes after the last successful pass, then answers 503. A new tests/test_sync_documents.py holds the numbers test, an AST bare-literal test, the README-table == sync.CODES test, an AST closure test over the raise sites, and an api test showing store-schema-behind on a schema-1 store with an unchanged main-file digest (built as in tests/test_store.py:339-349 and served as in tests/test_server.py:177-180). It also checks that every example host is loopback.
Files:
README.md·SECURITY.md·src/messages_mind_mcp/source.py·src/messages_mind_mcp/sync.py·src/messages_mind_mcp/config.py·tests/test_sync_documents.pyDecision: accept the 7 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):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-sync-state-the-feeder-keys-the-client-limits-and-the-codes-i.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-sync-state-the-feeder-keys-the-client-limits-and-the-codes-i.mdsync: the start-time failures andtombstones-schema-aheadexit inconsistently #38spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
9d4cd20dbacodex-svd ship --run-id 20261113T125812Z-584c9f86 --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
c7334ffa41codex-svd ship --run-id 20261113T200953Z-c5e0fd3e --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
7b88b88e8a7b88b88; the runner should re-poll.codex-svd ship --run-id 20261113T200953Z-c5e0fd3e --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
fe5ee99f06codex-svd ship --run-id 20261113T200953Z-c5e0fd3e --confirm-merge)spec-verify-dispatch Half B for dev/messages-mind-mcp#32 sync-state-the-feeder-keys-the-client-limits-and-the-codes-i completed integration verify.
005a73c4d6python3 -m pytestlacks tiktoken outside uv; collection and runs useduv run python3 -m pytest.codex-svd ship --run-id 20261113T200953Z-c5e0fd3e --confirm-merge)sync: the start-time failures andtombstones-schema-aheadexit inconsistently #38