Change feed with named Consumers and ack #8
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#8
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: #1. Records: ADR 0002 §(change feed), GLOSSARY.md Consumer.
What to build
people_changes(consumer, limit)returns person-level eventsadd,update,merge,delafter the Consumer's position, as pipe rows with the standard footer.interactionis reserved for Phase B and never emitted.people_changes_ack(consumer, cursor)advances the position. The api process writes Consumer positions and nothing else in the store.Acceptance criteria
add,update,merge, acks, and sees nothing twice.mergeevent naming survivor and loser; a Forget emitsdelwith no Handle in the row.Blocked by
Filed under: operator word "go. compelling public-facing README.md as A0" sha256:3f9e946994fa
⏸ SVD architect gate: dev/peoplemind-mcp#8 change-feed-with-named-consumers-and-ack
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
substrate· dispatch efforthighRun:
20261101T081350Z-e3f9e822Held because: CLEAN but 4 open risk(s) (2 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
consumer | <held position>, so retries and racing runs are safe. test_write_token_reaches_read_tools relies on this through ack cursor "0". Question: accept the no-op, or refuse backwards acks withcursor-behind? Refusing would mean the TOOL_ARGS ack args change and the write-token dump comparison excludes consumers rows. [decision][feed] consumers = [...]with LABEL_PATTERN names, an empty default and duplicates refused. The ack parameter is namedcursor, as in the issue, carrying the footer's ack_seq; ADR 0001 Amendment 1 calls itseq. Ack returnsconsumer | position. Question: accept[feed] consumers(rather than[api] consumersor[[consumers]] name=) andcursor, or align with mailmind's change-feed vocabulary once V1 is read? [decision]ack_seqand read its change-feed and ack implementation before writing feed.py and rows.feed_footer. Record in the PR body every divergence in footer order, empty-page ack_seq, backwards-ack handling and consumer config shape. The peoplemind Amendment 1 contract wins. Never write to that checkout. [verification]uv runon the project interpreter (>=3.12). If the consumers upsert is refused there, add only the missing action code for tableconsumersand report it in the PR body. Never broaden the allow-list to other tables. [verification]Change: 1. Add a FeedConfig
[feed] consumerslist after ApiConfig (config.py:78-92). Mirror unique_sources (config.py:132-137) and LABEL_PATTERN (config.py:63).2. Add store.open_positions beside open_reader (store.py:119-137). It opens
mode=rwwith busy_timeout, refuses a behind or ahead schema and never migrates. A set_authorizer allow-list permits only SELECT/READ/FUNCTION/TRANSACTION plus INSERT/UPDATE onconsumers. A prototype ran this session: other-table writes, PRAGMA writes, DDL and ATTACH were all refused.3. Add rows.feed_footer(ack_seq, more) next to footer (rows.py:29-30).
4. Create feed.py:
seq | kind | person_id | other_id | atrows and anack_seq=N more=boolfooter, and never writes.cursor-ahead. It upserts only when the cursor is ahead of the position, and otherwise writes nothing. It returnsconsumer | position.require_scopes(SCOPE_READ)plus_renderstack (server.py:66-138). Add a_positionshelper mirroring_read(server.py:40-46)._renderat server.py:56 skipsack_seq=footer lines when counting rows.consumersoverride; seeded_store uses consumers ["grok","batch"].[feed]key to the README quick-start config.graph.py already emits every event and is untouched. There is no schema change.
Files:
src/peoplemind_mcp/config.py·src/peoplemind_mcp/store.py·src/peoplemind_mcp/rows.py·src/peoplemind_mcp/feed.py·src/peoplemind_mcp/server.py·tests/conftest.py·tests/test_server.py·tests/test_feed.py·README.mdDecision: accept the 4 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-01-change-feed-with-named-consumers-and-ack.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-01-change-feed-with-named-consumers-and-ack.mdArchitect gate: CLEAN, rulings recorded, released for dispatch
Spec
2026-11-01-change-feed-with-named-consumers-and-ack.md(Half-A run20261101T081350Z-e3f9e822, batchfaebc8b77de84e938c3fd543da6ddf33with #14). The rulings are appended to the spec under## Agent Adjustments.mail_wakes_ack.[feed] consumers = [...]accepted. The ack parameter isseq: int, notcursor: str. ADR 0001 Amendment 1 and mailmind'smail_wakes_ack(consumer, seq)both name itseq. The ack row is<consumer> | <ack_seq>.set_authorizerallow-list test runs underuv run(Python 3.14.5, SQLite 3.50.4 on the architect host). Never widen the allow-list.Riders: pytest only as
uv run python3 -m pytest … --basetemp "$(mktemp -d "${TMPDIR:-/var/tmp}/svd.XXXXXX")/x"; no nested.git; baseline on pristinedffd39dfirst;pyproject.tomlstays untouched; the sibling unit's files (#14:sync.py,sources/carddav.py, their tests) stay untouched.Write set: 9 files, under the 16-file ceiling. Disjoint from #14.
Operator: paste
svd:goto release Half-B. Dispatch runs ascodex-svd dispatch-batchwithCODEX_SVD_STAGE_TIMEOUT_SECONDS=9000.spec-verify-dispatch Half B for dev/peoplemind-mcp#8 change-feed-with-named-consumers-and-ack completed integration verify.
efa70db446efa70db: absentefa70db: no CI statuses (absent). Local: 164 passed, 3 skipped; mypy and ruff clean.python3 -m pytestlacks phonenumbers outside uv. I ran collection and tests underuv run, which provisions the dependencies.efa70db: Forgejo returned an empty statuses list for the PR head; no CI context has ever reported. No tracking pointer found. — reported as absent, not blocking (gh#633)codex-svd ship --run-id 20261101T084721Z-46c82a6e --confirm-merge)