debate_post
- Category: debate
- Access: write
- Audience: advanced (ordinary users do not normally call this directly)
Purpose
Appends one broadcast message to a debate topic after atomic pre-store validation. Use it for contributions the whole topic may see; for named recipients use debate_post_with_recipients.
Arguments
Required: topic_id, role, priority, kind, body.
Optional: author_session_id, body_mode, payload_json, protocol_version, reply_to, standing, vehicle.
-
topic_id: existing debate topic. -
role: must appear in declared roles. Note: Must be a declared topic role owned by one of the caller's authenticated bindings. -
priority: H | M | L | INFO. -
kind. -
body: non-empty. -
author_session_id. Note: When supplied it must be a session the caller owns; star is no exception. Empty keeps the unattributed legacy shape. -
body_mode. -
payload_json. Note: debate/v1 structured payloads require non-empty summary, assumptions[], and evidence_refs[]. -
protocol_version. -
reply_to: optional msg_id in same topic. -
standing. -
vehicle. Note: Empty defaults to analysis; implementation-tagged work fails closed downstream rather than here.
Result
Object with msg_id, ts (authoritative timestamp), topic_state, and vehicle (defaults to analysis), plus debate/v1 fields (protocol_version, round_no, body_mode, protocol_state) when the topic runs under debate/v1.
Boundaries
Authorship authority comes from the caller's authenticated binding, never from the role string (star scope covers project visibility only, never role ownership). Unknown topic, undeclared role, or unowned role answer with uniform not-found/denied vocabulary, revealing nothing about membership.
Lifecycle / side effects
Validates fully before anything is preserved; a rejection preserves nothing. Under debate/v1 the post also advances phase/round state and may complete worker-claim side effects. Messages are never edited or physically removed.
Errors
Empty body, unknown kinds, bad reply targets, malformed ids, and payload/phase/kind gate violations are rejected. Closed topics block posts per lifecycle rules. Conductor action without an owned binding must travel via debate_add_role or the override machinery, never by asserting a foreign role.
Example
{
"body": "Adopt musl-first packaging.",
"kind": "DECISION",
"priority": "H",
"role": "CONDUCTOR",
"topic_id": "<uuid>"
}
Result shape:
{
"msg_id": "<uuid>",
"topic_state": "ACTIVE",
"ts": "<iso-8601>",
"vehicle": "analysis"
}
msg_id and ts are assigned by the server; placeholders stand for the returned values.
See also
debate_post_with_recipients, debate_read, debate_signal_check, debate_state, debate_compact.