You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(company-os): legacy POST /llc/workflows/{company_id} must delegate to the Company OS workflow service and be admin-gated (#14409) #21239
Two create implementations write one table. Legacy POST /llc/workflows/{company_id} (autobot-backend/llc/api/workflows.py:134) is not admin-gated and cannot carry kind / owner_role_id; the Company OS create (autobot-backend/llc/api/company_os.py:164) is admin-gated. A non-admin can create company workflows through the legacy route.
Scope
Maintainer decision 2026-11-09: the legacy path-scoped route delegates to CompanyOsWorkflowService.create, becomes admin-gated, and accepts/returns kind and owner_role_id. The UI keeps using the path-scoped route (company comes from the path, not the session tenant).
Closure check against main @ 4b5a1299da (train #21263, carrying #21246). All 5 ACs verified and ticked:
Single insert path: autobot-backend/llc/api/workflows.pycreate_workflow calls _company_os().create(...) (CompanyOsWorkflowService); the module docstring records "one insert path". The base WorkflowService.create is only reached through the Company OS service (llc/services/company_os/workflows.py:38).
403/201: llc/tests/test_workflows_legacy_create.py::test_non_admin_is_refused_and_admin_creates (403 then 201, 409 on duplicate id); also test_platform_admin_without_membership_is_refused.
kind / owner_role_id: WorkflowCreate carries both, WorkflowResponse returns them; test asserts kind == "workflow" and owner_role_id in the response. Meta skills are refused on this route (test_legacy_create_rejects_meta_skill).
api.ts: WorkflowCreate has status: WorkflowStatus, kind: WorkflowKind, owner_role_id (autobot-frontend/src/types/generated/api.ts ~L108279-108297); verify-generated-types and verify-generated-types-slm are success on the train head.
Activity
fix(llc): strict legacy create validation and kind (#21239)
github-actions commentedon Nov 9, 2026
Landed via the merge train (#21263, merge
4b5a1299da) via #21246mrveiss commentedon Nov 9, 2026
Closure check against
main@4b5a1299da(train #21263, carrying #21246). All 5 ACs verified and ticked:autobot-backend/llc/api/workflows.pycreate_workflowcalls_company_os().create(...)(CompanyOsWorkflowService); the module docstring records "one insert path". The baseWorkflowService.createis only reached through the Company OS service (llc/services/company_os/workflows.py:38).llc/tests/test_workflows_legacy_create.py::test_non_admin_is_refused_and_admin_creates(403 then 201, 409 on duplicate id); alsotest_platform_admin_without_membership_is_refused.kind/owner_role_id:WorkflowCreatecarries both,WorkflowResponsereturns them; test assertskind == "workflow"andowner_role_idin the response. Meta skills are refused on this route (test_legacy_create_rejects_meta_skill).test_both_routes_write_identical_rowscompares name, status, source, kind, owner_role_id, trigger_type, trigger_config, definition.api.ts:WorkflowCreatehasstatus: WorkflowStatus,kind: WorkflowKind,owner_role_id(autobot-frontend/src/types/generated/api.ts~L108279-108297);verify-generated-typesandverify-generated-types-slmaresuccesson the train head.Unblocks #21240 under #14409.
fix(llc): legacy workflow create delegates to the Company OS service (m…