Skip to content

fix(web): preserve frozen currency bases in billing history - #809

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/web-frozen-money-history-20261012
Oct 11, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
fix/web-frozen-money-history-20261012

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

LMM API Pull Request

变更说明 / Summary

Historical log prices now use the request's captured Credit-to-USD anchor or explicit frozen multiplier. Changing today's credit anchor or FX no longer changes an old absolute, expression, token, tool, or audio price. Missing historical evidence remains unavailable (-); original log content is preserved.

Wallet history now respects the Go 0.2.110 self DTO's historical Creem amount_unit: CREDIT, where amount already contains raw ledger quota. For example, an old amount: 500000 remains 500000 quota (1 USD at 500000 quota/USD), instead of being multiplied by the current legacy batch scale again. An immutable positive credited_quota remains authoritative. Legacy records without a provable credit amount display - and cannot invent a payment-success receipt.

Scope: frontend display only. This does not normalize raw historical credited_quota, log total quota, cumulative usage, balances, or other financial history. It is a separate source patch, not part of the frozen Web 0.1.144 release. No backend, database, production, release, or deployment changes.

与上游的关系 / Upstream relationship

  • LMM API 独有变更 / LMM API-specific change
  • 上游尚未合并的修复或功能 / Change not yet merged upstream
  • 同步或移植上游变更 / Upstream sync or backport
  • 不适用(文档、CI、仓库维护等)/ Not applicable

上游参考 / Upstream reference: N/A; preserves this repository's existing frozen pricing metadata and historical self DTO contract. The historical self DTO's CREDIT amount is distinct from the public-credit denomination of payment requests.

关联 Issue / Related issue

N/A — found during the requested financial-history audit.

变更类型 / Type of change

  • Bug 修复 / Bug fix
  • 新功能 / Feature
  • 重构或性能优化 / Refactor or performance
  • 前端或交互 / Frontend or UX
  • 部署、CI 或构建 / Deployment, CI, or build
  • 文档或仓库维护 / Documentation or maintenance

验证 / Verification

Tested signed revision: 7695eb24470ff60c289a35ef792ea15bdddc145a.

bun test --preload ./scripts/test-preload.mjs --timeout 15000 FILE
  PASS: 211 tests across 16 affected files, run serially.
  Includes frozen/current anchor disagreement, expression/token snapshots,
  independent tool/audio units, Creem raw CREDIT amounts, and wallet success handling.
bun run typecheck
  PASS.
bun run build
  PASS at the committed revision.
bun run bundle:check
  PASS: 525381 gzip bytes; limit 786432.
oxlint -c .oxlintrc.json CHANGED_FILES
  PASS: all 9 changed files, no warnings/errors.
Protected-header-safe changed-file oxfmt check; git diff --check
  PASS.
bun run lint
  Existing baseline failure: 4 import(namespace) errors in unchanged
  src/features/home/sculptures/marks.test.ts; base/current blob both
  fa33655f59841eda155a73a28f1ad90bc8875bf3.

The wallet success fixtures now include the immutable credited_quota returned by current successful orders. A new rendered integration regression confirms that an old LEGACY order without frozen credit evidence cannot produce a guessed success receipt. No real-browser or production acceptance was performed; rendered integration checks use happy-dom. The complete Web suite was not run; verification was scoped to affected history and wallet paths.

截图或日志 / Screenshots or logs

Regression examples: frozen Q=500000 and K=3500000 preserve an old price of 7 as 1 USD even when current K=500000; explicit USD snapshots are not converted again; historical Creem raw quota is not multiplied by Q. Original log strings remain unchanged. No layout or new UI text was introduced.

提交检查 / Checklist

  • 我已搜索本仓库的 Issues 和 PRs,确认没有重复工作。
  • 此 PR 只包含与当前目标相关的改动,未混入格式化或其他无关变更。
  • 我已说明该变更对当前产品流程或兼容行为的影响,并保留必要的来源、版权和许可证信息。
  • 我已检查兼容性;缺少冻结金额或单位的旧记录会保守显示 -,不会按现时配置猜测历史金额。
  • 我已补充相关测试,并记录实际验证结果及未执行的检查。
  • 文档和多语言文案不适用:无新增 UI 文本、接口或配置。
  • 代码、日志和提交记录不包含敏感信息。

Copilot AI balanced review requested due to automatic review settings October 11, 2026 18:41

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-11T18:45:27.587060Z 7695eb2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction
LIghtJUNction merged commit 5cc7c7a into main Oct 11, 2026
LIghtJUNction added a commit that referenced this pull request Oct 11, 2026
Ported from main 7695eb2 (PR #809), verified against 6efcb6f. Preserve WIP service boundaries and local runtime.
@LIghtJUNction
LIghtJUNction deleted the fix/web-frozen-money-history-20261012 branch November 5, 2026 07:31
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.

2 participants