molecule-core/platform/migrations
rabbitblood 3249d3ffdb fix(scheduler): detect phantom-producing crons via consecutive-empty tracking (#795)
Post-mortem fix: UIUX Designer ran 22 cron fires over 23 hours with
every single response being empty or '(no response generated)'. The
scheduler reported status=ok because the HTTP call succeeded — nobody
caught it until the CEO asked.

Changes:
- Migration 032: adds consecutive_empty_runs INT to workspace_schedules
- scheduler.go: captures response body from ProxyA2ARequest (was _),
  checks for empty/sentinel markers via isEmptyResponse(), increments
  consecutive_empty_runs on empty ok responses, resets on non-empty.
  When consecutive_empty_runs >= 3, sets last_status='stale' with a
  descriptive error message.

The 'stale' status is surfaced via:
- GET /admin/schedules/health (merged in #671)
- PM's silence detector (companion fix in org-template PR)
- Maintenance loop response-body sampling (operator-side fix)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 11:11:05 -07:00
..
001_workspaces.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
002_agents.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
003_events.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
004_secrets.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
005_canvas_layouts.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
006_workspace_config_memory.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
007_approvals.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
008_agent_memories.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
009_activity_logs.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
010_workspace_awareness.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
011_workspace_runtime.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
012_global_secrets.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
013_workspace_dir.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
014_indexes.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
015_workspace_schedules.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
016_workspace_channels.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
017_memories_fts_namespace.down.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
017_memories_fts_namespace.up.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
018_secrets_encryption_version.down.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
018_secrets_encryption_version.up.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
019_workspace_access.down.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
019_workspace_access.up.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
020_workspace_auth_tokens.down.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
020_workspace_auth_tokens.up.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
021_delegation_idempotency.down.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
021_delegation_idempotency.up.sql initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
022_workspace_schedules_source.down.sql fix(schedules): backfill legacy rows to 'template' + extract import SQL const 2026-04-14 14:30:22 -07:00
022_workspace_schedules_source.up.sql fix(schedules): backfill legacy rows to 'template' + extract import SQL const 2026-04-14 14:30:22 -07:00
023_workspace_memory_version.down.sql feat(memory): optimistic-locking via if_match_version on workspace_memory writes 2026-04-16 02:32:46 -07:00
023_workspace_memory_version.up.sql feat(channels): Lark / Feishu adapter (outbound webhook + Events API inbound) 2026-04-16 07:10:58 -07:00
024_channel_budget.down.sql feat(channels): per-channel message budget with 429 enforcement (#368) 2026-04-16 11:17:14 +00:00
024_channel_budget.up.sql feat(channels): per-channel message budget with 429 enforcement (#368) 2026-04-16 11:17:14 +00:00
025_workspace_token_usage.down.sql fix(migrations): close 024→026 gap — rename 026→025 token_usage, 027→026 allowlist (#631) 2026-04-17 06:17:36 +00:00
025_workspace_token_usage.up.sql fix(migrations): TEXT→UUID FK type mismatch blocking all E2E runs 2026-04-16 23:40:22 -07:00
026_org_plugin_allowlist.down.sql fix(migrations): close 024→026 gap — rename 026→025 token_usage, 027→026 allowlist (#631) 2026-04-17 06:17:36 +00:00
026_org_plugin_allowlist.up.sql fix(migrations): TEXT→UUID FK type mismatch blocking all E2E runs 2026-04-16 23:40:22 -07:00
027_workspace_budget.down.sql fix(migrations): renumber budget migration 025→027 to follow gap fix (#631) 2026-04-17 06:22:09 +00:00
027_workspace_budget.up.sql fix(migrations): renumber budget migration 025→027 to follow gap fix (#631) 2026-04-17 06:22:09 +00:00
028_workspace_artifacts.down.sql feat(platform): Cloudflare Artifacts demo integration (#595) 2026-04-17 06:28:58 +00:00
028_workspace_artifacts.up.sql fix(migrations): TEXT→UUID in 028_workspace_artifacts — unblocks all E2E CI 2026-04-17 02:48:08 -07:00
029_workspace_hibernation.down.sql feat(registry): workspace hibernation — auto-pause idle workspaces (#711) 2026-04-17 13:27:39 +00:00
029_workspace_hibernation.up.sql feat(registry): workspace hibernation — auto-pause idle workspaces (#711) 2026-04-17 13:27:39 +00:00
030_audit_events.down.sql chore(migrations): rename 029_audit_events → 030_audit_events (collision with 029_workspace_hibernation) 2026-04-17 16:36:52 +00:00
030_audit_events.up.sql chore(migrations): rename 029_audit_events → 030_audit_events (collision with 029_workspace_hibernation) 2026-04-17 16:36:52 +00:00
031_memories_pgvector.down.sql feat: pgvector semantic search for agent memory recall (#576) 2026-04-17 17:19:45 +00:00
031_memories_pgvector.up.sql feat: pgvector semantic search for agent memory recall (#576) 2026-04-17 17:19:45 +00:00
032_schedule_consecutive_empty.down.sql fix(scheduler): detect phantom-producing crons via consecutive-empty tracking (#795) 2026-04-17 11:11:05 -07:00
032_schedule_consecutive_empty.up.sql fix(scheduler): detect phantom-producing crons via consecutive-empty tracking (#795) 2026-04-17 11:11:05 -07:00