2.0 KiB
2.0 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, references, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | references | priority | ordinal | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-16 | Orchestrate recurring Convex agent jobs and audit lifecycle | In Progress | 2026-06-03 19:14 | 2026-06-05 19:49 |
|
|
|
high | 16000 |
Description
Implement the scheduled and manual background workflow using Convex. The MVP permits only one active agent run at a time, supports campaign cron runs and manual Jetzt ausführen runs, and manages public audit lifecycle notifications and deactivation.
Acceptance Criteria
- #1 Convex cron or scheduled functions trigger active campaigns according to cadence
- #2 Jetzt ausführen starts a campaign run immediately only when no other agent run is active
- #3 Cron skips or queues safely when an agent run is already active, with visible run logs
- #4 Published audits older than 30 days create dashboard notifications asking whether to keep active
- #5 Published audits older than 60 days auto-deactivate unless manually extended or later reactivated
Implementation Plan
- Add global agent-run lock or equivalent single-active-run guard.
- Implement scheduled campaign runner using Convex cron/scheduling.
- Wire manual Jetzt ausführen to the same runner and limits.
- Add run logs and dashboard-visible status updates.
- Add audit lifecycle checks for 30-day notification, 60-day deactivation, and reactivation.
Implementation Notes
Started implementation pass for recurring Convex agent jobs, run locking, logs, and audit lifecycle.
Implemented and verified Convex crons, due-campaign runner, single-active-run guard, visible campaign run logs, and audit lifecycle notification/deactivation controls. Verification: pnpm test 305/305; pnpm lint 0 errors.