Skip to content

fix(operator): calendar failure cooldown + workflows.resume replay guard#466

Merged
webdevtodayjason merged 1 commit into
devfrom
fix/operator-reality-wave2
Jul 2, 2026
Merged

fix(operator): calendar failure cooldown + workflows.resume replay guard#466
webdevtodayjason merged 1 commit into
devfrom
fix/operator-reality-wave2

Conversation

@webdevtodayjason

Copy link
Copy Markdown
Contributor

Wave 2 of the operator-reality fixes — see commit body for full detail. Code: calendar 5-min failure cooldown (kills the tight gog error loop), workflows.resume atomic replay guard (force=true escape hatch for stuck runs). Data fixes executed live: Morning Brief 2.0 node kinds restored (dryRun now clean, still parked), 21+29 stale running rows swept, AppForge 401 verified already fixed by #460.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T3dkQzz2mSrSNtGBE9cmXr

Wave 2 of the operator-reality fixes:

- Dashboard calendar: runGogCalendarEvents gets a 5-minute failure
  cooldown. A broken gog state (expired OAuth, DNS outage) cost a
  blocking 10s shell-out per dashboard poll per queued account — a
  permanent tight error loop in dashboard-api.err.log. Now one real
  attempt per window; success clears the cooldown.

- workflows.resume is no longer replayable: the approval row's
  "approved" status is terminal and never consumed, so gating on it
  alone let every repeat call re-execute the remaining pipeline
  (duplicate side effects — confirmed by the 2026-07-02 adversarial
  review). Resume now requires an atomic waiting_approval → running
  claim; force=true bypasses it (logged) to re-drive a run stuck in
  "running" after a dead resume.

Live-data fixes alongside (not in diff):
- "Morning Brief Podcast 2.0" (832f855e): podcast-script-agent and
  podcast-plan nodes had NO kind field, so validation couldn't see
  Podcast Plan upstream of Podcast Generate — the workflow failed in
  33ms every morning and fed the failed-run-alerter. Kinds restored;
  workflows.dryRun now returns ok:true, issues:[]. Left parked.
- Stale-run sweep: 21 workflow_runs + 29 job_runs stuck status='running'
  (some since March) marked failed with an audit note.
- AppForge 401: verified already fixed by the #460 token-preference
  change — /api/apps returns 200 live; the audit's hits predated it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3dkQzz2mSrSNtGBE9cmXr
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 95a3749c-3252-445f-b089-34c0841a0d38

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/operator-reality-wave2

Comment @coderabbitai help to get the list of available commands.

@webdevtodayjason
webdevtodayjason merged commit c4780cc into dev Jul 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant