Change feed: any read-token holder can move any Consumer's position #40
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#40
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?
What happens
PR #39 (issue #15) adds named Consumers to the change feed. A Consumer name is a label, not a credential:
require_consumerchecks only that the name is in[feed] consumers.messages_changes_ackwith the name of another Consumer and a cursor that it built itself. The epoch tag appears in every cursor, so building a valid cursor is easy.dae5828proved this by running it with synthetic fixtures. A session that acted as one Consumer acknowledged position 3 for a second Consumer. The second Consumer then read an empty page.Why it matters
unsendevents. When the deletion slice (#13) lands, they will includedelevents, which ADR 0005 relies on to remove downstream copies.What to decide
SECURITY.md: a Consumer name is not a credential, and any read-token holder can move any Consumer.Also in this PR
kit/scopes.py:3still says "No scope can write." The read scope now writes Consumer positions. Make the docstring matchSECURITY.md.tests/test_log_scan.py:CODESdoes not includeunknown-consumer,cursor-expiredorcursor-ahead, so the log scan does not cover the error paths of the feed.Acceptance criteria
SECURITY.mdstates the accepted risk in one sentence.kit/scopes.pydocstring matchesSECURITY.md.Human act
T4 merge: the operator merges the #15 rework PR, which closes this issue (CONV-40)
Blocked by
Filed under: operator word "Grant" sha256:78b7d0379d5e
Two more findings from the correctness review of
dae5828(PR #39), proved by mutation:store.py:336: the ack's write guard has no test. Replacingguard=_positions_onlyinacking()with an allow-all authorizer leaves every test green. The guard tests intest_store.pycoveropen_positions, butacking()calls_open_guardeddirectly. Fix: routeacking()throughopen_positions(), or add a test that a write to another table insideacking()is refused.cli.py:46: removingconsumers=cfg.feed.consumersfrom thebuild_appcall leaves every test green. In production every Consumer would then getunknown-consumer. Fix: a test of theapiverb with a[feed] consumersconfig.Smaller: no test pins
EVENTS_RETENTION_DAYS == 30(1 day and 3,650 days both pass), and no test covers adelevent whose message row still exists (views.py:339).Filed under: operator word "Grant" sha256:78b7d0379d5e
Triage
delevents through the feed.kit/scopes.pydocstring.cli.pywiring of[feed] consumers.acking().EVENTS_RETENTION_DAYS(ADR 0010 Amendment 1).delevent with a live row.unknown-consumerno longer reaches the feed tools, so R8 listscursor-expiredandcursor-aheadonly.ready-for-human. The #15 diff writesconfig.example.toml, so its merge is T4 and is the operator's act.Disposition: this issue stays open,
Blocked by #15. The #15 rework PR closes it when it merges.