viettranx
619b253b82
fix(tasks): inject tenant ctx in task ticker to prevent nil panic
Root cause: ticker's recoverCtx had no tenant → PGTeamStore.GetTeam returned silent (nil, nil) → team.LeadAgentID nil-deref panic
- Fix notifyLeaders: composite cache keys {TeamID, TenantID}, inject scopeCtx = store.WithTenantID(ctx, scope.TenantID) before GetTeam/GetByID/GetTask, nil-check team + lead agent
- Fix processFollowups: per-team scopeCtx from teamTasks[0].TenantID, nil-check team before followupInterval(*team)
- Add TenantID field to TeamTaskData + scan paths in PG and SQLite stores
- Bonus: GetTask(scopeCtx, ...) propagates tenant for peerKind session routing (related #266)
- Tests: upgrade stub to function-based dispatch + ctx capture, add 6 regression tests (nil-team no-panic, multi-tenant cache isolation, cache hit dedup, multi-tenant ctx in processFollowups)
- Docs: scheduling-cron guide notes tenant-ctx injection requirement for background workers
2026-04-14 10:05:57 +07:00
..
2026-03-27 09:28:42 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-04-06 12:54:44 +07:00
2026-04-12 14:31:51 +07:00
2026-04-12 10:24:07 +07:00
2026-04-11 21:22:23 +07:00
2026-04-11 21:22:23 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-29 22:33:17 +07:00
2026-03-27 09:28:42 +07:00
2026-04-02 08:23:01 +07:00
2026-04-10 19:40:44 +07:00
2026-03-30 15:19:43 +07:00
2026-04-09 23:40:46 +07:00
2026-04-13 21:29:11 +07:00
2026-04-01 11:12:35 +07:00
2026-04-09 21:29:48 +07:00
2026-04-10 13:32:02 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-13 10:59:27 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-04-05 13:13:02 +07:00
2026-03-27 09:28:42 +07:00
2026-03-28 08:31:18 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-04-11 21:22:23 +07:00
2026-04-12 12:37:10 +07:00
2026-04-12 12:37:10 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-03-30 14:12:08 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-04-12 17:32:34 +07:00
2026-04-09 21:29:48 +07:00
2026-03-30 21:58:29 +07:00
2026-03-30 21:58:29 +07:00
2026-03-27 09:28:42 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-04-09 21:29:48 +07:00
2026-03-27 09:28:42 +07:00
2026-04-11 21:22:23 +07:00
2026-04-11 21:22:23 +07:00
2026-03-27 09:28:42 +07:00
2026-04-14 10:05:57 +07:00
2026-04-09 21:29:48 +07:00
2026-04-12 08:55:15 +07:00
2026-04-12 08:55:15 +07:00
2026-04-10 19:35:02 +07:00
2026-03-27 09:28:42 +07:00
2026-03-27 09:28:42 +07:00
2026-04-08 15:56:18 +07:00
2026-04-12 18:06:51 +07:00
2026-04-13 10:59:27 +07:00
2026-04-11 21:22:23 +07:00
2026-04-11 21:22:23 +07:00