Skip to content

Tune cycle freshness for nightly source dreams#2505

Open
sene1337 wants to merge 2 commits into
garrytan:masterfrom
sene1337:hypatia/cycle-freshness-nightly-thresholds
Open

Tune cycle freshness for nightly source dreams#2505
sene1337 wants to merge 2 commits into
garrytan:masterfrom
sene1337:hypatia/cycle-freshness-nightly-thresholds

Conversation

@sene1337

Copy link
Copy Markdown

Summary

This PR makes doctor.cycle_freshness match an intentionally once-nightly dream cadence:

  • scopes the check to operating sources via doctor.cycle_freshness.source_allowlist / source_ignorelist, with DREAM_SOURCE_ALLOWLIST as a runtime fallback
  • adds DB-configured threshold keys: doctor.cycle_freshness.warn_hours and doctor.cycle_freshness.fail_hours
  • keeps env vars as the highest-precedence override for emergency/operator use
  • registers the new keys so gbrain config set ... works without --force

Why

A once-nightly dream cron cannot stay green under the old 6h warn / 24h fail defaults, even when it is healthy. Operators can now set daily-with-grace thresholds once in DB config, e.g. warn at 30h and fail at 48h, and have both interactive and HTTP/remote doctor use the same cadence.

Verification

  • bun test test/doctor-cycle-freshness.test.ts test/config-set.test.ts
  • bun run typecheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants