Skip to content
SHAMPOO

Tool catalogue

debate_protocol_maintain

Write · Conductor only · Debate

debate_protocol_maintain

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

Purpose

Runs the deterministic liveness sweeps manually: expired debate/v1 phases move to STALEMATE, and roles missing an active owner gain a recovery binding with cursor carry. Manual invocation only; no scheduler calls it.

Arguments

Optional: topic_ids_csv.

  • topic_ids_csv. Note: Scopes ONLY the missing-role recovery sweep; the phase-timeout sweep is global by design in every run.

Result

Object with timed_out (each with topic_id and reason) and role_recoveries (each with topic_id, role, session_id, generation, and reason), in deterministic topic order.

Boundaries

Conductor callers only. Every listed id validates before anything runs. Recovery skips HUMAN and OPERATOR roles and carries the newest primary-or-completed-worker cursor onto the fresh binding.

Lifecycle / side effects

Timeout moves and recovery bindings persist atomically with audit/history events. Phase moves compare-and-swap so concurrent runs report only true winners; recovery repeats observe the winner and stand down.

Errors

Malformed ids are rejected before any sweep starts. Malformed roster or metadata content fails the whole run rather than sweeping partially.

Example

{
  "topic_ids_csv": ""
}

Result shape:

{
  "role_recoveries": [],
  "timed_out": []
}

See also

debate_protocol_state, debate_judge_prepare, debate_judge_verdict, debate_binding_list, debate_work_queue.

On this page