Skip to content

fix(ratewise): RW-6 moneybox 首爾掛牌日跨日刷新(#514 拆分 6/7) - #520

Closed
s123104 wants to merge 2 commits into
mainfrom
rw-6-moneybox-cross-day
Closed

fix(ratewise): RW-6 moneybox 首爾掛牌日跨日刷新(#514 拆分 6/7)#520
s123104 wants to merge 2 commits into
mainfrom
rw-6-moneybox-cross-day

Conversation

@s123104

@s123104 s123104 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

摘要

#514 拆分第 6 支(獨立、零視覺風險)。換錢所(MoneyBox)匯率以首爾掛牌日為準,但牌價不變卻跨日時,latest.json 未刷新 → 與每日 history 日期不對齊,趨勢圖天數/日期可能不準。

變更

  • scripts/fetch-moneybox-rates.js:新增 extractSeoulSnapshotDate(updateTime 首爾日曆 / UTC timestamp 換算)+ shouldRefreshLatestSnapshotrate-changed 或 date-rollover 才刷新),整合進 hasRateChanges
  • 紅線保留needsSchemaMigration / enrichExchangeShopRatesPayload(schema 遷移)完全不動,新邏輯疊加非取代
  • scripts/__tests__/fetch-moneybox-rates.test.ts(新):date-rollover / unchanged / rate-changed 三案例,並納入 test:root

範圍說明

  • workflow history 檔名(首爾日)與 SW history-30d.json 離線快取路由列 RW-6b(避免本支過大)。

Test plan

  • moneybox vitest 3 passed
  • 腳本 import 5 exports 正常(含保留的 needsSchemaMigration)
  • main() import.meta guard 確認測試不觸發 fetch

Refs #514(6/7)。獨立可合。

🤖 Generated with Claude Code
via Happy

- 加 extractSeoulSnapshotDate/shouldRefreshLatestSnapshot:rate-changed 或 date-rollover 才刷新
- 整合進 hasRateChanges;保留 main 的 needsSchemaMigration/enrichExchangeShop(紅線不取代)
- 補 3 個 vitest 案例並納入 test:root(date-rollover/unchanged/rate-changed)

測試:moneybox vitest 3 passed、腳本 import 5 exports 正常、needsSchemaMigration 保留

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1568401338

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fetch-moneybox-rates.js
- workflow history 檔名改用 extractSeoulSnapshotDate(資料首爾掛牌日)+ fallback 首爾 wall-clock
- aggregate 首次缺失補 changed=true,避免 history-30d.json 遺失卻不開 PR
- sw.ts history-30d 路由加 providers/moneybox 路徑,離線可服務換錢所趨勢圖

測試:typecheck、lint、test 2516 passed、build:ratewise(sw 編進 worker)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@s123104

s123104 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

已加入 RW-6b(本 PR 現為完整 MoneyBox 收尾):① workflow history 檔名改用首爾掛牌日(extractSeoulSnapshotDate + fallback)② aggregate 缺失補 changed=true ③ sw.ts history-30d 路由加 providers/moneybox(離線趨勢圖)。typecheck/lint/2516 測試/build 全綠。

@github-actions

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b43012454a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ratewise/src/sw.ts
@s123104

s123104 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

內容已 squash 合併至 #523(08e27f43),關閉重複 PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant