Change feed: close the decisions, hardening items and test gaps from the PR #53 reviews #54

Closed
opened 2026-11-14 02:39:26 +00:00 by svc-agent-writer · 3 comments

PR #53 (issue #15, the change feed) merged as 7eb5080, pinned to the gated head 3e65d49. A correctness review and a security review ran before each rework round; the last pair reviewed 3e65d49. Rework rounds 2 to 6 fixed every blocker and the items in spec rows R13-R45. The items below were found and not fixed in that PR. None is a blocker. Each was checked against the code by its reviewer. "Mutation survives" means the change left the full suite green.

Decision for the operator

  1. The documents disagree on whether People Mind may receive message text. docs/adr/0001-service-and-read-only-scope.md:13 says "Message text never reaches People Mind". GLOSSARY.md:89 says "Evidence is the only thing People Mind receives about a message". README.md:233 and SECURITY.md:25 now say that a Consumer token gives People Mind message text through the feed, which is true of the code. No code ties a Consumer name to its holder, so the ADR rule is policy only. Decide one of two: amend ADR 0001 and the glossary so that a Consumer token for People Mind is allowed, or keep ADR 0001 and make the README and SECURITY say "never give People Mind a Consumer token". ADRs are an operator surface.

Should fix

  1. An ack takes the store write lock before it checks anything (store.py acking, server.py messages_changes_ack). BEGIN IMMEDIATE runs for a garbage cursor and for a no-op re-ack. While sync holds a long page transaction, each ack waits up to busy_timeout (5 s) in a worker thread, and the call deadline does not cover a lock wait. One Consumer at the rate-limit burst can fill the shared threadpool and slow every read tool and /healthz/sync. Fix: check the cursor shape before the store opens; read the position on a reader and open acking only when the ack moves the position forward; consider a short busy_timeout on the positions connection.
  2. A Consumer position outlives its config entry. A new Consumer that reuses a removed name starts at the old position and silently misses earlier events, against ADR 0010 Amendment 1. Fix: reset positions for names no longer configured, or document the rule.
  3. A Consumer that reads with no cursor gets no signal after a Rebuild. It restarts from seq 0 (spec Open Risk 2 accepts this). Two effects follow, and neither is documented. First, it keeps messages that were Forgotten or deleted before the Rebuild. Second, a new store assigns m<id> and c<id> in insert order, so edit m340 or del m5 can name a different message than the Consumer's copy holds (reasoned from AUTOINCREMENT, not reproduced). The README tells a Consumer to read with no cursor, so it never sees cursor-expired. Fix: tell a Consumer to pass its last next_cursor on every read, or to compare the epoch tag, and on cursor-expired to drop or reconcile its copy. Record the limit on the Consumer's duty to delete in SECURITY.md before the Forget slice lands.
  4. No test pins that every registered tool declares auth. The verifier no longer passes required_scopes, so a tool registered later without auth= is reachable by every Consumer token. Add a test over the registered tool list.
  5. Secret checks do not compare the Feeder token, the store key or the tombstone salt by value. tokens-equal compares the read, evidence and Consumer tokens with each other only. A token file that holds a copy of the Feeder token or of the store key passes check (reproduced at fdd7cf3). check reads all of them and could compare the values. The documents state this limit (spec R41).
  6. A Consumer cannot recover from behind-retention with its own token. The README tells it to reconcile with the read tools and a separate read token. Every new Consumer starts at position 0, so after the first prune it is behind at once and needs a read token too; the feed-only scope is then nominal. State this in SECURITY.md under who can read message text, or give the feed a way to reconcile.
  7. A legend names every speaker on the page. row() caps each cell at LEGEND_CHARS, not the line. A feed page of 100 events from 100 senders gives one legend line of about 6,700 characters; the transcript legend _legend has the same property. Check this against the README page budget and decide on a cap with a +N cell.
  8. requires-python = ">=3.12" admits 3.13, where Path.resolve() does not raise on a symlink loop. The image and .python-version pin 3.12. On 3.13 a looped secret path answers secret-unreadable, or nothing under a verb that does not open it, and the secret-path-invalid test and sentence no longer hold. No path leaks. Fix: pin <3.13, or detect ELOOP with os.stat in load_config.
  9. A hard link from a secret path to the config file is not detected. The config check compares resolved paths only. Add the config file's device and inode to _refuse_shared_secret_files, or document the limit.
  10. A NUL in store.path crashes sync with a traceback (store.py create_private, raised from open_writer). This is older than PR #53. Catch ValueError there, and check tombstone_path too.
  11. CONSUMER_TOKEN_VERBS does not control which verbs read Consumer tokens. The check at startup.py:112 sits inside the AUTH_TOKEN_VERBS branch, so an edit of CONSUMER_TOKEN_VERBS changes the README table but not the behaviour (a mutation to if True survives). Gate the read on CONSUMER_TOKEN_VERBS alone.
  12. The old example [feed] consumers = [] now fails config validation, and no upgrade note exists. Add one line to the README or the changelog.

Test gaps

  1. The R31 test hangs instead of failing (reproduced at 3e65d49). With messages_changes changed to use acking(), test_messages_changes_never_opens_a_positions_connection (tests/test_server.py:86-101) ran more than 9 minutes. The guard calls pytest.fail, a BaseException, which _logged does not catch; the call() helper (tests/conftest.py:329) has no timeout. Fix: raise RuntimeError in the guard, or give call() a timeout.
  2. The transaction in acking and in prune_events can be removed (mutation survives at e533cb4).
  3. tests/test_server.py budget test no longer asserts READ_TOOLS_SHARE on its own (:339-340 assert only the sum), so the read tools can grow into the feed tools' slack.
  4. Refusal logging for the feed tools (server.py _Refusals): a bad argument to messages_changes_ack would log tool=-.
  5. The legend speaker filter not change.from_me (views.py) is not pinned: removing it survives because Owner rows carry no Handle in the fixtures. The ack's updated_at value has no assertion either.
  6. test_each_token_reaches_only_its_own_tools calls messages_peer_evidence_v1 (tests/test_feed.py:181), which does not exist, so its "Consumer reaches no evidence tool" half proves nothing.

Notes

  • The token scrub replaces tokens in a fixed order; if one held token contains another, part of the longer one leaks. Replace the longest first.
  • Tokens is frozen but holds the caller's Consumer dict by reference; store MappingProxyType(dict(consumers)).
  • tokens-equal and secret-file-shared errors always name feed.consumers and auth.evidence_token_file, even when the config has neither.
  • feed_needs_auth adds a second, false feed location when [auth] itself fails validation.
  • kit/feed.py require_consumer and the unknown-consumer code have no caller.
  • A secret file's owner is not checked, only its mode (kit/secrets.py); README says "owner-only file". This is a *secret* path: operator surface.
  • With the prefix prune rule, a sync-host clock that steps forward then back leaves one future-stamped event that blocks every later prune until it ages out.
  • An interrupt during ROLLBACK in store.transaction (store.py:160-172) can raise a second error that hides the first, so the reply carries the wrong code.
  • A WAL checkpoint can run on the positions connection.
  • README.md:274 and SECURITY.md say "After a Backfill or a Rebuild this is the whole history". That holds only until the 30-day prune removes the Backfill add events. As an upper bound on what a Consumer token reads, it is still safe.
  • ADR 0010 Amendment 1 item 4 says "older than the oldest kept event", which would also flag a position equal to the floor. The code (start < floor) correctly does not. The ADR wording only.

Acceptance criteria

  • Item 1 has an operator decision, and the ADR, glossary, README and SECURITY agree with it.
  • Items 2 to 13 are fixed, or each has a recorded decision.
  • Each mutation in items 14 to 19 fails a test in under 60 s.
  • Each note is fixed, or has a recorded decision.

Triage rulings (2026-11-15)

Operator word "accept leans / after #13, triage #58 and dispatch" (sha256:a999fb29c997).

  • Item 1, ruling 2B: keep ADR 0001. README.md and SECURITY.md say "never give People Mind a Consumer token". ADR 0001 and GLOSSARY.md:89 do not change.
  • Ruling 8: ready-for-agent. The follow-ups #52, #54 and #56 run one at a time, after #13 and #58.
  • The note on the secret-file owner check names kit/secrets.py, a *secret* path. It is in scope. The merge is T4.

Blocked by

  • none

Filed under: operator word "Merge 53 on green" sha256:a75d284a15f8

PR #53 (issue #15, the change feed) merged as `7eb5080`, pinned to the gated head `3e65d49`. A correctness review and a security review ran before each rework round; the last pair reviewed `3e65d49`. Rework rounds 2 to 6 fixed every blocker and the items in spec rows R13-R45. The items below were found and not fixed in that PR. None is a blocker. Each was checked against the code by its reviewer. "Mutation survives" means the change left the full suite green. ## Decision for the operator 1. **The documents disagree on whether People Mind may receive message text.** `docs/adr/0001-service-and-read-only-scope.md:13` says "Message text never reaches People Mind". `GLOSSARY.md:89` says "Evidence is the only thing People Mind receives about a message". `README.md:233` and `SECURITY.md:25` now say that a Consumer token gives People Mind message text through the feed, which is true of the code. No code ties a Consumer name to its holder, so the ADR rule is policy only. Decide one of two: amend ADR 0001 and the glossary so that a Consumer token for People Mind is allowed, or keep ADR 0001 and make the README and SECURITY say "never give People Mind a Consumer token". ADRs are an operator surface. ## Should fix 2. **An ack takes the store write lock before it checks anything** (`store.py` `acking`, `server.py` `messages_changes_ack`). `BEGIN IMMEDIATE` runs for a garbage cursor and for a no-op re-ack. While `sync` holds a long page transaction, each ack waits up to `busy_timeout` (5 s) in a worker thread, and the call deadline does not cover a lock wait. One Consumer at the rate-limit burst can fill the shared threadpool and slow every read tool and `/healthz/sync`. Fix: check the cursor shape before the store opens; read the position on a reader and open `acking` only when the ack moves the position forward; consider a short `busy_timeout` on the positions connection. 3. **A Consumer position outlives its config entry.** A new Consumer that reuses a removed name starts at the old position and silently misses earlier events, against ADR 0010 Amendment 1. Fix: reset positions for names no longer configured, or document the rule. 4. **A Consumer that reads with no cursor gets no signal after a Rebuild.** It restarts from seq 0 (spec Open Risk 2 accepts this). Two effects follow, and neither is documented. First, it keeps messages that were Forgotten or deleted before the Rebuild. Second, a new store assigns `m<id>` and `c<id>` in insert order, so `edit m340` or `del m5` can name a different message than the Consumer's copy holds (reasoned from AUTOINCREMENT, not reproduced). The README tells a Consumer to read with no cursor, so it never sees `cursor-expired`. Fix: tell a Consumer to pass its last `next_cursor` on every read, or to compare the epoch tag, and on `cursor-expired` to drop or reconcile its copy. Record the limit on the Consumer's duty to delete in `SECURITY.md` before the Forget slice lands. 5. **No test pins that every registered tool declares `auth`.** The verifier no longer passes `required_scopes`, so a tool registered later without `auth=` is reachable by every Consumer token. Add a test over the registered tool list. 6. **Secret checks do not compare the Feeder token, the store key or the tombstone salt by value.** `tokens-equal` compares the read, evidence and Consumer tokens with each other only. A token file that holds a copy of the Feeder token or of the store key passes `check` (reproduced at `fdd7cf3`). `check` reads all of them and could compare the values. The documents state this limit (spec R41). 7. **A Consumer cannot recover from `behind-retention` with its own token.** The README tells it to reconcile with the read tools and a separate read token. Every new Consumer starts at position 0, so after the first prune it is behind at once and needs a read token too; the feed-only scope is then nominal. State this in `SECURITY.md` under who can read message text, or give the feed a way to reconcile. 8. **A legend names every speaker on the page.** `row()` caps each cell at `LEGEND_CHARS`, not the line. A feed page of 100 events from 100 senders gives one legend line of about 6,700 characters; the transcript legend `_legend` has the same property. Check this against the README page budget and decide on a cap with a `+N` cell. 9. **`requires-python = ">=3.12"` admits 3.13, where `Path.resolve()` does not raise on a symlink loop.** The image and `.python-version` pin 3.12. On 3.13 a looped secret path answers `secret-unreadable`, or nothing under a verb that does not open it, and the `secret-path-invalid` test and sentence no longer hold. No path leaks. Fix: pin `<3.13`, or detect `ELOOP` with `os.stat` in `load_config`. 10. **A hard link from a secret path to the config file is not detected.** The config check compares resolved paths only. Add the config file's device and inode to `_refuse_shared_secret_files`, or document the limit. 11. **A NUL in `store.path` crashes `sync` with a traceback** (`store.py` `create_private`, raised from `open_writer`). This is older than PR #53. Catch `ValueError` there, and check `tombstone_path` too. 12. **`CONSUMER_TOKEN_VERBS` does not control which verbs read Consumer tokens.** The check at `startup.py:112` sits inside the `AUTH_TOKEN_VERBS` branch, so an edit of `CONSUMER_TOKEN_VERBS` changes the README table but not the behaviour (a mutation to `if True` survives). Gate the read on `CONSUMER_TOKEN_VERBS` alone. 13. **The old example `[feed] consumers = []` now fails config validation, and no upgrade note exists.** Add one line to the README or the changelog. ## Test gaps 14. **The R31 test hangs instead of failing** (reproduced at `3e65d49`). With `messages_changes` changed to use `acking()`, `test_messages_changes_never_opens_a_positions_connection` (`tests/test_server.py:86-101`) ran more than 9 minutes. The guard calls `pytest.fail`, a `BaseException`, which `_logged` does not catch; the `call()` helper (`tests/conftest.py:329`) has no timeout. Fix: raise `RuntimeError` in the guard, or give `call()` a timeout. 15. The transaction in `acking` and in `prune_events` can be removed (mutation survives at `e533cb4`). 16. `tests/test_server.py` budget test no longer asserts `READ_TOOLS_SHARE` on its own (`:339-340` assert only the sum), so the read tools can grow into the feed tools' slack. 17. Refusal logging for the feed tools (`server.py` `_Refusals`): a bad argument to `messages_changes_ack` would log `tool=-`. 18. The legend speaker filter `not change.from_me` (`views.py`) is not pinned: removing it survives because Owner rows carry no Handle in the fixtures. The ack's `updated_at` value has no assertion either. 19. `test_each_token_reaches_only_its_own_tools` calls `messages_peer_evidence_v1` (`tests/test_feed.py:181`), which does not exist, so its "Consumer reaches no evidence tool" half proves nothing. ## Notes - The token scrub replaces tokens in a fixed order; if one held token contains another, part of the longer one leaks. Replace the longest first. - `Tokens` is frozen but holds the caller's Consumer dict by reference; store `MappingProxyType(dict(consumers))`. - `tokens-equal` and `secret-file-shared` errors always name `feed.consumers` and `auth.evidence_token_file`, even when the config has neither. - `feed_needs_auth` adds a second, false `feed` location when `[auth]` itself fails validation. - `kit/feed.py` `require_consumer` and the `unknown-consumer` code have no caller. - A secret file's owner is not checked, only its mode (`kit/secrets.py`); README says "owner-only file". This is a `*secret*` path: operator surface. - With the prefix prune rule, a sync-host clock that steps forward then back leaves one future-stamped event that blocks every later prune until it ages out. - An interrupt during `ROLLBACK` in `store.transaction` (`store.py:160-172`) can raise a second error that hides the first, so the reply carries the wrong code. - A WAL checkpoint can run on the positions connection. - `README.md:274` and `SECURITY.md` say "After a Backfill or a Rebuild this is the whole history". That holds only until the 30-day prune removes the Backfill `add` events. As an upper bound on what a Consumer token reads, it is still safe. - ADR 0010 Amendment 1 item 4 says "older than the oldest kept event", which would also flag a position equal to the floor. The code (`start < floor`) correctly does not. The ADR wording only. ## Acceptance criteria - Item 1 has an operator decision, and the ADR, glossary, README and SECURITY agree with it. - Items 2 to 13 are fixed, or each has a recorded decision. - Each mutation in items 14 to 19 fails a test in under 60 s. - Each note is fixed, or has a recorded decision. ## Triage rulings (2026-11-15) Operator word "accept leans / after #13, triage #58 and dispatch" (sha256:a999fb29c997). - **Item 1, ruling 2B:** keep ADR 0001. `README.md` and `SECURITY.md` say "never give People Mind a Consumer token". ADR 0001 and `GLOSSARY.md:89` do not change. - **Ruling 8:** `ready-for-agent`. The follow-ups #52, #54 and #56 run one at a time, after #13 and #58. - The note on the secret-file owner check names `kit/secrets.py`, a `*secret*` path. It is in scope. The merge is T4. ## Blocked by - none --- Filed under: operator word "Merge 53 on green" sha256:a75d284a15f8
Author
Member

This was generated by AI during triage.

Moved to ready-for-agent under ruling 8. Item 1 is decided: ruling 2B keeps ADR 0001, and the README and SECURITY say "never give People Mind a Consumer token". The body now holds the rulings. Dispatch waits for the operator's svd:go, after #52.

> *This was generated by AI during triage.* Moved to `ready-for-agent` under ruling 8. Item 1 is decided: ruling 2B keeps ADR 0001, and the README and SECURITY say "never give People Mind a Consumer token". The body now holds the rulings. Dispatch waits for the operator's `svd:go`, after #52.
Collaborator

⏸ SVD architect gate: dev/messages-mind-mcp#54 change-feed-close-the-decisions-hardening-items-and-test-gap

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 effort high

Run: 20261115T034951Z-132d289f

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

Open risks:

  1. Ruling 8 orders #52 -> #54 -> #56 after #13 and #58, and the #52 spec also writes README.md and SECURITY.md (CONV-37 refuses a shared-file batch). aae7999 (#63) may be #52's merge. The drain must check #52 is closed before dispatch, and rebaseline the README/SECURITY hashes if #52 lands after spec base aae7999. [sequencing — blocked by #52, #13, #58]
  2. Item 3 lean is to document the rule: a removed Consumer's position stays, and a reused name inherits it. A code reset would need either the api positions guard to allow DELETE on consumers (store.py:128,290-293), which widens the api's only write, or sync to know Consumer names, which a split sync.toml does not hold. Question: accept documentation only, or open a follow-up for a guarded startup DELETE of unconfigured names? [decision]
  3. Item 6 lean compares all secret values pairwise (read, evidence, Consumer and Feeder tokens, store key including its strip().lower() form, tombstone salt), including salt vs key, which is slightly wider than the issue. This refuses boot for any deployment that reused a value across roles. Question: accept pairwise-all, or limit it to tokens vs {Feeder token, key, salt}? [decision]
  4. Item 2 lean sets busy_timeout=1000 on the positions connection, so a forward ack during a long sync page transaction answers store-unavailable after about 1 s instead of waiting up to 5 s. Question: is 1 s right, or should forward acks keep 5 s now that no-op and garbage acks no longer take the lock? [decision]
  5. The Half-A sandbox could not run the repo interpreter (operation not permitted). The item-13 error form (config=error code=config-validation at=feed for [feed] consumers = []) and every mutation-kill claim are reasoned from config.py:132-137, load_config:247-255 and the existing test tests/test_config_cli.py:1160-1175. Check on the host: make check stays green, and in the PR each item-14–19 mutation applied by hand fails its named test in under 60 s. [verification]
  6. Re-slice: slice B (items 8 legend cap, 9 requires-python/ELOOP, 10 config-file inode, 11 NUL in store/tombstone path; notes on feed_needs_auth, secret-file owner check (T4, k8s init-copy ownership at deploy/k8s/base/messagesmind.yaml:27-48), prune clock step, WAL checkpoint on positions, ADR 0010 Amendment 1 wording) stays outstanding under issueBinding refs. It rewrites store.py, views.py, startup.py and tests/test_server.py, so it must be specced after this slice merges. Question: file slice B as a new issue, or re-run produce on #54 after merge? [decision]

Change: Slice A of 2 (issueBinding: refs). Item 2: follow ReadTools._read (server.py:286-288). messages_changes_ack (server.py:356-361) first shape-checks the cursor with a new kit/page.parse_cursor, split from decode_cursor at page.py:79. It then validates on a reader through a new views.ack_reply, which shares feed.check_seq lifted from kit/feed.py:37-40, and opens acking() only when the position would move forward. views.ack still re-validates inside the write transaction. open_positions gets a 1 s busy_timeout through an _open_guarded keyword. store.transaction (store.py:159-171) rolls back only if conn.in_transaction and keeps the first error. startup.start (startup.py:92-126) gates Consumer-token reads on CONSUMER_TOKEN_VERBS alone, and compares every secret value the verb read pairwise through a new kit/scopes.first_equal over _equal. It raises tokens-equal at the exact pair of locations. Tokens.scrub replaces the longest token first, and Tokens stores MappingProxyType(dict(consumers)). The dead require_consumer is deleted. README/SECURITY: ruling 2B "Never give People Mind a Consumer token" (README.md:279, SECURITY.md:25), plus doc-only items 3, 4, 7 and 13, the item-6 sentence and the Backfill sentence, each with its pinned test in tests/test_feed.py. Test gaps 14–19 and item 5 are each pinned by a named mutation-killing test.

Files: src/messages_mind_mcp/server.py · src/messages_mind_mcp/store.py · src/messages_mind_mcp/views.py · src/messages_mind_mcp/startup.py · src/messages_mind_mcp/kit/feed.py · src/messages_mind_mcp/kit/page.py · src/messages_mind_mcp/kit/scopes.py · README.md · SECURITY.md · tests/test_server.py · tests/test_feed.py · tests/conftest.py · tests/test_kit.py · tests/test_config_cli.py · tests/test_store.py

Decision: accept the 6 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-15-change-feed-close-the-decisions-hardening-items-and-test-gap.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-change-feed-close-the-decisions-hardening-items-and-test-gap.md

### ⏸ SVD architect gate: dev/messages-mind-mcp#54 change-feed-close-the-decisions-hardening-items-and-test-gap **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 effort `high` **Run:** `20261115T034951Z-132d289f` **Held because:** CLEAN but 6 open risk(s) (1 sequencing · 1 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Ruling 8 orders #52 -> #54 -> #56 after #13 and #58, and the #52 spec also writes README.md and SECURITY.md (CONV-37 refuses a shared-file batch). aae7999 (#63) may be #52's merge. The drain must check #52 is closed before dispatch, and rebaseline the README/SECURITY hashes if #52 lands after spec base aae7999. [sequencing — blocked by #52, #13, #58] 2. Item 3 lean is to document the rule: a removed Consumer's position stays, and a reused name inherits it. A code reset would need either the api positions guard to allow DELETE on consumers (store.py:128,290-293), which widens the api's only write, or sync to know Consumer names, which a split sync.toml does not hold. Question: accept documentation only, or open a follow-up for a guarded startup DELETE of unconfigured names? [decision] 3. Item 6 lean compares all secret values pairwise (read, evidence, Consumer and Feeder tokens, store key including its strip().lower() form, tombstone salt), including salt vs key, which is slightly wider than the issue. This refuses boot for any deployment that reused a value across roles. Question: accept pairwise-all, or limit it to tokens vs {Feeder token, key, salt}? [decision] 4. Item 2 lean sets busy_timeout=1000 on the positions connection, so a forward ack during a long sync page transaction answers store-unavailable after about 1 s instead of waiting up to 5 s. Question: is 1 s right, or should forward acks keep 5 s now that no-op and garbage acks no longer take the lock? [decision] 5. The Half-A sandbox could not run the repo interpreter (operation not permitted). The item-13 error form (config=error code=config-validation at=feed for [feed] consumers = []) and every mutation-kill claim are reasoned from config.py:132-137, load_config:247-255 and the existing test tests/test_config_cli.py:1160-1175. Check on the host: make check stays green, and in the PR each item-14–19 mutation applied by hand fails its named test in under 60 s. [verification] 6. Re-slice: slice B (items 8 legend cap, 9 requires-python/ELOOP, 10 config-file inode, 11 NUL in store/tombstone path; notes on feed_needs_auth, secret-file owner check (T4, k8s init-copy ownership at deploy/k8s/base/messagesmind.yaml:27-48), prune clock step, WAL checkpoint on positions, ADR 0010 Amendment 1 wording) stays outstanding under issueBinding refs. It rewrites store.py, views.py, startup.py and tests/test_server.py, so it must be specced after this slice merges. Question: file slice B as a new issue, or re-run produce on #54 after merge? [decision] **Change:** Slice A of 2 (issueBinding: refs). Item 2: follow ReadTools._read (server.py:286-288). messages_changes_ack (server.py:356-361) first shape-checks the cursor with a new kit/page.parse_cursor, split from decode_cursor at page.py:79. It then validates on a reader through a new views.ack_reply, which shares feed.check_seq lifted from kit/feed.py:37-40, and opens acking() only when the position would move forward. views.ack still re-validates inside the write transaction. open_positions gets a 1 s busy_timeout through an _open_guarded keyword. store.transaction (store.py:159-171) rolls back only if conn.in_transaction and keeps the first error. startup.start (startup.py:92-126) gates Consumer-token reads on CONSUMER_TOKEN_VERBS alone, and compares every secret value the verb read pairwise through a new kit/scopes.first_equal over _equal. It raises tokens-equal at the exact pair of locations. Tokens.scrub replaces the longest token first, and Tokens stores MappingProxyType(dict(consumers)). The dead require_consumer is deleted. README/SECURITY: ruling 2B "Never give People Mind a Consumer token" (README.md:279, SECURITY.md:25), plus doc-only items 3, 4, 7 and 13, the item-6 sentence and the Backfill sentence, each with its pinned test in tests/test_feed.py. Test gaps 14–19 and item 5 are each pinned by a named mutation-killing test. **Files:** `src/messages_mind_mcp/server.py` · `src/messages_mind_mcp/store.py` · `src/messages_mind_mcp/views.py` · `src/messages_mind_mcp/startup.py` · `src/messages_mind_mcp/kit/feed.py` · `src/messages_mind_mcp/kit/page.py` · `src/messages_mind_mcp/kit/scopes.py` · `README.md` · `SECURITY.md` · `tests/test_server.py` · `tests/test_feed.py` · `tests/conftest.py` · `tests/test_kit.py` · `tests/test_config_cli.py` · `tests/test_store.py` **Decision:** accept the 6 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-15-change-feed-close-the-decisions-hardening-items-and-test-gap.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-change-feed-close-the-decisions-hardening-items-and-test-gap.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/messages-mind-mcp#54 change-feed-close-the-decisions-hardening-items-and-test-gap completed integration verify.

  • PR: #67
  • Branch: feat/svd-dev-messages-mind-mcp-54-change-feed-close-the-decis-2c5fc911
  • Commit: 2efd6b6a7b
  • 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/63/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Item 6 adds a tokens-equal refusal at boot: a deployment whose key, salt, Feeder and token files share a value stops starting (spec riskFlag; name it in the PR).
  • Warning: Spec open risk 5: the hand-applied mutation kill for items 14-19 (fail in under 60 s) was not independently re-run here.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261115T041011Z-2c5fc911 --confirm-merge)
spec-verify-dispatch Half B for dev/messages-mind-mcp#54 change-feed-close-the-decisions-hardening-items-and-test-gap completed integration verify. - PR: https://git.groupthink.asia/dev/messages-mind-mcp/pulls/67 - Branch: feat/svd-dev-messages-mind-mcp-54-change-feed-close-the-decis-2c5fc911 - Commit: 2efd6b6a7b1021aaadf2b6be8643226cb8188ffc - 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/63/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Item 6 adds a tokens-equal refusal at boot: a deployment whose key, salt, Feeder and token files share a value stops starting (spec riskFlag; name it in the PR). - Warning: Spec open risk 5: the hand-applied mutation kill for items 14-19 (fail in under 60 s) was not independently re-run here. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261115T041011Z-2c5fc911 --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#54
No description provided.