From eeda99c0ee2f44df01ddccf21bf6305f11a53aac Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Tue, 11 Aug 2026 21:23:16 +0800 Subject: [PATCH] emrg: document TUI queue requeue re-tracking in quick-ref (review-fix parity) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GUI queue-injection quick-ref entry documents the review fix (was_busy || i > 0 re-tracking, "同 #695") but the TUI entry — merged earlier — still describes only the initial implementation. A future cycle reading the TUI entry alone could misread the final state and re-discover the re-tracking as a bug. Append the review-fix note (9cb4194) to the TUI entry so both client-side entries carry the same final-state description. --- emrg/server/evolution_prompt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index a320a7f..1983a0e 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -427,7 +427,7 @@ When reading rants, follow these rules: > - Packaging gen-assets doc (#690 并行周期 doc-only:Agent.md + DEVELOPMENT.md 新增 Packaging 段——图标产物 gitignore(仅 icon.svg 提交,#688),本地安装包构建需先 `bash packaging/gen-assets.sh`(幂等;渲染优先级 rsvg-convert → Chrome headless → sips;.icns 需 macOS iconutil 否则跳过带提示);#467/#468 宿主对称原则(CI 构建时生成 + 宿主本地自检文档化);合并 6b8fff3) ✅ > - stop-git.ps1 EMRG-tree snapshot kill (#692 宿主 rant 2026-08-11T19:47:44 修正 #689:`Get-CimInstance Win32_Process` 祖先回溯对**已死 daemon 的孤儿 git 进程**解析失败(查父返回 $null → 不杀 → Inno DeleteFile code 5 回归)——改**向下 BFS 快照**:step 0 杀任何进程前从 EMRG 根(emrgd.pid daemon + EMRG.exe + `python.exe -m emrg` TUI 排除 emrg.server)BFS 整棵树写 `%TEMP%\emrg-stop-pids.txt`;step 4 只杀快照集内仍占 `install\git\` 的 PID;:verify 只查快照集存活;宿主 Git Bash sh/vim 永不被碰(不在快照集)且孤儿进程生前已入快照仍被抓;R125 同族(Inno 不干涉宿主工具);另 README 吸引力文案(rant 19:50:37);合并 5d57d60) ✅ > - TUI cursor-left CLEAR_TO_EOL fix + status bar reorg (#693 宿主 rants 2026-08-11T19:59:09/20:02:43:①光标左移右侧字符消失——write_frame 尾部 `row_dirty_end`+`CLEAR_TO_EOL`(\x1b[0K) 行尾清理把光标右侧未变字符整行清掉(diff 只含光标附近 2 格);修复=**整块删除** row_dirty_end 声明/dirty_end 计算/尾部 CUP+EL;SPACER_TAIL 残影由 WIDE 字 2 列天然覆盖 + 行内收缩(prev 字符→curr 空)走正常分支写空格;review ❌ 纠偏=显式 spacer 空格写入有 off-by-one(WIDE 后光标在 x+2 非 x+1,空格落偏右移字符)→ 彻底删除 elif 块(7296269);②状态栏重组=左段 bold magenta `title (sid[:8]) [model] [1:23] · 3 msgs · ~/proj`(模型独立 `current_model` 跟踪、耗时纯文本 [m:ss] 去 ⏱、消息数+目录走 `left_extra`)、中段 dim 仅 `id @ host`(服务端 ID + 主机名)、右段移除(`_update_right()`→`_update_left_extra()`);/model 切换刷新左段;+8 测试 695→703(test_output +3 / test_buffer +1 / 新 test_status_line +4),GUI 212;合并 2d12ad8) ✅ -> - TUI queue-injection client side (#655 P3 follow-up,自发现:daemon P1 排队注入已 e2e 验证但 TUI 不可达——busy 时 ENTER 被静默吞掉(app.py:1837),4 个广播帧无人处理;修复=①`send_task` 增可选 `id` 参数并返回最终请求 id(重发复用原 id);②ENTER busy 不再拦截(was_busy 捕获),发送后若当时 busy 记入 `_queued_sends`;③read_server 新增 4 帧处理——task_queued 显示 '⏳ Queued (position N)'、steer_committed 从队列移除、queued_requeue 以原 id 静默重发(**不重加 user 行/不重复 msg_count**,busy 置 True + need_new_assistant 保证响应进新 md 行 + 重启耗时计时)、queued_cancelled 清队列+提示;④断线重连清 `_queued_sends`(daemon 断连即 drop 队列);+2 测试 703→705(send_task 显式 id 透传 / 返回生成 id),GUI 212 不变) ✅ +> - TUI queue-injection client side (#655 P3 follow-up,自发现:daemon P1 排队注入已 e2e 验证但 TUI 不可达——busy 时 ENTER 被静默吞掉(app.py:1837),4 个广播帧无人处理;修复=①`send_task` 增可选 `id` 参数并返回最终请求 id(重发复用原 id);②ENTER busy 不再拦截(was_busy 捕获),发送后若当时 busy 记入 `_queued_sends`;③read_server 新增 4 帧处理——task_queued 显示 '⏳ Queued (position N)'、steer_committed 从队列移除、queued_requeue 以原 id 静默重发(**不重加 user 行/不重复 msg_count**,busy 置 True + need_new_assistant 保证响应进新 md 行 + 重启耗时计时)、queued_cancelled 清队列+提示;④断线重连清 `_queued_sends`(daemon 断连即 drop 队列);**review ❌ 同 #696**:queued_requeue 重发循环 was_busy 循环前捕获 → 单客户端回合刚结束 was_busy=false,M2+ 重发到达时 daemon busy 被再排队但未跟踪 → 下个 queued_requeue 找不到 → 静默丢失;修复=每条重发 `if (was_busy or i > 0)` 重新跟踪(9cb4194,steer_committed 移除已注入,下个 queued_requeue 重发其余,收敛);+2 测试 703→705(send_task 显式 id 透传 / 返回生成 id),GUI 212 不变) ✅ #### 2.2 Latest GitHub code changes