Resolve channel settings and scheduling policy per organisation #50

Closed
opened 2026-10-27 13:34:45 +00:00 by sam · 0 comments
Owner

runtime_config.go layers ChannelSettingsKind and SchedulingPolicyKind from the system org only, and both are instanceOnlyKinds. Channels must become org-owned before chat schedules of non-system orgs can deliver. Done when an org's chat schedule delivers only through a channel that org owns.

Notes

2026-10-27 landed on branch worktree-agent-a70c68a2d0079998c (3 commits). Scheduling policy per org: an org sets dispatch trigger, ack reaction and label (daemon polls each org's repos with its rule, unset fields inherit the instance); poll_interval and max_retries stay system-org only (one daemon tick, no per-org retry seam). Task policy per org: alerts go to the alert's own org webhook, public addresses only, signing key from the org's credential binding 'notify', notify_secret refused. Channel settings per org: org doc is agent + allowed Telegram users + show_tool_calls; bot token is the org's credential binding 'telegram'; messaging (new ChannelOrgs control-plane rpc, messaging-only) runs one bot per org acting as the named agent; Deliver and message.send route by task org to that org's channel only; org chat outcomes return through the org's channel; dashboard pages moved to /org/scheduling-policy, /org/channels, /org/alerts. Not verified live (no Postgres/Telegram). Remaining: (1) chat-created tasks in a non-system org need a chat identity profile in the gateway (see 3z4fd.11); unverified whether org Telegram chat can spawn tasks. (2) /org/alerts and /org/channels have no browser check. (3) ListResources is filtered in memory per 30s tick; add a by-kind query if orgs grow. (4) max_retries per org not done. (5) Instance operator no longer receives other orgs' alerts on the instance webhook. (6) Existing system-org rows need no migration.

Close reason

Per-org scheduling policy, task policy alerts and channels (e363512c..be4fd100). Not exercised on a live stack.


Imported from beads archie-core-3z4fd.12 · GitHub #1703 · type task · priority P2 · created 2026-10-16 · closed 2026-10-26

runtime_config.go layers ChannelSettingsKind and SchedulingPolicyKind from the system org only, and both are instanceOnlyKinds. Channels must become org-owned before chat schedules of non-system orgs can deliver. Done when an org's chat schedule delivers only through a channel that org owns. ### Notes 2026-10-27 landed on branch worktree-agent-a70c68a2d0079998c (3 commits). Scheduling policy per org: an org sets dispatch trigger, ack reaction and label (daemon polls each org's repos with its rule, unset fields inherit the instance); poll_interval and max_retries stay system-org only (one daemon tick, no per-org retry seam). Task policy per org: alerts go to the alert's own org webhook, public addresses only, signing key from the org's credential binding 'notify', notify_secret refused. Channel settings per org: org doc is agent + allowed Telegram users + show_tool_calls; bot token is the org's credential binding 'telegram'; messaging (new ChannelOrgs control-plane rpc, messaging-only) runs one bot per org acting as the named agent; Deliver and message.send route by task org to that org's channel only; org chat outcomes return through the org's channel; dashboard pages moved to /org/scheduling-policy, /org/channels, /org/alerts. Not verified live (no Postgres/Telegram). Remaining: (1) chat-created tasks in a non-system org need a chat identity profile in the gateway (see 3z4fd.11); unverified whether org Telegram chat can spawn tasks. (2) /org/alerts and /org/channels have no browser check. (3) ListResources is filtered in memory per 30s tick; add a by-kind query if orgs grow. (4) max_retries per org not done. (5) Instance operator no longer receives other orgs' alerts on the instance webhook. (6) Existing system-org rows need no migration. ### Close reason Per-org scheduling policy, task policy alerts and channels (e363512c..be4fd100). Not exercised on a live stack. --- _Imported from beads `archie-core-3z4fd.12` · GitHub #1703 · type task · priority P2 · created 2026-10-16 · closed 2026-10-26_
sam added the mediumtask labels 2026-10-27 13:34:45 +00:00
sam self-assigned this 2026-10-27 13:34:45 +00:00
sam closed this issue 2026-10-27 13:34:45 +00:00
sam added a new dependency 2026-11-14 14:45:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#50