[bug] Upgrades 30-day TTL sweep only runs when something reads GET /api/upgrades, and…

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

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

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

評価

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

調査の方向性

まず expireSweep() を LIFEOS/TOOLS/Upgrades.ts:733-742 で読み、その唯一の読み取りパス上の呼び出し元である LIFEOS/PULSE/modules/upgrades.ts:140-142 を確認してから、/api/review ハンドラー(LIFEOS/PULSE/modules/review.ts:379-383)と比較してください。このハンドラーは /review ページが現在使用しているキューを提供します。その review 読み取りパスから sweep を呼び出し(upgrades ハンドラーを踏襲)、文書化された sweep-on-read の動作と一致するように LIFEOS/DOCUMENTATION/Upgrades/UpgradesSystem.md:38 を整合させてください。完了とは、GET /api/review リクエストが /api/upgrades を必要とせずに期限切れの recommended レコードを expired に切り替える状態です。

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

説明

What happened

Upgrades 30-day expiry never fires from the /review page, so expired recommendations stay open

Summary

LIFEOS/DOCUMENTATION/Upgrades/UpgradesSystem.md:38 says the 30-day TTL is "swept opportunistically on each Pulse API read", and the only caller of expireSweep() (LIFEOS/TOOLS/Upgrades.ts:733-742) on a read path is GET /api/upgrades (LIFEOS/PULSE/modules/upgrades.ts:140-142). Since the page moved into /review (UpgradesSystem.md:66, app/upgrades/page.tsx:3-6), the queue is read through GET /api/review (app/review/page.tsx:366, LIFEOS/PULSE/modules/review.ts:379-383), which never calls expireSweep(); /review only POSTs to /api/upgrades/... (page.tsx:460). Nothing in the release schedules Upgrades.ts expire (:818-821); the only other reader of GET /api/upgrades is TOOLS/PulseFreshness.ts:44, which is run by hand. On one install 13 recommended records whose expires fell between Nov 2 and Nov 22 stayed recommended until a request happened to hit GET /api/upgrades.

Suggested fix: call expireSweep() in GET /api/review too, or note in UpgradesSystem.md that Upgrades.ts expire needs a schedule.

Related: #2742 (closed) touches expire in the same file; the sweep-on-read behaviour it mentions is the one /review no longer reaches.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

主要言語
TypeScript
スター
19.9k
フォーク
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 を短くまとめたダイジェスト。