mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-11 02:46:45 +08:00
* MUL-7267: fix(autopilot): backfill legacy trigger creators from the autopilot creator Since MUL-6951 a schedule/webhook dispatch acts as the trigger's creator and fails closed without one. Migration 449 left created_by NULL for triggers that predate published_by (migration 189) and were never edited, so every run of those triggers has been recorded as skipped since the upgrade: webhook deliveries still read "dispatched" and schedules still advance, but nothing executes (#8284). Migration 467 fills those rows from the autopilot's creator, the principal automatic dispatch was admitted as before MUL-6951, when that creator is still a member of the workspace. Existing member creators are never rewritten, and dispatch still re-validates membership and invoke access on every run. Co-authored-by: multica-agent <[email protected]> * MUL-7267: docs(autopilot): state the trigger principal backfill as an accepted widening Review follow-up. The 467 comment claimed no trigger gains an authorization it did not pass before the upgrade; that holds for admission only. A pre-MUL-6951 automatic run carried no originator, while a filled trigger now runs, and delegates, as the autopilot's creator. Say so explicitly, as 449 does. created_by is also no longer "written once at creation" for every row: for a legacy trigger it is a principal inferred by backfill (449, then 467), not proof of who created it. Override the created_by_id column comment in 467 (the down migration restores both of 449's comments), regenerate models.go, and align the ResolveAutopilotTriggerPrincipal and dispatch attribution comments. No behavior change. Co-authored-by: multica-agent <[email protected]> * MUL-7267: docs(autopilot): name the trigger principal consistently at call sites Second review follow-up. The admission, dispatch and attribution call sites still called the automation principal "the trigger's creator" and spoke of a "recoverable" or "provable" creator. For a legacy trigger, created_by is a principal inferred by backfill, not proof of who created the trigger. Refer to it as the trigger's created_by principal and point at ResolveAutopilotTriggerPrincipal for the legacy semantics instead. No behavior change. Co-authored-by: multica-agent <[email protected]> --------- Co-authored-by: J <[email protected]> Co-authored-by: multica-agent <[email protected]>