A non-system org can arm a schedule trigger #49
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#49
Reference in new issue
Block a user
Schedules fire a schedule-fired capture into the owning org, and the org's binding dispatches it. But the schedule-fired mapping is seeded only in the system org, and GetMapping/ListMappings are org-scoped, so a non-system org cannot create the binding (400 mapping not found) and dispatch would fail with 'mapping does not exist'.
Done when: a second org can create a schedule trigger from the dashboard, its firing creates a task in that org running as an agent assigned to that org, and the shared mapping stays read-only to non-system orgs.
Notes
5495c5f6: built_in mappings (schedule-fired) readable by every org, writes stay org-scoped. Remaining: demonstrate a second org's schedule trigger creating a task in that org (needs a running stack).Imported from beads
archie-core-3z4fd.11· GitHub #1704 · type task · priority P2 · created 2026-10-16Triaged: no code change is needed for this. No production change is outstanding in this worktree; the issue is at a verification stage, not a build stage.
What is already in place (verified by reading the tree):
0066_mapping_built_in.sqladdsmappings.built_inand marksschedule-fired/org-sysbuilt_in.queries/edastore.sqlGetMappingandListMappingsincludeOR mappings.built_in(edastore.go passesscopeOrg), so a non-system org can now read the mapping.UpdateMapping/DeleteMappingstill filter byscope_org, so only org-sys can write it.scheduleOrgmaps an org-owned schedule to its org and an instance schedule to org-sys;InsertCapturehonours the schedule org; the schedule-fired event type is seeded so the capture is identified in any org.daemon.dispatchBindings/dispatchOrgBindingsrun under each org's principal andListUndispatchedCapturesis scoped byorg.OrgFromContext.workflow_identity.godatabaseExecutionIdentityrequires the declared identity to be an active agent whose principal andListOrgAgentsassignment match the task's org.What is not verified: the second and third done-when clauses have no automated coverage.
e2e/checks/org-schedule-trigger.cjsonly proves a beta binding onschedule-firedis accepted (201) and appears on the workflow page. Nothing fires a schedule and asserts the beta task/agent, and nothing asserts that a beta update/delete ofschedule-firedis refused. That is a running-stack demonstration, which the issue note itself says is what remains and which this read-only environment cannot run. Also note the demonstration needs a beta-owned schedule (the check filters on the instance-ownedissue-discovery, which fires into org-sys) and an agent assigned to org-beta (e2e/seed.shcreates org-beta with no agents).Recommendation to the operator: run
task e2e:up, thentask e2e:check -- org-schedule-trigger, then on the stack create a schedule from Beta via the trigger editor's "New schedule…", assign/settle a Beta agent, arm the trigger, and run the schedule now; confirm a task in org-beta runs as that agent and that a Beta edit/delete ofschedule-firedreturns the scoped refusal. If any step fails, that failure names the defect and a new triage should pick the workflow — the failing step, not the existing code, would then decide between a fix and a feasibility write-up.