debate_signal_advance
- Category: debate
- Access: write
- Audience: internal (ordinary users do not normally call this directly)
Purpose
Records a durable consumption receipt: advances the (session, role, topic) compound cursor to a specific message. The target must be addressed to the caller, so nothing can be skipped over.
Arguments
Required: session_id, role, topic_id, last_processed_msg_id.
-
session_id. Note: Cursor owner; must be caller-owned. -
role. -
topic_id: existing debate topic. -
last_processed_msg_id. Note: Must name a message addressed to the caller; the timestamp is derived from the preserved message, never caller-supplied.
Result
Object with session_id, role, topic_id, last_processed_msg_id, last_processed_ts, last_check_at, and worker_claim when a worker claim completes on this receipt.
Boundaries
Advancing requires the target to be addressed to the caller's role or session; unaddressed targets are rejected rather than skipped. Cursors move monotonically and must not precede delivery on debate/v1 topics. Completing a recipient's delivery affects only that recipient.
Lifecycle / side effects
Persists the new cursor with an audit/history event, completes that recipient's delivery marker, acknowledges TASK_ALARM reminders, and completes the matching worker claim on terminal replies. At-most-once consumption per recipient rests on this receipt.
Errors
Unaddressed, regressive, or unknown message ids are rejected. Missing claims and inactive parent bindings fail without moving any cursor.
Example
{
"last_processed_msg_id": "<uuid>",
"role": "CONDUCTOR",
"session_id": "<uuid>",
"topic_id": "<uuid>"
}
Result shape:
{
"last_check_at": "<iso-8601>",
"last_processed_msg_id": "<uuid>",
"last_processed_ts": "<iso-8601>",
"role": "CONDUCTOR",
"session_id": "<uuid>",
"topic_id": "<uuid>"
}
See also
debate_signal_check, debate_advance_watermark, debate_post_with_recipients, debate_worker_claim, debate_binding_list.