Repository navigation
fix(runtime): streamline recovery and preserve literal TUI input - #1120
Merged
XuPeng-SH merged 5 commits intoOct 23, 2026
Merged
Conversation
XuPeng-SH
commented
Oct 22, 2026
XuPeng-SH
left a comment
Collaborator
Author
There was a problem hiding this comment.
Deep review — 需要修改(1 个 P2)
审查提交:09012a877ec9b112d4316af4ed2b10f310b08a27;未使用 subagent。本轮为源码与既有验证证据审查,未修改实现、未新增或重跑测试。
确认的问题:literal slash 在“编辑上一条消息”的用户路径上丢失输入类型。详见行内 P2。
设计与增量
- 实现:统一 submission parser、复用既有 FIFO/custody/continuation 与 canonical recovery owner 的方向合理。非空恢复保留原 retirement/reconciliation/fenced reconstruction;snapshot checkout 在调用这些 owner 前释放。未发现其他阻断性的重复状态机、存储路径或准入边界回归。零 spill 提前返回是范围清楚的准备开销优化。
- 测试:按键、paste、Enter/Ctrl+Q、非空草稿合并、鉴权拒绝,以及单连接池恢复/retirement/删除 fence 覆盖有实际价值;但没有覆盖 semantic transcript → Ctrl+R → composer → 再提交,现有 helper/队列测试不能证明这条路径正确。
- 文档:描述了显式
//escape,且没有把 #1100 单轮任务连续性或 3×/远端数据库/真实 CLI 性能验收标成完成。上述 issues 仍需保持开放。 - 性能与数据库:既有证据支持空恢复 SQL/protocol events 10→1、事务 1→0,所测资源场景 mutation/WAL bytes 不增加;不等于数据库 CPU 或整体 latency 的普遍改善。30 对测量中整轮 P80 为 0.689→0.702 秒,不能声称整体加速。
审查开始前,GitHub review threads/reviews/comments 均为空,没有既有 GitHub comment 可核销。此前本地 review 的片段合并问题已修正,但本轮发现的 Ctrl+R 遗漏仍需修复。
CI:lint/check 已成功;MOI lane 在拉取 matrixone-init 镜像时遇到 HTTP 500,测试步骤未执行,多项测试被取消;live harness 尚在运行。该失败未提供本 PR 实现失败的证据,也不能视为完整 CI 已通过。
当前账号是 PR 作者,GitHub 不允许对自己的 PR 提交 REQUEST_CHANGES;此 COMMENT review 的审查结论仍为:修复该 P2 后再合并。
XuPeng-SH
force-pushed
the
perf/durable-turn-boundaries
branch
from
October 23, 2026 03:10
09012a8 to
8250f8a
Compare
8 of 10 tasks
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.
Capability assessment: Unchanged: existing CLI/Server capabilities, runtime profiles and access boundaries remain accurate; this corrects local input/recovery and removes unnecessary canonical recovery preparation.
Summary
//for literal slash conversation through the shared submission parser, preserving semantic text through guidance, rejection, Ctrl+R and recovery.Related issue
Closes #624.
Related: #1100, #1119, #980, #915 remain open. General single-task semantic continuity, the 3× target, remote MatrixOne acceptance and real CLI latency acceptance remain unmet.
Change type
User and compatibility impact
//tmp/project inspect thissends/tmp/project inspect this;//stopstays conversation. Ctrl+R preserves this intent when editing and resending. Unknown/ambiguous single-slash commands retain diagnostics with escape guidance.Returned conversation stays recoverable alongside an existing command or shell draft. “Unsent drafts” exposes retained content after the current draft is sent or cleared. Pasted command and shell drafts retain their own submission boundaries, including their exact trailing whitespace and CRLF. Each recovered editable draft requires a fresh gesture. Navigation preserves distinct edited history and the original suspended draft; unchanged recalled messages remain in history.
Ctrl+Q queues conversation for an ordinary safe next-turn handoff. A pasted queued message can start promptly after settlement without a synthetic Enter being mistaken for a trailing pasted newline. Real terminal Enter retains its existing paste protection. After an accepted or cancelled paste, a protected Enter on the empty composer is consumed without creating a phantom draft. Intentional whitespace and explicit newlines still count as user drafts. Local drafts/queues remain process-local, with no new restart durability, configuration or schema change.
Architecture and complexity delta
Verification
Merge base:
c048e2435150af663c632dc4098b636868b36635.cargo test --locked -p astra-cli --lib tui:: -- --test-threads=2: 2,021 passed, one existing ignore.2026-10-12, instrumented std via-Zbuild-std,-Zsanitizer=thread, explicit Linux target and external compiler-rt;TSAN_OPTIONS=halt_on_error=1:symbolize=0. Normal UT is separate from race evidence.cargo clippy --locked -p astra-cli --all-targets -- -D warningspassed. Unchanged runtime/services all-target SCA and fourteen directly affected shell-policy/literal/attachment native+TSan consumers are reused with matching source/dependency fingerprints. Formatting and diff whitespace checks pass./skilland/statsdispatch using the existing PTY fixture/TerminalGuard; InfoView → slash → clear → retained content; Ctrl+R repeated resend and terminal cleanup.gpt-6.1-solwithxhighreasoning. The complete PR delta was accepted with no unresolved material blockers; both follow-up findings are closed.Historical service resource/performance scope
30 balanced A/B and B/A pairs, all 60 successful, local unoptimized
fixed_defaultcontrol. SQL-window totals include background work; recovery counts are identified separately from the owning SQL sequence.Five native recovery resource controls used six fresh fixtures per revision: fresh/reused empty recovery 10→1 events, three-round recovery 12→10, absorbed three-round retirement 16→14, active primary blocker 3→3. Outcomes, mutation counts and retained WAL bytes matched (three rows/3,725 bytes for the retained chain; zero for the other cases).
These are service API controls. P80 was slightly worse. Recovery intervals exclude initial pool acquisition; neither those intervals nor SQL counts establish general whole-turn or real CLI latency improvements. No 3× or remote-database acceptance claim is made. These measurements were not rerun for CLI corrections.
Final checklist