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

Đang mở Phù hợp với người mới
#2,939 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu bằng việc đọc expireSweep() trong LIFEOS/TOOLS/Upgrades.ts:733-742 và caller duy nhất trên read-path của nó trong LIFEOS/PULSE/modules/upgrades.ts:140-142, sau đó so sánh với handler /api/review tại LIFEOS/PULSE/modules/review.ts:379-383, handler này phục vụ queue mà trang /review hiện đang dùng. Gọi sweep từ read-path review đó (phản chiếu handler upgrades) và đối chiếu LIFEOS/DOCUMENTATION/Upgrades/UpgradesSystem.md:38 để hành vi sweep-on-read được tài liệu hóa khớp. Hoàn thành trông giống như một request GET /api/review chuyển các bản ghi recommended đã hết hạn sang expired mà không cần /api/upgrades.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
19.9k
Fork
2.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của danielmiessler/LifeOS

Tất cả issue của danielmiessler/LifeOS

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.