Repository navigation
fix(omp): 兼容新版会话、忙态追加与状态显示 - #955
Merged
Merged
Conversation
hu5h
marked this pull request as ready for review
August 20, 2026 06:44
hu5h
marked this pull request as draft
August 20, 2026 10:57
hu5h
marked this pull request as ready for review
August 20, 2026 12:16
hu5h
force-pushed
the
codex/oh-my-pi-compatibility
branch
from
August 21, 2026 10:02
7b486c7 to
cd877cc
Compare
|
🚀 Released in v3.17.0 |
This was referenced Aug 24, 2026
deepcoldy
pushed a commit
that referenced
this pull request
Aug 24, 2026
#955 起每个 OMP 会话钉独立 exact 目录并从中精确 resume,但 #955 之前 的老会话 transcript 落在旧的 cwd-derived 共享 bucket,升级后 resume 找 不到会退化成 fresh、丢失历史。 本改动在冷(非 adopt)resume OMP 会话时插入 fail-safe 迁移预检:扫描旧 bucket,靠 botmux 每条 prompt 注入的 <session_id> marker + header 校验 + cwd realpath 匹配 + 文件名↔native-id 一致四重比对,找出唯一可归属本会话 的记录,恰好命中 1 个才原子拷进 exact 目录(O_EXCL 临时文件 + sha256 校验 + linkSync 不覆盖发布 + fsync);任何不确定(0/多匹配、畸形、symlink、超 预算)一律 skip 落回既有 fresh 兜底,从不 throw 进 spawn 路径。 配套将 omp-transcript 的 visibleText 提升为导出的 ompMessageText 供迁移侧 复用(纯加法)。仅在 cliId==='oh-my-pi' 冷 resume 触发,对其余 CLI no-op。 这是为 #955 升级断层打的过渡兼容补丁,待存量老会话消解后移除(见 #993)。
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.
改动概览
--continue串到同目录下的其它会话。--resume命令。start|stop|restart|update|upgrade --help/-h,避免帮助命令产生副作用。原因
--continue受终端 breadcrumb 影响,不能提供会话级精确恢复与隔离。idle状态创建新卡;若 POST 期间收到 working 更新,该更新只写入内存且缺少提交后对账,卡片可能长期显示“等待输入”。影响面
验证
pnpm build:通过(TypeScript、脚本类型检查、dashboard bundle、dist audit)。pnpm test:1053 个测试文件通过,17623 条测试通过,17 条按平台条件跳过。git diff --check:通过。pnpm switch:here && pnpm daemon:restart:本机全局 wrapper 已指向该 checkout,8 个 PM2 进程全部 online,既有会话恢复成功。安全边界
reliableTurnTerminal;本改动不扩张为 durable exactly-once 语义。