Skip to content

Coordinate durable external stream ordering with Podium - #1169

Draft
lpukatch wants to merge 1 commit into
devfrom
feat/coordinated-external-ordering
Draft

lpukatch wants to merge 1 commit into
devfrom
feat/coordinated-external-ordering

Conversation

@lpukatch

Copy link
Copy Markdown
Collaborator

Managed channels currently rerank streams during generation even when Podium owns the intended order. This adds durable per-channel ordering ownership and PUT /api/v1/channels/by-dispatcharr/{id}/external-order for core/plugin event and team channels, plus an explicit return-to-Teamarr control in the channel list.

The endpoint validates full membership edits, commits ownership and recovery intent before the Dispatcharr write, confirms the live result, then finalizes positions, the order hash and memberships. Failed or interrupted writes remain fenced until an idempotent retry succeeds. Generation and reorder-only passes share a cross-process lock; the final stream-write boundary preserves surviving live order and appends new members across lifecycle, drift, pin and team/plugin paths.

Rollout requires Teamarr first, a shared database/lock directory across workers, and a single Teamarr manager for each Dispatcharr channel. Keep PODIUM_TEAMARR_EXTERNAL_ORDERING=false until Teamarr is deployed and smoke-tested. Unknown additions and disallowed windows return 422. Unmanaged acknowledgements are side-effect free; unmanaged adoption/remapping is operationally excluded during the direct-write handoff. Disabling Podium does not release stored ownership.

Validation:

  • Ruff and frontend production build pass.
  • 72 contract tests pass; 14 focused recovery/migration/unassign checks and the historical-membership regression also pass.
  • Full backend suite is running in four isolated processes; results will be added before this PR is marked ready.

Bead: teamarr-76mo. Target: dev. Leave unmerged.

This branch has not been deployed

No deployments
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