Skip to content

feat: complete original workbench roadmap requirements in 0.5.0 - #6

Merged
LeemanCheung merged 34 commits into
mainfrom
feat/workbench-completion-v050
Sep 12, 2026
Merged

LeemanCheung merged 34 commits into
mainfrom
feat/workbench-completion-v050

Conversation

@LeemanCheung

@LeemanCheung LeemanCheung commented Sep 12, 2026

Copy link
Copy Markdown
Owner

目标与实现

补齐最初 A–I 路线图中 0.4.0 未完成的具体规格。逐项映射见 docs/workbench-acceptance.md

  • 诊断新增 scope、双语 suggestedAction、证据节点跳转、时间/路由覆盖和预算压力。
  • Token 节点按比例绘图,节点、四类桶、调用类别、路由独立展示;有显式保存的有界离线收据。
  • 同一 UTC 窗口的会话、辅助分析和合计用量,披露未知、暂定、清空和淘汰范围。
  • 稳定请求 ID 在调用模型前持久预约,重复、重连、重启及清空账本后重放均不会再次调用;有界保留语义明确。
  • 价格簿独立修订、指纹、不可变历史、差异预览与确认回滚;人工核对来源;已存实验费用不回写。
  • 实验补齐重试比例分母、活跃时长、完整任务条件、后补人工验收和重复快照识别。
  • 最长七天跨时段费用上下界、基线/候选并排对比,以及参考费用用量→缓存结构→费率的守恒拆分。
  • 优化周报只纳入双方人工验收通过、条件匹配、数据完整且快照不同的配对;v2 摘要增加预算状态和已确认输出采样,v1 形状保持兼容。
  • 抽出纯聚合 selector、保留旧状态迁移、增加额外上游兼容性通道;会话索引不可用时只开放离线缓存,不显示虚假的零用量或预算内。

已核对的验证结果

范围 结果 运行
固定 DSH a66e470…(0.1.2-rc.1)类型检查 通过 34681882236
完整回归 221 项、29 个文件通过 34681882236
Chromium 工作流 14 项通过,运行时错误为 0;桌面及390px中文截图已检查 34681882236
重复构建、包内容与已提交 lib 一致性 通过 34681882236
额外 DSH c291e796…(0.1.5-rc.2) 未通过完整兼容验证:类型检查失败,回归和构建通过 34681882247

固定发布 CI:https://github.com/LeemanCheung/dsh-token-usage/actions/runs/34681882236

额外兼容性结果:https://github.com/LeemanCheung/dsh-token-usage/actions/runs/34681882247

额外通道的 result.json 明确为 passed: falsetypes: 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,此处交付的是可选数字协议。

LeemanCheung and others added 30 commits September 12, 2026 14:35

@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: 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')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread src/workbench/host.ts
Comment on lines +86 to +88
const retained = draft.requestKeys.filter(item => Date.now() - Date.parse(item.at) < 30 * 86400000)
draft.evictedRequestKeys += draft.requestKeys.length - retained.length
draft.requestKeys = retained

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T07:59:55.039442Z 3150b06 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.

@LeemanCheung
LeemanCheung merged commit 8200ee9 into main Sep 12, 2026
2 checks passed
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