Skip to content

PR #14: add monitor-freshness workflow for ingest/reachability drift#14

Merged
khalidsaidi merged 1 commit intomainfrom
feat/monitor-freshness-workflow
Mar 1, 2026
Merged

PR #14: add monitor-freshness workflow for ingest/reachability drift#14
khalidsaidi merged 1 commit intomainfrom
feat/monitor-freshness-workflow

Conversation

@khalidsaidi
Copy link
Owner

Summary

  • add a new scheduled workflow: .github/workflows/monitor-freshness.yml
  • checks public https://ragmap-api.web.app/rag/stats (no secrets needed)
  • fails if freshness drifts beyond thresholds:
    • lastSuccessfulIngestAt older than 36 hours
    • lastReachabilityRunAt older than 18 hours
  • runs every 6 hours, offset by 30 minutes: 30 */6 * * *
  • supports manual workflow_dispatch

Why

  • prevent silent operational regressions from making freshness-based UX appear broken
  • complements reachableMaxAgeHours and 4x/day reachability refresh cadence

Validation

  • workflow YAML reviewed
  • threshold logic and failure messages verified in script body

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee6a4e38f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +32 to +33
ingestAgeHours="$(( (now - ingestEpoch) / 3600 ))"
reachAgeHours="$(( (now - reachEpoch) / 3600 ))"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare freshness age in seconds, not truncated hours

This workflow floors elapsed time to whole hours (/ 3600) before checking the >36 and >18 thresholds, so stale data can pass for up to 59 extra minutes. For example, an ingest timestamp 36h59m old still computes ingestAgeHours=36 and does not fail, which weakens the intended “older than 36h/18h” monitoring guarantees.

Useful? React with 👍 / 👎.

@khalidsaidi khalidsaidi merged commit b838be2 into main Mar 1, 2026
1 check passed
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.

1 participant