Skip to content

refactor(v3): cli/room.ts 路径助手收敛到 collab-store(防漂移)#202

Open
raysonmeng wants to merge 1 commit into
feat/v3-web-dashboardfrom
feat/v3-backlog-path-helpers
Open

refactor(v3): cli/room.ts 路径助手收敛到 collab-store(防漂移)#202
raysonmeng wants to merge 1 commit into
feat/v3-web-dashboardfrom
feat/v3-backlog-path-helpers

Conversation

@raysonmeng

Copy link
Copy Markdown
Owner

摘要 / Summary

cli/room.ts 的私有 resolveDbPath/openStore 收敛到 collab-store.ts(消除与权威实现的逐字节重复 → 防漂移)。dashboard PR(#201) 已收敛了 cli/broker.ts 的同款,这里补齐 cli/room.ts

⚠️ 请勿合并 / DO NOT MERGE —— 试用期。base = feat/v3-web-dashboard(backlog sibling)。

变更 / Changes(commit 892bc7d

  • cli/room.ts 私有 resolveDbPath/openStore(与 collab-store 导出版逐字节等价)→ 改 import 自 collab-store
  • currentIdentityId 内部改用 collab-store.readAuthToken;清 7 个孤儿 import(node:fs/node:path/SqliteStore/StateDirResolver)
  • 零行为变更:路径解析、0700 锁定、报错指向均不变;两条 token 错误文案("未找到"/"为空")合并为一条,测试只断言 /abg auth login/ 正则、兼容

测试 / Test plan

  • bun run check 全绿(1851 pass)
  • Cross-review:2 轮,连续两轮 0 真实 issue 收敛(逐字节等价 + 无孤儿 + 无环 + 行为不变均经独立验证)

🤖 Generated with Claude Code

Consolidate resolveDbPath/openStore into collab-store; update currentIdentityId
to use readAuthToken instead of inline readFileSync. Removes private duplicates
in src/cli/room.ts (identical to collab-store.ts byte-for-byte). Zero behaviour
change: error messages still contain 'abg auth login'; 1851 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012rhWKm1VUSnEVxmjpYwNfc
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