Skip to content
SHAMPOO

Tool catalogue

debate_compact

Write · Internal · Debate

debate_compact

  • Category: debate
  • Access: write
  • Audience: internal (ordinary users do not normally call this directly)

Purpose

Writes a COMPACTION snapshot that later reads can resume from, keeping long topics bounded. The body must carry OBSERVE / ORIENT / DECIDE / ACT sections.

Arguments

Required: topic_id, role, body.

Optional: since_ts, until_ts.

  • topic_id: existing debate topic.
  • role. Note: Posts as this declared role, so the caller must own its binding.
  • body. Note: Must contain OBSERVE / ORIENT / DECIDE / ACT sections; anything else is rejected before anything is preserved.
  • since_ts. Note: Optional ISO-8601 UTC lower bound recorded in the composed snapshot header.
  • until_ts. Note: Optional ISO-8601 UTC upper bound recorded in the composed snapshot header.

Result

Same post shape: msg_id, ts, topic_state, and vehicle, for the INFO/COMPACTION message.

Boundaries

Ownership authority matches debate_post: the named role must be owned by one of the caller's authenticated bindings, with uniform denial otherwise. Timestamp bounds are validated before ownership is consulted.

Lifecycle / side effects

Preserved as an ordinary INFO/COMPACTION message with an audit/history event. debate_read with since_latest_compaction resumes after the newest snapshot.

Errors

Section-gate failures, malformed timestamps, unknown topics, and unowned roles are rejected; failures preserve nothing.

Example

{
  "body": "OBSERVE: musl build green\nORIENT: static-first\nDECIDE: adopt\nACT: package",
  "role": "CONDUCTOR",
  "topic_id": "<uuid>"
}

Result shape:

{
  "msg_id": "<uuid>",
  "topic_state": "ACTIVE",
  "ts": "<iso-8601>",
  "vehicle": "analysis"
}

See also

debate_read, debate_post, debate_escalate, debate_state.

On this page