Pulse Today shows a disabled [modules] entry as an HTTP 404 error in Blockers

オープン 初心者向け
#2,817 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, typescript
領域
api, backend

調査の方向性

LIFEOS/PULSE/modules/today.ts:642 から始めて、getJson、unavailableFrom、および Today aggregator に供給するモジュールごとの probe ループを読み、次に resolveModules が PULSE.user.toml の [modules] からモジュールがオフであると判断する箇所を見つけてください。提案されている 2 つの修正のうち 1 つを選び、1 か所に保ってください。完了の形は、repro のネガティブコントロールが通ることです: curl -s 'http://localhost:31337/api/today?fresh=1' | jq .errors に無効なモジュールに対する HTTP 404 エントリがなく、有効なモジュールでは引き続き実際のエラーが表面化します。

索引モデルが issue の本文から書いたものです。

説明

Version

LifeOS 8.761.0 · attestation: 3 system file(s) differ from danielmiessler/[email protected]:

  • LIFEOS/TOOLS/models.ts
  • LIFEOS/TOOLS/model-pricing.json
  • LIFEOS/DOCUMENTATION/ARCHITECTURE_SUMMARY.md
What is broken

When a Pulse module is switched off in USER/CONFIG/PULSE.user.toml under [modules] (for example vigil = false or work = false), its API route stops answering and returns HTTP 404. The Today page's aggregator (/api/today) does not recognise that as "module off": getJson only maps a body with available: false or setup_required: true to an unavailable source, so a plain 404 falls through to throw new Error(...). The result is a red error line in the Blockers panel ("/api/work → HTTP 404 · /api/vigil → HTTP 404") for a module the user deliberately disabled. The [modules] comment in PULSE.toml says disabling a module hides its tab instead of leaving an empty page; Today should treat a disabled module the same way (skip it, or show the designed not-installed state), not as a failure.

Where (file:line)

LIFEOS/PULSE/modules/today.ts:642

Repro on a clean tree
1. On a v8.761.0 install with Pulse running, add `vigil = false` under `[modules]` in `LIFEOS/USER/CONFIG/PULSE.user.toml`.
2. Restart Pulse: `launchctl kickstart -k gui/$(id -u)/com.lifeos.pulse`.
3. `curl -s 'http://localhost:31337/api/today?fresh=1' | jq .errors` shows `{"vigil": "/api/vigil → HTTP 404"}`.
4. Open Pulse → Today: the Blockers panel shows the red error line.

Negative control: the captured probe exits 1 because `.errors` contains an HTTP 404 entry for the disabled module.
Negative control

Probe: out=$(curl -s --max-time 30 'http://localhost:31337/api/today?fresh=1'); echo "$out" | jq -c .errors; echo "$out" | jq -e '[(.errors // {})[] | select(test("HTTP 404"))] | length == 0' >/dev/null · exit 1 · captured 2026-11-15T07:42:54.539Z

Red looks like: /api/vigil → HTTP 404

{"work":"/api/work → HTTP 404","vigil":"/api/vigil → HTTP 404"}
Suggested fix

Two possible places, maintainer's choice: (a) have a disabled module's routes answer { available: false, reason: "module disabled" } instead of 404, which unavailableFrom already handles; or (b) in modules/today.ts skip the probe for any module that resolveModules reports as off, so it never reaches getJson.

Environment
  • OS: macOS 26.6.2 (arm64)
  • Harness: claude-code
  • bun: 1.3.8 · git: 2.39.5
  • Doctor broken: none
主要言語
TypeScript
スター
19.8k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

danielmiessler/LifeOS のほかの issue

danielmiessler/LifeOS の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。