Skip to content

fix: restore hourly execution for Intent Signal Discovery (workflow c10f1d63) #10

Description

@princepspolycap

Problem

Intent Signal Discovery is not actually running hourly in Poly Operations.

Evidence

  • Workflow: c10f1d63-0e63-4c03-bfea-aa16c31d2a6a::1.0
    • execution_status=RUNNING
    • is_scheduled=false
  • Hourly task: 8c929111-2380-49bb-b07d-e6c2429927c3::1.0
    • is_recurring=true
    • recurrence_pattern=hourly
    • execution_status=not_started
    • stale timestamps (updated_at + next_recurrence_date stuck on 2026-03-24)
  • Known blocker in escalation record: UserConcurrencyLimitError and reset behavior.

This creates orchestration drift: workflow marked running while no tasks execute.

Goal

Make Stage 1 Intent Signal Discovery reliably execute every hour with observable proof.

Scope

  1. Reconcile state drift between workflow-level RUNNING and task-level not_started.
  2. Clear/handle orphaned active executions so concurrency checks stop blocking valid runs.
  3. Enforce a single scheduler source of truth (pick one):
    • workflow-level scheduler (is_scheduled=true + hourly config), OR
    • stage-level cadence (auto_trigger=true, cadence_hours=1).
  4. Add guardrails so stale next_recurrence_date < now is auto-recovered.
  5. Add monitoring signal for missed cadence (last_cycle_completed_at > 90m).

Acceptance Criteria

  • A 6-hour observation window shows >=5 successful hourly cycles.
  • Task updated_at advances roughly hourly.
  • next_recurrence_date always rolls forward to future (~+1h).
  • No UserConcurrencyLimitError blocks on normal hourly runs.
  • RUNNING state reflects actual active task execution (no false RUNNING idle state).
  • Alert fires when cadence misses 90 minutes.

Verification Plan

  • Run staged test in non-prod or controlled environment.
  • Capture execution timeline for 6 hours.
  • Include logs for scheduler decisions, lock acquisition/release, and recurrence computation.

References

Priority

High (pipeline health + demand capture reliability).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions