channel: add 'merge' verb to fold source channels into an open survivor #15

Closed
opened 2026-06-05 05:24:19 +00:00 by coilysiren · 1 comment
Owner

o2r channel merge - fold source channels into an open survivor

Sibling to the existing channel verbs (#10 list, #11 handoff, #13 request/verify).
Relay route + semantics live in
coilyco-flight-deck/otel-a2a-relay#60 - land that first, this verb calls it.

Why

Several machines often each open their own channel about one event. Concrete case:
a chain of channels all about "runners", all but one already closed, with the
history fragmented across the dead ones. We want to consolidate them into the live
survivor, interleaved by time.

Shape

o2r channel merge <target> <source> [<source>...] [--keep-open]
  • <target> - the survivor channel id (the open one).
  • <source>... - one or more channels to fold in (closed is the normal case).
  • Default closes sources (relay tombstones with merged_into); --keep-open overrides.

Calls POST /agent-channel/{target}/merge with {sources, close_sources}.

Behavior

  • Print what moved: per-source moved event counts, the merge event id in the
    target, and the survivor URL.
  • Surface the state/spec collision warning the relay returns - if a folded
    source's newest state is newer than the survivor's it now wins after merge.
    Tell the operator to re-seed state if needed. Do not bury it.
  • Idempotent: re-running on an already-merged source is a no-op reported cleanly,
    not an error.

Relay side: coilyco-flight-deck/otel-a2a-relay#60.

## `o2r channel merge` - fold source channels into an open survivor Sibling to the existing channel verbs (#10 list, #11 handoff, #13 request/verify). Relay route + semantics live in coilyco-flight-deck/otel-a2a-relay#60 - land that first, this verb calls it. ### Why Several machines often each open their own channel about one event. Concrete case: a chain of channels all about "runners", all but one already closed, with the history fragmented across the dead ones. We want to consolidate them into the live survivor, interleaved by time. ### Shape ``` o2r channel merge <target> <source> [<source>...] [--keep-open] ``` - `<target>` - the survivor channel id (the open one). - `<source>...` - one or more channels to fold in (closed is the normal case). - Default closes sources (relay tombstones with `merged_into`); `--keep-open` overrides. Calls `POST /agent-channel/{target}/merge` with `{sources, close_sources}`. ### Behavior - Print what moved: per-source moved event counts, the `merge` event id in the target, and the survivor URL. - **Surface the state/spec collision warning** the relay returns - if a folded source's newest `state` is newer than the survivor's it now wins after merge. Tell the operator to re-seed `state` if needed. Do not bury it. - Idempotent: re-running on an already-merged source is a no-op reported cleanly, not an error. Relay side: coilyco-flight-deck/otel-a2a-relay#60.
Author
Owner

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: burndown-2026-06.

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: `burndown-2026-06`.
coilysiren 2026-06-17 08:23:40 +00:00
Commenting is not possible because the repository is archived.
No description provided.