mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-03 04:49:26 +00:00
Feed model: interest follows the assignment relation; notes are pure appends
Worker delivery is now a read-time feed over its slice (assigned ∪ filed) — send-backs, comment answers, reassignments, cancels, and acceptance all arrive through one relation; per-event recipient addressing retired. Reassignment delivers before interest ends; a new assignee replays the item's story. Detail pane gains Add a note (never changes state); external pending/consume become space-scoped feed calls.
This commit is contained in:
@@ -313,10 +313,14 @@ def test_pending_and_consume_over_the_wire(api):
|
||||
)
|
||||
item = lead.create_item("proj", title="Queued", criteria="c")
|
||||
lead.assign("proj", item["id"], "nia")
|
||||
events = nia.pending()
|
||||
events = nia.pending("proj")
|
||||
assert events and events[-1]["kind"] == "item_assigned"
|
||||
nia.consume(events[-1]["seq"])
|
||||
assert nia.pending() == []
|
||||
nia.consume("proj", events[-1]["seq"])
|
||||
assert nia.pending("proj") == []
|
||||
# a comment ANSWER arrives through the same feed — no addressing anywhere
|
||||
lead.comment("proj", item["id"], "start with the v2 endpoint")
|
||||
follow = nia.pending("proj")
|
||||
assert [e["kind"] for e in follow] == ["item_commented"]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------ attachments
|
||||
|
||||
Reference in New Issue
Block a user