Seed verify uptime history straight into the hourly table, in the background#1815

merged2
main
verify-fast/d1-uptime-seed
opened29d agobyNNick
View on GitHubGitHub import enabledPR last imported 20d ago

up.sh waited about a minute for the uptime seed, which only the Monitoring tab reads. Every other page renders without it.

The seed now writes raw results for the last day only and writes older history straight into uptime_result_hourly, summed the way rollupUptime sums raw probes. Before, it inserted about 78k raw rows and ran 1,081 rollups. It also runs in the background after seed.ts, so up.sh returns before it ends. .verify/run/uptime says ok or failed when it is done, doctor.sh reports it as pending while the seed runs and checks it after, and the verify-dashboard skill tells Monitoring checks to wait on it.

Every state stays. web is Up with 90 days and a closed incident, api is Unreachable, worker is Checking, redis is Unreachable with a 404 at /health, and postgres is Not checked.

Evidence

  • The hourly rows match the real rollup. I ran rollupUptime over the same raw probes and compared it with the seeded rows: 135 rows, none only in one side, every column equal, median included. That needed Postgres's half-to-even rounding for even counts, which the seed now copies.
  • Time to the signed-in page on this commit alone: 67.3 s (one run, load 32), against 124 to 140 s before at load 26 to 32. The stack's interleaved medians are in the top PR.
  • The Monitoring tab on the stack's top, after waiting on .verify/run/uptime, shows every state:

  • doctor.sh on a running instance right after a rerun printed wait uptime seeding (Monitoring tab) and exited 0. Once the seed ended it printed ok uptime seeded and exited 0. With failed written to .verify/run/uptime it printed FAIL uptime seeded and exited 1.

Checks: pnpm typecheck passes. oxlint ignores scripts/**, so lint does not cover this file.

Checks

1 pending Ā· 10 successful Ā· 7 skipped
Checks in progress

In progress1

e69c478
Synced from GitHub

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

āš™ļø Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c3640d0-7ace-474c-bb95-a0ef76bd7f80
šŸ“„ Commits

Reviewing files that changed from the base of the PR and between ed006a0afc9fd5231aeb5aebfc48792a3746087d and e69c478cc72de90d366f55ead9aa3b26bfa126f7.

šŸ“’ Files selected for processing: 5
  • .agents/skills/verify-dashboard/SKILL.md
  • dashboard/scripts/verify/doctor.sh
  • dashboard/scripts/verify/down.sh
  • dashboard/scripts/verify/seed-uptime.ts
  • dashboard/scripts/verify/up.sh
ascii
1 ______________________________________________________________________________________________________
2< What one programmer can do in one month, two programmers can do in two months. - Frederick P. Brooks >
3 ------------------------------------------------------------------------------------------------------
4 \
5 \ (\__/)
6 (•ㅅ•)
7 / 怀 恄
✨ Finishing Touches
šŸ“ Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix Ā· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Added 2 commits

  • Seed verify uptime history straight into the hourly table, in the background69b3acb
  • Report a running uptime seed as pending in verify doctore69c478
Synced from GitHub

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
šŸ“ Code Reviewāœ… Completed 2026-10-14T00:22:02.857257Ze69c478Draft marked ready
ā„¹ļø 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" or "@codex security review".

Codex reacts with šŸ‘€ while any review is running, comments if it has suggestions, and reacts with šŸ‘ once all reviews finish with no findings.