Repository navigation
Conversation
Codex 0.154 renders the empty-composer marker as » (U+00BB) instead of › (U+203A). The readiness patterns, composer-state detector, terminal identity gate and update dialog selectors only matched U+203A, so every Lark input failed closed before writing to the TUI. Accept either glyph in all five probes; cover both markers in the composer and terminal identity tests. Co-Authored-By: Claude Code <[email protected]>
The session's first Lark message lands while a freshly spawned/resumed Codex is still painting the banner: the composer marker and thread-id footer do not exist yet and the rollout fd is absent until first submit, so refreshCodexTerminalSession failed closed immediately. awaitReadyCodex TerminalSession bounded-polls (30s) only while the screen shows a loading row or no composer marker at all; a settled composer without a thread ID, a human draft, or a running turn (esc to interrupt) still fails without waiting.
The model line stayed on "loading" for over 30s against a slow endpoint, so the bounded wait expired while startup was genuinely still in progress (live session 622a1a92, 0.154.0-alpha.3). Also wait when the composer is already painted and empty but its thread-id footer has not rendered yet — the two are not atomic. Only a non-empty composer (draft/picker/dialog) or a running turn stop the wait immediately.
|
Note for @deepcoldy (delivery-minimal line): The glyph hunks are byte-equivalent to the ones in The only hunk unique to this PR is the cold-start bounded wait (commit 9d92ee6), which needs adaptation against minimal because minimal removed the
Context: live fleet incident chain 2026-10-09 (session 622a1a92) — composer painted, footer ID rendered later, model loading >30s. Happy to close this PR once the wait is ported into the minimal line. |
|
自动评审初步意见,最终以维护者审阅为准。 整体看,本 PR 三个 commit 解决 3.37 部署后 Codex TUI(0.154-alpha)写入全部 fail-closed 的问题,方向正确:五处字形探针(composer-state / terminal-session / codex / codex-app / update-dialog)改动完整一致;冷启动等待保持了 fail-safe 边界(人工草稿、picker/dialog、运行中的 turn 都不会被越过写入)。本地在最新 master 的 rebase 合成树上 tsc 干净,相关单元套件与 worker 启动集成场景(banner/resume/slow-resume/tmux/coloured 共 5 例)均通过,并对新测试做了变异验证(字形、等待循环、draft 早停、turn 忙碌守卫四处变异分别只杀对应新用例)。 一个合入阻断项:bun-test CI 腿为红
非阻断,知会即可
|
|
补充一条同范围的可选加固(非合入阻断,复审交叉核对时发现):
如果顺手,一行闭环即可,也可避免下个版本再追一次字形: { id: 'interactive_menu:numbered_cursor', re: /(?:^|[\n\r])\s*[›❯»]\s*\d+\s*[.)]/ },(你在本 PR 其余同前一条评论:bun-test 用例的假时钟修法是合入阻断项;另合前需要再 rebase 一次最新 master(#1756 合入后本 PR 搭车的 update commit 会自动从 diff 消失)。 |
|
你好,同步一个去重情况:本 PR 里的 U+00BB(»)提示符识别部分已经随 #1770 合入 master(
建议把本分支 rebase 到最新 master:U+00BB 字形相关的 hunks 主干已包含,rebase 时这些部分会变为空 / 冲突,丢弃即可;冷启动 readiness 等待等其余独立改动保留,继续在本 PR 评审。这是自动评审的初步意见,最终以维护者审阅为准。谢谢! |
|
Closing — superseded:
Thanks for the review; leaving the branch in place for reference. |
Summary
Urgent fix for the fleet after the 3.37 deployment: every Lark message to a Codex TUI failed closed with "消息没有安全写入 Codex".
Two independent causes:
Prompt glyph change in Codex 0.154.0-alpha.3: the empty-composer marker is now
»(U+00BB) instead of›(U+203A). All readiness/identity probes only matched U+203A, sodetectCodexComposerStatereturnedunknownand the terminal identity gate rejected every write. Accept either glyph in all probes:services/codex-composer-state.tscomposer/draft detectionservices/codex-terminal-session.tsempty-composer footeradapters/cli/codex.tsreadiness patternsadapters/cli/codex-app.tsready patternutils/codex-update-dialog.tspicker selection + resume redrawCold-start first-message race: a fresh/resumed TUI paints the banner for seconds (on a slow model endpoint,
model: loadingfor over 30s on our fleet) and the thread-id footer renders a few frames after the composer. The session's first message hit the gate during that window.awaitReadyCodexTerminalSessionnow bounded-polls up to 90s, covering:loading/Resuming sessionrowsWaiting stops immediately on a non-empty composer (human draft/picker/dialog) or a running turn (
esc to interrupt), so messages are never written past a draft; configuration problems still fail after the bounded wait with the existing /statusline guidance.Tests
codex-terminal-session/codex-composer-state/write-input/ startup readiness suites: 300+ tests pass;tsc --noEmitcleanVerification (live fleet)
»+ thread-id footerNotes
57e6a1b6e); the single extra commit from fix(update): 支持自部署二进制更新与版本回退 #1756 drops out of the diff once it merges3.37.0-fix-glyph3🤖 Generated with Claude Code