Repository navigation
feat(release): faster report opening, self-recovering PWA, local OTEL relay and ledger retention for 0.12.1 - #49
Merged
Merged
Conversation
…angs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…lemetry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening the page sends the overview plus one 7-day trend query per account, and the view worker re-read accounts, merges and the quota history and re-ran every quota window sum for each of them although the snapshot does not depend on the query. The worker now keeps the inputs of the latest ledger revision and re-cuts the quota candidates for the current time, and the report index keeps the window sums of the previous reader until its next write. Results carry the ledger revision they were computed at. A placeholder account created by a replayed push now bumps the revision so cached inputs cannot miss it. On a synthetic 120-day ledger (420k usage events, 380k quota rows) snapshotMs p50 drops from 420 ms to 56 ms for queries without an intervening write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first sync status read invalidated every report query, so each open re-read all reports and could make the worker recompute a result it had just produced. Only reports not computed at the reported ledger revision are refetched now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… mappings after 30 days Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
结果
ledger:dataRevision跨查询复用,窗口汇总跟随索引写入失效。首屏只重查不是按最新版本算出的报表。otel-relay,常驻在127.0.0.1:4319接收 OTLP 日志,写入本机待发送队列,由 sync 先于用量推送。服务端拒收时用量照常推送。队列上限 5 万条。install-launchd同时注册同步和中继两个后台任务。metadata.attribution = "otel"),重发不会再翻转账户。request_accounts只保留 30 天。启动后在后台分批删除非当前价格表的估值,删除时不写变更日志。两个索引都消费过的变更日志会被清理,最大的一行始终保留。索引游标落后于日志下限时改为全量重建。packageManager升级到 Bun 1.4.4。c4f1a9d7e250迁移到e6b2f4a91c07,升级前需停服并备份。验证
bun run typecheck通过,bun test tests546 个测试全部通过,bun run build和bun run build:collector成功。tests/pwa.browser.ts已改为验证网络恢复后无需手动刷新即可重新打开。/api/view除时间戳外逐字段与基线一致,重启后没有触发全量重建。VACUUM 用时 5 秒,账本从 1.57 GB 降到 548 MB。e6b2f4a91c07,容器状态 healthy。127.0.0.1:4319,分别用两个账户跑真实会话。两条请求经中继进入队列,由 sync 推送后各自归到正确账户,并带上otel标记。🤖 Generated with Claude Code