Uh oh!
There was an error while loading. Please reload this page.
feat(cli): surface the autonomous goal in the TUI - #3025
Conversation
7ae8d0d to
5739ed0Compare5739ed0 to
7e94b22CompareWarning Review limit reached
Next review available in:32 minutes Limit details: You’ve used all 3 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
Comment |
PR Summary by QodoSurface autonomous goal state in the CLI TUI (status line, transcript, /goal)
AI Description
Diagram
High-Level Assessment
Files changed (12) |
Code Review by Qodo
1. Channel swaps duplicate updates |
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed exact head 7e94b22ff5fecdc07392c08c3e6bbb9592c14a27, including the full diff, current CI, merge state, and the available automated feedback. I found no reproducible P0–P2 production issue.
The problem and ownership model are correct. Runtime Host continuity remains the sole goal authority; the TUI consumes the existing pushed projection without adding polling, a goal RPC, or a second cache. Goal-origin transcript entries come from stored provenance, /goal is a local read-only command, and reconnect/replay behavior remains projection-driven. This is a cohesive and appropriately scoped observability slice.
A non-blocking P3 hardening opportunity remains: getGoal() and the channel-adoption callback expose the live projection object rather than a defensive clone. No current production listener mutates it, so this is not a demonstrated user-facing defect, but cloning at that boundary would make the runtime ownership guarantee explicit and consistent with the other notification paths.
I did not find low-quality test blocks to delete or a useful reason to split the PR.
Approved with the defensive-clone follow-up noted.
Disclosure: Codex performed the read-only source, lifecycle, test, CI, and feedback analysis. The human contributor remains responsible for independently verifying the final diff and owns the approval decision.
中文
当前没有 P0–P2。TUI 直接消费 Runtime Host goal projection,没有新增轮询或重复状态。可写引用未 clone 属 P3 防御性收口,不阻塞 Approve。
An armed goal burns tokens between prompts, but the TUI showed nothing: goal continuation turns rendered as plain user prompts, the status line had no goal segment, and the only way to inspect the loop was spending a model turn on GoalStatus. - Status line shows a live goal (active/waiting/paused) with the iteration counter and elapsed wall-clock; terminal goals stay hidden, matching the desktop chip. - Goal-origin turns render with a "Goal continuation (autonomous)" provenance header instead of as user prompts. - /goal prints condition, status, iterations, elapsed, tokens vs budget, and the evaluator's last note without burning a turn, and works while the loop is busy. - Goal state rides the session subscription's continuity snapshot — the same push channel the desktop observer diffs — so every transition (set, evaluator settle, abort auto-pause, waiting wake, terminal verdict, cross-client control) reaches the TUI as it happens, with no polling and no stale window. Ref apache#3022 Generated-by: Maka
Keep the standalone visibility branch type-safe after the goal command entered the shared TUI catalog. Generated-by: Maka
7e94b22 to
bd4c4efCompareme2seeks
commented
Aug 18, 2026
@Astro-Han This branch is rebased on current main and preserves the approved Goal visibility design while composing the new locale guidance catalog. CLI passes 288/288 locally. Could you re-review the rebased head when convenient? |
Astro-Han
left a comment
There was a problem hiding this comment.
The PR uses the right authority and the smallest useful seam: the TUI projects the Runtime Host continuity snapshot it already receives, /goal is handled locally, and no polling, extra RPC, or parallel goal state is introduced. Reconnect, Session switching, revision updates, and goal-origin provenance remain consistent. All current CI is green, and I found no blocking correctness or lifecycle issue.
One help-copy mismatch is noted inline as non-blocking polish.
AI-assisted review disclosure: Codex verified the final diff, continuity subscription flow, local command routing, status/summary projection, reconnect lifecycle, focused tests, and live CI. Two independent reviewer-agent passes and an OpenCode Go DeepSeek V4 Flash (high) adversarial pass were used as inputs. No local tests were run.
中文复核
这个 PR 使用了正确且最小的 seam:TUI 直接投影已经收到的 Runtime Host continuity snapshot,/goal 在本地处理,没有引入轮询、额外 RPC 或第二份 goal 状态。重连、Session 切换、revision 更新与 goal-origin provenance 保持一致。当前 CI 全绿,未发现阻塞性的正确性或生命周期问题。行内仅留了一处不阻塞的 help 文案建议。
本次为 AI 辅助审查:Codex 核验最终 diff、continuity subscription、本地命令路由、状态/摘要投影、重连生命周期、聚焦测试与实时 CI;另使用两次独立 reviewer 及一次 OpenCode Go DeepSeek V4 Flash(high)对抗审查。未运行本地测试。
Uh oh!
There was an error while loading. Please reload this page.
Astro-Han
left a comment
There was a problem hiding this comment.
The latest commit only corrects /goal guidance to match this PR's status-only scope, and the full current diff still keeps Runtime Host continuity projection as the sole authority—no polling, duplicate goal state, or parallel RPC path.
No remaining P0-P2 findings. The defensive-clone idea is optional hardening and should not expand this focused change.
AI-assisted review disclosure: Codex re-reviewed exact head 07b4cbd, including the one-commit delta, current CI, and thread state; all checks are green and no unresolved review threads remain.
中文说明
最新提交只修正了 /goal 帮助文案,使其与本 PR 的“仅展示状态”范围一致。完整 diff 仍由 Runtime Host continuity projection 作为唯一权威,没有引入轮询、重复状态或并行 RPC。没有剩余 P0-P2,可以合并。
Astro-Han
commented
Aug 19, 2026
Everything looks good, before we merge this PR into main, could we have a before after screenshot on PR body? Thanks! |
me2seeks
commented
Aug 19, 2026
Added the requested Before/After comparison to the PR body. It shows the same goal-origin message before the feature and, after it, the autonomous provenance, local /goal summary, and live status-line segment. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
An armed goal burns tokens between prompts, but the TUI showed nothing: goal continuation turns rendered as plain user prompts, the status line had no goal segment, and the only way to inspect the loop was spending a model turn on
GoalStatus. This PR surfaces the autonomous goal in the TUI using the same authoritative push channel the desktop observer already diffs.active/waiting/paused) with the iteration counter and elapsed wall-clock (e.g.goal 3/50 12m); terminal goals stay hidden, matching the desktop chip.Goal continuation (autonomous)provenance header instead of as user prompts, folded from stored messages so replay/reconnect can never duplicate or diverge./goalprints condition, status, iterations, elapsed, tokens vs budget, and the evaluator's last note without burning a turn — and works while the loop is busy.GoalProjection), so every transition (set, evaluator settle, abort auto-pause, waiting wake, terminal verdict, cross-client control) reaches the TUI as it happens. No polling, no stale window, no new RPC.Ref #3022
Review process
Two independent read-only review passes (first-principles + Occam's razor) over the diff. Findings addressed in this branch:
/goaltyped during a running turn was steered into the model as literal text; read-only status commands now answer locally mid-turn (the feature's primary use case), with a regression test assertingsteeris not called./goalsummary collapses embedded whitespace in condition/evaluator note, and a cleared goal is labeledCleared goal:instead of presenting its condition as armed.Deferred (out of scope): TUI goal control (pause/resume/clear) is tracked in #3023;
GoalManager.remove()not firing the invalidation pipeline is pre-existing runtime behavior only reachable on session retirement.Test plan
packages/cli: 272 tests pass (node --test), including new coverage:pi-goal.test.ts— status-line text, elapsed formatting, exhaustive status labels, summary whitespace/cleared handlingpi-transcript.test.ts— status-line goal segment rendering + goal-continuation provenance headerpi-tui-runner.test.ts—/goalsummary end-to-end,/goalmid-turn local answer (no steer), host-pushed pause reaching the status lineruntime-host-session-driver.test.ts—getGoal/subscribeGoalChangeswiring, no-RPC, no-duplicate-notifybiome checkclean;tsc --noEmitclean for@maka/cli.🤖 Generated by Maka
Visual evidence
The same stored goal-origin message before and after this PR, followed by the local
/goalsummary and live status-line projection.