eda: org-owned workflow definitions #471

Closed
opened 2026-10-27 13:36:27 +00:00 by sam · 1 comment
Owner

Orgs add their own workflows on top of the shipped catalogue (docs/prds/event-automation.md 'Workflows belong to orgs'; orgs-and-access.md 'What belongs where'). Enable/disable per org shipped with t2db.42 via the workflow-enablement resource. Definitions are still one instance-wide workflow-definitions resource: resources is keyed by kind alone and the control-plane Query/Command RPCs carry no org, so per-org definitions need the resources key to become (org_id, kind), an org on the control-plane contract, and the caller's org resolved server-side, which is qc8p's access work. Until then the dashboard acts in the default org.

Notes

Implemented in f8dcef01: first-use org workflow resource seeding; refresh of seed-owned org catalogues while preserving operator edits; validation across stored orgs; principal-scoped task pinning with cross-org refusal; per-org binding definition/enablement reads and pending-capture batches; durable identity IDs preserve task org ownership. Regression assertions reproduced against original code. Real PostgreSQL, authenticated gRPC, dashboard workflow listing and work-request admission passed. task check passed exit 0 on the committed tree; race tests for controlplane, daemon and postgres passed. Standards review has no remaining findings. Spec review identified capture ingestion ownership as an upstream gap: tracked separately in archie-core-nit5; surrounding EDA filtering remains archie-core-z66d. This delivers org-owned definitions and task execution, not complete nondefault webhook ingestion.

Close reason

Org-owned workflow documents and execution scoping implemented and verified; upstream capture ingestion ownership tracked separately.


Imported from beads archie-core-t2db.45 · GitHub #1346 · type task · priority P2 · created 2026-09-29 · closed 2026-10-08

Orgs add their own workflows on top of the shipped catalogue (docs/prds/event-automation.md 'Workflows belong to orgs'; orgs-and-access.md 'What belongs where'). Enable/disable per org shipped with t2db.42 via the workflow-enablement resource. Definitions are still one instance-wide workflow-definitions resource: resources is keyed by kind alone and the control-plane Query/Command RPCs carry no org, so per-org definitions need the resources key to become (org_id, kind), an org on the control-plane contract, and the caller's org resolved server-side, which is qc8p's access work. Until then the dashboard acts in the default org. ### Notes Implemented in f8dcef01: first-use org workflow resource seeding; refresh of seed-owned org catalogues while preserving operator edits; validation across stored orgs; principal-scoped task pinning with cross-org refusal; per-org binding definition/enablement reads and pending-capture batches; durable identity IDs preserve task org ownership. Regression assertions reproduced against original code. Real PostgreSQL, authenticated gRPC, dashboard workflow listing and work-request admission passed. task check passed exit 0 on the committed tree; race tests for controlplane, daemon and postgres passed. Standards review has no remaining findings. Spec review identified capture ingestion ownership as an upstream gap: tracked separately in archie-core-nit5; surrounding EDA filtering remains archie-core-z66d. This delivers org-owned definitions and task execution, not complete nondefault webhook ingestion. ### Close reason Org-owned workflow documents and execution scoping implemented and verified; upstream capture ingestion ownership tracked separately. --- _Imported from beads `archie-core-t2db.45` · GitHub #1346 · type task · priority P2 · created 2026-09-29 · closed 2026-10-08_
sam added the mediumtask labels 2026-10-27 13:36:27 +00:00
sam self-assigned this 2026-10-27 13:36:27 +00:00
sam closed this issue 2026-10-27 13:36:27 +00:00
Author
Owner

sam wrote (originally 2026-10-02):

Triage 2026-10-02 @ 11974196: PARTIAL. Shipped: the (org_id, kind) resources key (migration 0021, postgres/resources.go:28); org_id on the control-plane Query/Command/History/Watch contracts (controlplane.proto:39-109) with a default-org fallback; client stamping (controlplanerpc/request.go); and the dashboard acting in the caller's org (webui/authorize.go:90) with tests. NOT shipped: the executing side still reads the default org -- the only production org.WithOrg call is webui/authorize.go:90, so the daemon queries the default org (binding_target.go:28, daemon.go:2016) and refuses a binding defined in another org; ValidateStored/seeding cover the default org only and nothing seeds a new org's document. REMAINING needs a design decision: daemon per-org read vs. recording that execution is instance-wide; seed-on-create vs. shipped-catalogue fallback for the dashboard read. Blocked by qc8p; a non-default org is unreachable in production until cp84.

_sam wrote (originally 2026-10-02):_ Triage 2026-10-02 @ 11974196: PARTIAL. Shipped: the (org_id, kind) resources key (migration 0021, postgres/resources.go:28); org_id on the control-plane Query/Command/History/Watch contracts (controlplane.proto:39-109) with a default-org fallback; client stamping (controlplanerpc/request.go); and the dashboard acting in the caller's org (webui/authorize.go:90) with tests. NOT shipped: the executing side still reads the default org -- the only production org.WithOrg call is webui/authorize.go:90, so the daemon queries the default org (binding_target.go:28, daemon.go:2016) and refuses a binding defined in another org; ValidateStored/seeding cover the default org only and nothing seeds a new org's document. REMAINING needs a design decision: daemon per-org read vs. recording that execution is instance-wide; seed-on-create vs. shipped-catalogue fallback for the dashboard read. Blocked by qc8p; a non-default org is unreachable in production until cp84.
sam added a new dependency 2026-10-27 13:42:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#471