Skip to content

feat(swarm): close conformance gaps and enforce spec review loop - #20

Merged
reoring merged 3 commits into
mainfrom
roboppi/loop-20260227-121443
Mar 2, 2026
Merged

reoring merged 3 commits into
mainfrom
roboppi/loop-20260227-121443

Conversation

@reoring

@reoring reoring commented Mar 2, 2026 •

Copy link
Copy Markdown
Owner

What

Add Swarm v1 (agent teams) as a first-class, file-backed coordination substrate (mailbox + tasks), with a JSON-only CLI surface and workflow/TUI integration.

Key User-Facing Changes

  • New roboppi swarm CLI (JSON-only stdout):
    • members list
    • message send|broadcast|recv|ack (incl. recv --wait-ms + claim tokens)
    • tasks add|list|claim|complete
    • housekeep (mailbox + task recovery)
  • Workflow YAML: top-level swarm: config (members + seed tasks) and injected ROBOPPI_SWARM_* env vars.
  • TUI: new Swarm tab + swarm_* ExecEvents (metadata-only; no message bodies/task descriptions).
  • Worker capability wiring: MAILBOX / TASKS plumbed through CLI/workflow/daemon layers (Claude Code allowlist maps to restricted roboppi swarm:*).

Implementation Notes

  • Maildir-style store: tmp+rename for deliver/claim/ack; deterministic ordering where relevant.
  • Crash recovery:
    • mailbox: stale processing/ requeue + bounded retries + dead-letter.
    • tasks: stale in_progress/ requeue to pending/ with atomic metadata rewrite (task_requeued).
  • Safety:
    • strict size caps for messages/tasks
    • explicit path-safety validation for tool-facing inputs
    • metadata-only _events.jsonl for audit/observability
  • Coordinator:
    • periodic housekeeping
    • tails _events.jsonl into the ExecEvent sink
    • bounded shutdown (request/timeout/abort) + cleanup policy from team.json

Docs

  • Design: docs/features/swarm.md
  • Conformance spec + checklist: docs/spec/swarm.md

Validation

  • CI: make test-all
  • Focused coverage:
    • unit: tests/unit/swarm/*
    • AT: tests/at/swarm-cli.test.ts, tests/at/swarm-supervised-custom.test.ts

@reoring
reoring merged commit 4cdb4e1 into main Mar 2, 2026
2 checks passed
@reoring
reoring deleted the roboppi/loop-20260227-121443 branch March 2, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant