feat: complete original workbench roadmap requirements in 0.5.0 - #6
Conversation
…d versioned summary protocol
…and observable totals
…g their accounting folds
…tore and full optimization views
…cal execution intervals
… and confirmed-output samples
…ic UI regression coverage
…dentity, prices, scenarios and privacy
…nd output hash checks
…ing source hashes
…available session data
…xact source verification
… advisory compatibility
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3150b062a2
ℹ️ 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".
| if (entries.some(entry => entry.usage === null)) reasons.push('unreported-analysis-usage') | ||
| if (entries.some(entry => entry.finality !== 'authoritative')) reasons.push('provisional-analysis-usage') | ||
| if (!state.ledgerStartedAt || state.ledgerStartedAt.slice(0, 10) > start) reasons.push('analysis-tracking-started-after-window') | ||
| if (state.evictedEntries || state.ledgerClearedAt) reasons.push('analysis-history-evicted-or-cleared') |
There was a problem hiding this comment.
Bound history-loss flags to the selected window
Once the ledger has ever been cleared, ledgerClearedAt remains non-null, and after an eviction evictedEntries remains nonzero until a clear replaces it with that timestamp. Consequently, even when the clear or eviction happened months before the selected 7/30/90-day interval and every call in that interval is retained, observableTotals() can never report complete coverage again. Compare these loss markers with start (and retain an eviction timestamp or earliest-retained boundary) so old, out-of-window data loss does not permanently invalidate all future windows.
Useful? React with 👍 / 👎.
| const retained = draft.requestKeys.filter(item => Date.now() - Date.parse(item.at) < 30 * 86400000) | ||
| draft.evictedRequestKeys += draft.requestKeys.length - retained.length | ||
| draft.requestKeys = retained |
There was a problem hiding this comment.
Expire reservations without requiring another analysis
The 30-day request-key retention policy is enforced only while reserving a subsequent stable request. If a user runs an analysis and then performs only reads or configuration edits, its hashed request ID remains persisted indefinitely rather than being removed after 30 days. Prune and durably save expired reservations during startup or another regular state operation so retention does not depend on future model usage.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
目标与实现
补齐最初 A–I 路线图中 0.4.0 未完成的具体规格。逐项映射见
docs/workbench-acceptance.md。已核对的验证结果
固定发布 CI:https://github.com/LeemanCheung/dsh-token-usage/actions/runs/34681882236
额外兼容性结果:https://github.com/LeemanCheung/dsh-token-usage/actions/runs/34681882247
额外通道的
result.json明确为passed: false、types: failure。0.1.5-rc.2 的 SessionEvent 联合类型不再包含旧记账层比较的assistant/chunk,错误位于src/projection.ts:341–344。不能用 advisory 作业的整体绿色状态或单元测试通过,宣称新版宿主完整兼容;正式支持仍以固定版本为准。本 PR 没有为了消除该告警而强转类型、删除旧事件处理或改变原记账协议。源码及重新生成的 lib 已提交。所有临时
.verification文件与候选工作流已移除,常规 CI 从提交源码直接复现检查。验收边界
浏览器使用真实 React、真实 Host RPC 和文件持久化,但事件及模型传输为合成 fixture。不声称已在用户机器部署、调用真实付费模型或核验提供方账单。辅助去重有30天/2048个哈希上限;价卡历史最多16份且有体积上限;离线缓存仅为显式保存的页面。无法确认的计费规则仍明确不可用。其他鲸鱼/城市仓库的视觉适配不在本 PR,此处交付的是可选数字协议。