fix(admin): report a stopped scheduler when no tick has run, with a health route for uptime checks
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- next.js, playwright, supabase, typescript
調査の方向性
Start with src/lib/jobs/runner.ts and src/lib/jobs/store.ts to trace how runTick records work, then inspect the migration and src/app/super-admin/page.tsx health check. Add the health route under src/app/api/ and update docs/operations/deploy.md step 8 and docs/operations/jobs.md. Done when the listed tests cover tick privileges, an empty queue, both overview states, and the route’s 200/503 responses.
索引モデルが issue の本文から書いたものです。
説明
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Sources: platform triage report new issue 4, and deploy readiness report new issue 3.
The instance overview says the scheduler is running when no tick has ever run:
schedulerCheckanswers "Running" unless a queued job has waited more than 10 minutes (src/app/super-admin/page.tsx:465-490), fed byadmin_job_health, which reads queued rows only (supabase/migrations/20261112101200_super_admin_overview.sql:149-157).- Only the tick queues scheduled work (
scheduleDueJobs,src/lib/jobs/schedule.ts:34-43), so with no tick nothing is ever waiting, and the check stays "Running". - No tick is recorded anywhere except a log line (
src/app/api/jobs/tick/route.ts:28). docs/operations/deploy.md:348uses "the scheduler is running" on/app/adminas a deploy check, and no route exists for an uptime monitor (src/app/api/hasconnections,dev,jobs/tick,mcp,notifications,public,support,v1,webhooks).
Impact: the operator. A cron job that was never registered, a rotated CRON_SECRET, or a tick that redirects (#756) shows "Running" and "Nothing needs attention" while nothing syncs. Users see stale data with no explanation. The uptime half of #91 needs a route to call.
Plan
- Record each tick's start and finish (a small table or a row per tick kept for a bounded time), written by
runTick. schedulerCheckreports attention when the last tick started more than 5 minutes ago or none has ever run, with or without connections and queued jobs.- Add a health route under
src/app/api/that reports only whether the database answers and whether the last tick is recent: no counts, no ids,Cache-Control: no-store. An uptime monitor (#91) calls it. - Name the new signal in
deploy.mdstep 8.
Acceptance criteria
- Each tick records when it started and finished.
-
/app/adminshows attention when no tick ran in the last 5 minutes, including with an empty queue and no connections. - The health route answers 200 when the database answers and the last tick is recent, and 503 otherwise, with no data beyond that.
- Unit test for the empty queue case; pgTAP for the tick record's privileges.
- Playwright e2e covers both overview states.
-
deploy.mdstep 8 names the signal and the health route.
Files and areas
src/lib/jobs/runner.ts, src/lib/jobs/store.ts, a migration, src/app/super-admin/page.tsx, a new route under src/app/api/, docs/operations/deploy.md, docs/operations/jobs.md.
Non-goals: choosing the uptime vendor (#91), alerting by email on failed jobs.
Verification
npm run typecheck, npm run lint, npx vitest run src/lib/jobs, npm run test:db, the super admin e2e spec.
Branch: <issue-number>-scheduler-heartbeat
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- 主要言語
- TypeScript
- スター
- 13
- フォーク
- 2
- 平均マージ
- 5時間 20分
- マージ済み PR(30日)
- 287
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eddiejaoude/StackDash のほかの issue
-
area: integrations documentation priority: P2 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eddiejaoude/StackDash#798 ·
メンテナーはふだん 1 日以内に返信
-
area: ops documentation priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
eddiejaoude/StackDash#796 ·
メンテナーはふだん 1 日以内に返信
-
area: docs documentation impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#790 ·
メンテナーはふだん 1 日以内に返信
-
area: ops bug impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eddiejaoude/StackDash#785 ·
メンテナーはふだん 1 日以内に返信
-
area: connections enhancement impact: low priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
eddiejaoude/StackDash#768 ·
メンテナーはふだん 1 日以内に返信
eddiejaoude/StackDash の issue をすべて見る
似ている issue
-
bot:ai-assisted component:midnight-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
midnightntwrk/midnight-js#1790 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:vscode bug has repro platform:macos platform:vscode regression
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
effort/l priority/p1 risk/high triage/core
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
iflytek/skillhub#1188 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信