fix(cli): show Goal objectives in session picker - #10295
Conversation
|
✅ Qwen Triage finished — CI landed green on ✅ Qwen Triage 已完成 —— |
|
Thanks for the PR! Template ✓ — all sections filled in, including the bilingual summary and a reviewer test plan. Problem — observed bug, not theory: the linked issue #10265 comes from a community user report (with screenshot) showing multiple Direction — aligned. Size — touches core ( Approach — minimal and pattern-conforming: an optional Risk — no changed file matches the revert-correlated high-risk paths. No elevated risk signals. Moving on to code review. 🔍 中文说明感谢贡献! 模板 ✓ — 各部分齐全,包含中英双语说明和 reviewer 测试计划。 问题 — 真实已观测的 bug,不是理论问题:关联 issue #10265 来自社区用户反馈(附截图),0.22.x 上多个 方向 — 对齐。 规模 — 触及 core( 方案 — 最小且符合既有模式:新增可选 风险 — 改动文件均未命中与 revert 相关的高风险路径。无升级风险信号。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewBefore reading the diff, my own proposal for this problem was: add an optional Verified against the current tree:
No blockers, no convention violations. Tests cover the picker row, preview title, search matching, listing exposure, and latest-objective recovery — 132 test lines against 64 production lines. TestingEvidence from the PR's own CI at the reviewed commit, fetched via the API — no PR code is built or executed in this review. Linux unit suite and Serve A/B were still running at review time; the macOS/Windows platform variants and the integration suite are skipped in this run. No failures so far. The finalize job updates the table below once CI settles. Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Sandboxed verification would settle the remaining gap: Real-scenario (tmux) testing: not run — unattended CI never executes PR code; the TUI surface is exercised only by the isolated 中文说明代码审查在看 diff 之前,我自己的方案是:给会话列表项加可选 对照当前主干逐项验证:
无阻塞项,无规范违规。测试覆盖列表行、预览标题、搜索匹配、列表字段暴露与最新 objective 恢复——132 行测试对应 64 行生产代码。 测试证据来自该 PR 自身在被审提交上的 CI,经 API 获取——本审查不构建、不运行任何 PR 代码。审查时 Linux 单元测试与 Serve A/B 仍在运行;macOS/Windows 平台变体与集成套件本轮被跳过。目前无失败。CI 落定后 finalize 任务会更新上方表格。 沙箱验证可以补上剩余缺口: 真实场景(tmux)测试:未执行——无人值守 CI 从不运行 PR 代码;TUI 表面仅由上述隔离的 — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 5/5 — clean across every stage; would merge without hesitation once CI lands. Stepping back: the problem is observed and specific (community report with screenshot, issue #10265), the solution is exactly the minimal approach I'd have proposed independently — an optional field, populated lazily through the same bounded reader The only reservations are inherent to the established bounded-read pattern this PR correctly reuses (windowed reads trade completeness for picker latency), not defects of this diff. CI at the reviewed commit is still in flight (Linux unit suite and Serve A/B; security checks already green), so approval is deferred until CI lands green on 中文说明置信度:5/5 — 各阶段均干净;CI 一通过即可毫不犹豫合入。 整体复盘:问题真实且具体(社区反馈附截图,issue #10265);方案与我独立提出的最小做法完全一致——新增可选字段,经由 唯一的保留意见来自该 PR 正确复用的既有有界读取模式的固有取舍(以选择器延迟优先于完备性),并非本 diff 的缺陷。 被审提交上的 CI 仍在进行(Linux 单元测试与 Serve A/B;安全检查已通过),因此在 CI 于 — Qwen Code · qwen3.8-max Reviewed at |
🩺 serve daemon A/BBuilt the PR base vs this PR head ✅ No response changes against the PR base across 12 scenario(s). — Qwen Code · serve A/B |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
中文说明
仅完成部分审查,审查缺口已披露。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
— qwen3.8-max via Qwen Code /review (v0.22.2)
…d label Review findings on QwenLM#10295: - R1-1 (Critical): the tail scan kept the last `objective` found on ANY `goal_state` line, so a `/goal clear` record — which persists `goal: null` and no objective at all — left the picker labelling the session with the goal the user had just cleared. `readLastMatchingLineFieldSync` reads the field from the LAST marker-carrying line instead, so the newest lifecycle record decides even when it omits the field. Its miss is now three-way: only `absent` (whole file scanned) lets the records fallback speak. A head-window hit is gone entirely — for a file bigger than the window it would resurrect a create record with an unknown number of later lifecycle records out of reach, and the parsed records are that same oldest slice of the file, so the honest answer there is no label. - R1-5: the pasted-twice policy block is now one `resolveGoalObjective` helper called from both `listSessions` and `getSessionListItem`. - R1-2/R1-3/R1-4/R1-7: tests for the legacy recovery arm, the prompt/title suppression guard at both producers, the `getSessionListItem` wiring, and the production file scan itself — the last one drives a real transcript whose goal record sits past the ten lines the records fallback parses, which is the only shape where a dead marker cannot hide behind it. The spy-based "prefers the latest objective" test is gone; it asserted the spy, not the code. - R1-6: the other four label surfaces stay as they are; the asymmetry is now a documented decision on `SessionListItem.goalObjective` rather than an accident, with the shape a follow-up would take. Mutation-verified: reverting the read to "last objective on any goal_state line" reddens 3; letting the records fallback answer an out-of-window scan reddens 1; a marker typo or a renamed field reddens 1 and 4; dropping the suppression guard reddens 3; dropping the `getSessionListItem` wiring or the legacy arm reddens 1 each. Claude-Session: https://claude.ai/code/session_01VXsC4f71S6U6YkW82NRw7m
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
中文说明
仅完成部分审查,审查缺口已披露。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
— qwen3.8-max via Qwen Code /review (v0.22.2)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Deferred under the convergence posture (round 3, not a blocker) — recorded, not requested in this round:
packages/core/src/utils/sessionStorageUtils.ts:330 — [review] New reader inverts the sibling (key, marker) parameter order
Convergence: round 3 posted 2 inline comment(s), 2 of them reported for the first time; the previous round posted 8 (8 new). Findings keep coming back to the same files: packages/core/src/services/sessionService.ts (findings in round 2; 1 more now); packages/core/src/utils/sessionStorageUtils.ts (findings in round 2; 1 more now). A cluster that keeps producing siblings usually means the fixes are treating instances of a shared root cause — triaging that cause before the next round, or splitting an independent cluster into its own pull request, tends to end the loop faster than fixing them one at a time. No Critical finding is open on this round, so merging and moving the remaining Suggestion threads to a follow-up issue is available as an ending — a merged pull request cannot diverge further. (Observation only — nothing was withheld from this review because of this observation.)
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
收敛姿态下延后(第 3 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
收敛情况:第 3 轮发布了 2 条行内评论,其中 2 条是首次提出;上一轮发布了 8 条(其中 8 条首次提出)。发现反复回到同一批文件:packages/core/src/services/sessionService.ts(第 2 轮已出过发现,本轮又有 1 条);packages/core/src/utils/sessionStorageUtils.ts(第 2 轮已出过发现,本轮又有 1 条)。一个不断再生兄弟发现的簇,通常意味着逐条修复只在处理同一根因的实例——先定位并处理该根因,或把独立的簇拆成单独的 PR,通常比逐条修复更快结束循环。本轮没有未决的 Critical,因此"合入后把剩余 Suggestion 线程转到后续 issue"是一个可选的结束方式——已合入的 PR 不会继续发散。(仅为观察——本轮评审未因此扣留任何内容。)
— qwen3.8-max via Qwen Code /review (v0.22.2)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
1 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:
- Parameter-order inversion of readLastMatchingLineFieldSync / extractJsonStringFieldFromLastMatchingLine (marker before key, siblings are key-first) — already reported in the round-3 deferral list (review 5054292672)
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Convergence: round 4 posted 4 inline comment(s), 4 of them reported for the first time; the previous round posted 2 (2 new). Findings keep coming back to the same files: packages/core/src/services/sessionService.ts (findings in round 3; 2 more now); packages/core/src/utils/sessionStorageUtils.ts (findings in round 2; 2 more now). The rate of new findings is not falling. A cluster that keeps producing siblings usually means the fixes are treating instances of a shared root cause — triaging that cause before the next round, or splitting an independent cluster into its own pull request, tends to end the loop faster than fixing them one at a time. Batching the remaining fixes and verifying them before the next push, or dropping this PR's reviews to --severity-floor critical, keeps the loop from re-deriving the same set. (Observation only — nothing was withheld from this review because of this observation.)
中文说明
仅完成部分审查,审查缺口已披露。
本轮确认的 1 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
收敛情况:第 4 轮发布了 4 条行内评论,其中 4 条是首次提出;上一轮发布了 2 条(其中 2 条首次提出)。发现反复回到同一批文件:packages/core/src/services/sessionService.ts(第 3 轮已出过发现,本轮又有 2 条);packages/core/src/utils/sessionStorageUtils.ts(第 2 轮已出过发现,本轮又有 2 条)。新发现的产出速度没有下降。一个不断再生兄弟发现的簇,通常意味着逐条修复只在处理同一根因的实例——先定位并处理该根因,或把独立的簇拆成单独的 PR,通常比逐条修复更快结束循环。把剩余修复攒成一批、验证后再推送,或将本 PR 的评审降到 --severity-floor critical,可以避免循环反复推导同一组发现。(仅为观察——本轮评审未因此扣留任何内容。)
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Not reviewed: test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted.
Convergence: round 5 posted 3 inline comment(s), 3 of them reported for the first time; the previous round posted 4 (4 new). Findings keep coming back to the same files: packages/core/src/utils/sessionStorageUtils.ts (findings in round 4; 2 more now). A cluster that keeps producing siblings usually means the fixes are treating instances of a shared root cause — triaging that cause before the next round, or splitting an independent cluster into its own pull request, tends to end the loop faster than fixing them one at a time. (Observation only — nothing was withheld from this review because of this observation.)
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
未审查:test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted。
收敛情况:第 5 轮发布了 3 条行内评论,其中 3 条是首次提出;上一轮发布了 4 条(其中 4 条首次提出)。发现反复回到同一批文件:packages/core/src/utils/sessionStorageUtils.ts(第 4 轮已出过发现,本轮又有 2 条)。一个不断再生兄弟发现的簇,通常意味着逐条修复只在处理同一根因的实例——先定位并处理该根因,或把独立的簇拆成单独的 PR,通常比逐条修复更快结束循环。(仅为观察——本轮评审未因此扣留任何内容。)
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Not reviewed: build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only.
Not reviewed: test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted.
Deferred under the convergence posture (round 6, not a blocker) — recorded, not requested in this round:
packages/core/src/services/sessionService.test.ts:7317 — [review] Negative goal tests never assert the session item existspackages/core/src/utils/sessionStorageUtils.ts:327 — [review] Brace-recovery fallback's positive path has no testpackages/core/src/services/sessionService.ts:1985 — [review] The records-recovery 'none' branch is unpinnedpackages/core/src/services/sessionService.ts:1768 — [review] Whole-file inference rests on an undocumented cross-module invariantpackages/core/src/utils/sessionStorageUtils.ts:15 — [review] Production consumer of a 'unit tests only' export
Convergence: round 6 posted 1 inline comment(s), 1 of them reported for the first time; the previous round posted 3 (3 new). Findings keep coming back to the same files: packages/core/src/utils/sessionStorageUtils.ts (findings in rounds 4, 5; 1 more now). A cluster that keeps producing siblings usually means the fixes are treating instances of a shared root cause — triaging that cause before the next round, or splitting an independent cluster into its own pull request, tends to end the loop faster than fixing them one at a time. (Observation only — nothing was withheld from this review because of this observation.)
中文说明
仅完成部分审查,审查缺口已披露。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
未审查:build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only。
未审查:test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted。
收敛姿态下延后(第 6 轮,非阻断)——已记录,本轮不要求修改:共 5 条(原文未翻译,列表见上方英文部分)。
收敛情况:第 6 轮发布了 1 条行内评论,其中 1 条是首次提出;上一轮发布了 3 条(其中 3 条首次提出)。发现反复回到同一批文件:packages/core/src/utils/sessionStorageUtils.ts(第 4、5 轮已出过发现,本轮又有 1 条)。一个不断再生兄弟发现的簇,通常意味着逐条修复只在处理同一根因的实例——先定位并处理该根因,或把独立的簇拆成单独的 PR,通常比逐条修复更快结束循环。(仅为观察——本轮评审未因此扣留任何内容。)
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted.
Not reviewed: build-and-test — the build-test test phase did not complete (the build phase consumed the per-call budget); the PR's own suites were run directly instead (329/329 across the three touched test files; the full packages/core suite measured 22,122 passed with 111 failures attributed to pre-existing/environmental causes outside the PR's files; the packages/cli suites did not run).
7 Suggestion(s) were drafted inline past the resolved critical posting floor; the CLI moved them into the deferral list below (floor enforcement).
Deferred under the convergence posture (round 7, not a blocker) — recorded, not requested in this round:
packages/core/src/services/sessionService.test.ts:7375 — [review] R7-1: No added test exercises a goal_state record that passes readGoalStateObjective 's type / subtype gate but fails parseGoalStateRecordPayloadV2 , so the scan reader…packages/core/src/services/sessionService.test.ts:7361 — [review] R7-2: The recordsComplete === false → file scan branch of resolveGoalObjective has no positive witness: the torn it.each is the only test in the file where complete: f…packages/core/src/services/sessionService.test.ts:7460 — [review] R7-3: Three long-transcript/window-limit tests assert only an optional-chained findItem(result.items, sessionId)?.goalObjective , which is satisfied when the session item is…packages/core/src/utils/sessionStorageUtils.test.ts:257 — [review] R7-4: The leadingPartial suffix-recovery path — documented as "a leading partial line contributes only a complete suffix record … a later record glued onto that prefix rem…packages/core/src/utils/sessionStorageUtils.ts:367 — [review] R7-5: The lifecycle decisive return added in this increment makes a half-written marker line match on the first tail read, which suppresses the bounded grown-tail re-read that ex…packages/core/src/utils/sessionStorageUtils.ts:344 — [review] R7-6: On a leading partial line, a glued marker-bearing record with any record after it on the same physical line is unrecoverable — _recoverObjectsFromLine is guarded by !lea…packages/core/src/utils/sessionStorageUtils.test.ts:420 — [review] R7-7: No committed test pins a value-returning glued/torn-line recovery: every glued/torn test in both new describe blocks asserts value: undefined or matched: false , an…packages/core/src/services/sessionService.ts:2301 — [review] getSessionListItem scan path has no label test (R7-8)packages/core/src/utils/sessionStorageUtils.ts:283 — [review] recordMatches parameter is production-dead (R7-9)packages/core/src/utils/sessionStorageUtils.ts:441 — [review] Dead reason union and its merge branch (R7-10)
Convergence: round 7 posted 1 inline comment(s), 1 of them reported for the first time; the previous round posted 1 (1 new). Findings keep coming back to the same files: packages/core/src/utils/sessionStorageUtils.ts (findings in round 5; 1 more now). The rate of new findings is not falling. A cluster that keeps producing siblings usually means the fixes are treating instances of a shared root cause — triaging that cause before the next round, or splitting an independent cluster into its own pull request, tends to end the loop faster than fixing them one at a time. Batching the remaining fixes and verifying them before the next push keeps the loop from re-deriving the same set; this PR's reviews already resolve to a critical posting floor. (Observation only — nothing was withheld from this review because of this observation.)
Residual risk: this loop is persistently critical — Criticals stood in the previous round's work-list and stand again this round (1 Critical(s)), the rate of first-time findings is not falling (this round 1, previous 1), and the standing Critical backlog is not shrinking. The severity floor will not converge it. Recommendation: land-with-residual-risk — the exit is a maintainer risk-acceptance decision (merge, carrying the residual risk), not another review round. Residual-risk inventory for that decision (maintainer to complete):
| standing Critical | attack surface | attacker-dependency | blast radius |
|---|---|---|---|
| (each standing Critical) | … | … | … |
Advisory only — it does not block this review.
中文说明
仅完成部分审查,审查缺口已披露。
未审查:test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted。
未审查:build-and-test — the build-test test phase did not complete (the build phase consumed the per-call budget); the PR's own suites were run directly instead (329/329 across the three touched test files; the full packages/core suite measured 22,122 passed with 111 failures attributed to pre-existing/environmental causes outside the PR's files; the packages/cli suites did not run)。
7 条 Suggestion 在已解析的 critical 发布下限之外被起草为行内评论;CLI 已将其移入下方延后清单(下限强制执行)。
收敛姿态下延后(第 7 轮,非阻断)——已记录,本轮不要求修改:共 10 条(原文未翻译,列表见上方英文部分)。
收敛情况:第 7 轮发布了 1 条行内评论,其中 1 条是首次提出;上一轮发布了 1 条(其中 1 条首次提出)。发现反复回到同一批文件:packages/core/src/utils/sessionStorageUtils.ts(第 5 轮已出过发现,本轮又有 1 条)。新发现的产出速度没有下降。一个不断再生兄弟发现的簇,通常意味着逐条修复只在处理同一根因的实例——先定位并处理该根因,或把独立的簇拆成单独的 PR,通常比逐条修复更快结束循环。把剩余修复攒成一批、验证后再推送,可以避免循环反复推导同一组发现;本 PR 的评审已解析为 critical 发布下限。(仅为观察——本轮评审未因此扣留任何内容。)
残余风险:本循环处于 persistently-critical 形态——上一轮工作清单中的 Critical 本轮依然存在(本轮 1 条 Critical),首次发现的速率没有下降(本轮 1,上一轮 1),且未决 Critical 积压没有减少。severity floor 无法使其收敛。建议:land-with-residual-risk——出口是 maintainer 的风险接受决定(合入并承担残余风险),而非再开一轮评审。供该决定使用的残余风险清单(maintainer 填写):按每条未决 Critical 列出「攻击面 · 攻击者依赖性 · 影响范围」三栏。仅为建议——不阻断本次评审。
— qwen3.8-max via Qwen Code /review (v0.22.3)
…ective # Conflicts: # packages/core/src/services/sessionService.ts
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / afterℹ️ No screenshot changed against the PR base — but this PR edits 2 render-shaping files:
Either the change has no visual effect (logic, plumbing, a state the scenarios never reach), or no scenario renders this UI — in which case the preview cannot see it, and an empty result is a coverage gap rather than a clean bill of health. To make it visible, add a scenario to Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
3 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:
- R8-2 production consumer of the 'unit tests only' export (packages/core/src/utils/sessionStorageUtils.ts:15) — already reported in the round-6 deferral list (review 5057402003)
- Round-3 optional-chained negative-assertion gap (packages/core/src/services/sessionService.test.ts long-transcript tests) — already deferred in round 7 as R7-3
- Round-3 leading-partial glued-mid-line recovery gap (packages/core/src/utils/sessionStorageUtils.ts:344) — already deferred in round 7 as R7-6
Not reviewed: test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted.
Not reviewed: build-and-test — the webui test command was clamped on a budget-shortened deadline; packages/cli and packages/core full suites hit the time cap on a contended runner (every failing file is untouched by the PR with a uniform timeout signature; all 14 PR-touched test files pass in isolation: core 342/342, cli 1151/1151, web-shell 28/28); no A/B baseline (the base tree did not build within budget).
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Not reviewed: build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only.
Deferred under the convergence posture (round 8, not a blocker) — recorded, not requested in this round:
packages/core/src/services/sessionService.test.ts:7608 — [review] module-mocked _recoverObjectsFromLine has no beforeEach default pin — the auto-mock returns undefined and the recovery loop dereferences it unguarded, so a test reaching the …packages/core/src/services/sessionService.ts:432 — [review] readGoalStateObjective type/subtype guard's reject-then-continue semantics have no production-level witness (guard-removal mutant ships green)packages/core/src/services/sessionService.ts:1778 — [review] legacy (pre-v2) Goal recovery unreachable beyond the 10-record prefix — the gate caps the records path and the fallback scan is v2-marker-onlypackages/core/src/services/sessionService.ts:435 — [review] scan-vs-records divergence — a malformed newest payload is decisive no-label on the scan path but falls through to the older record on the records pathpackages/core/src/utils/sessionStorageUtils.test.ts:547 — [review] both fstat-spy tests install vi.spyOn(fs, 'fstatSync') and never restore it; the second captures the first's still-installed spypackages/core/src/utils/sessionStorageUtils.test.ts:193 — [review] the new utility tests never drive the production reader, and the crash-truncation tests pin the OPPOSITE of production's hooked semantics for identical bytespackages/core/src/utils/sessionStorageUtils.test.ts:565 — [review] bounded-growth out-of-window arm has no witness — removing the delta condition ships green and would claim a false 'absent'packages/core/src/utils/sessionStorageUtils.test.ts:399 — [review] the leadingPartial guard test is vacuous — a guard-removal mutant keeps the whole suite green (second facet of round-7 deferral R7-4)packages/core/src/services/sessionService.test.ts:7740 — [review] the clear-decisive scan branch has no witness — a non-decisive-clear mutant resurrects cleared Goals while every committed test stays greenpackages/core/src/utils/sessionStorageUtils.ts:386 — [review] CLASS FINDING — the torn/glued-line recovery surface is unbounded; four verified corners this round (two opened by the round-7 fix), all fail-closed or sub-Critical; close it str…
Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)
中文说明
仅完成部分审查,审查缺口已披露。
本轮确认的 3 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。
未审查:test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted。
未审查:build-and-test — the webui test command was clamped on a budget-shortened deadline; packages/cli and packages/core full suites hit the time cap on a contended runner (every failing file is untouched by the PR with a uniform timeout signature; all 14 PR-touched test files pass in isolation: core 342/342, cli 1151/1151, web-shell 28/28); no A/B baseline (the base tree did not build within budget)。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
未审查:build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only。
收敛姿态下延后(第 8 轮,非阻断)——已记录,本轮不要求修改:共 10 条(原文未翻译,列表见上方英文部分)。
机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
5 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:
- R9-1 vacuous leadingPartial guard pin (sessionStorageUtils.test.ts:399) — already reported in the round-8 deferral list (review 5060725808, second facet of R7-4)
- R9-2 clear-decisive scan branch has no witness (sessionService.test.ts:7980) — already reported in the round-8 deferral list (review 5060725808)
- R9-4 legacy (pre-v2) Goal recovery unreachable beyond the 10-record prefix (sessionService.ts:1861) — already reported in the round-8 deferral list (review 5060725808)
- R9-5 bounded-growth out-of-window arm has no witness (sessionStorageUtils.test.ts:565) — already reported in the round-8 deferral list (review 5060725808)
- R9-6 dead LastMatchingLineScan.reason union and its merge branch (sessionStorageUtils.ts:473) — already reported in the round-7 deferral list as R7-10 (review 5057402003)
Not reviewed: build-and-test — the harness test phase did not complete (the build phase consumed the per-call budget; the sdk-typescript build timeout is classified as infrastructure); the PR-touched suites were run directly instead (core 350/350, cli 37/37, web-shell 28/28 — 415/415); test-efficacy probing inconclusive (harnessValidated: null), neither validated nor refuted.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Not reviewed: build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only.
Not reviewed: build-and-test — CI is failing at the reviewed commit (Test (ubuntu-latest, Node 22.x), web-shell E2E Smoke (ubuntu-latest, Node 22.x), Serve A/B (ubuntu-latest, Node 22.x)); the 14 PR-touched test files pass in isolation locally (415/415), and prior rounds attributed full-suite failures on this runner to time-cap contention on files untouched by the PR, but the CI state at this commit is red and unexplained here.
Not explored to full depth (tool budget reached): "agent reverse-audit (round 2)": forcing the reversed file order (sessionStorageUtils before session-writer-lease in one worker) to reproduce the lease failures live — shuffled seeds 42/7 both ….
Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 5.
Deferred under the convergence posture (round 9, not a blocker) — recorded, not requested in this round:
packages/core/src/utils/sessionStorageUtils.ts:386 — [review] D9-1 CLASS FINDING — torn/glued-line recovery surface unbounded; six verified corners across rounds 7-9 (two new this round: torn nested-marker suppression of an active goal's la…
中文说明
仅完成部分审查,审查缺口已披露。
本轮确认的 5 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。
未审查:build-and-test — the harness test phase did not complete (the build phase consumed the per-call budget; the sdk-typescript build timeout is classified as infrastructure); the PR-touched suites were run directly instead (core 350/350, cli 37/37, web-shell 28/28 — 415/415); test-efficacy probing inconclusive (harnessValidated: null), neither validated nor refuted。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
未审查:build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only。
未审查:build-and-test — CI is failing at the reviewed commit (Test (ubuntu-latest, Node 22.x), web-shell E2E Smoke (ubuntu-latest, Node 22.x), Serve A/B (ubuntu-latest, Node 22.x)); the 14 PR-touched test files pass in isolation locally (415/415), and prior rounds attributed full-suite failures on this runner to time-cap contention on files untouched by the PR, but the CI state at this commit is red and unexplained here。
未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 2)":forcing the reversed file order (sessionStorageUtils before session-writer-lease in one worker) to reproduce the lease failures live — shuffled seeds 42/7 both …。
未审查:反向审计——在 5 轮的反审轮数上限内未收敛。
收敛姿态下延后(第 9 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
— qwen3.8-max via Qwen Code /review (v0.22.3)
|
@qwen-code /takeover from 9 |
|
🤝 Takeover engaged: the autofix loop now manages this PR — it will address new review feedback and resolve base conflicts until the label is removed or the round cap is reached. This is a fork PR, so the first round comes from the next scheduled scan (usually within minutes). This window's round counter starts at 9 (the rounds this PR spent in review before takeover), so the Critical-only brake engages after 0 more change-producing round(s) instead of a full fresh 5. Remove the 中文说明🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。本 PR 来自 fork,首轮处理将由下一次定时扫描执行(通常几分钟内)。本窗口轮次计数从 9 起算(即本 PR 托管前已进行的评审轮数),因此再经过 0 个产生改动的轮次即进入 Critical-only,而非重新计满 5 轮。移除 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
4 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:
- R7-3 real-FS negative Goal tests never pin that the session item exists (packages/core/src/services/sessionService.test.ts:7816) — already reported in the round-6 deferral list (review 5057402003) and re-recorded as R7-3 (review 5059823601)
- R9-4 legacy (pre-v2) Goal recovery unreachable beyond the 10-record prefix (packages/core/src/services/sessionService.ts:437) — already reported in the round-8 deferral list (review 5060725808) and re-recorded as R9-4 (review 5061664066)
- R10-1 fstat-spy growth tests never restore the vi.spyOn(fs, 'fstatSync') spy (packages/core/src/utils/sessionStorageUtils.test.ts:430) — already reported in the round-8 deferral list (review 5060725808)
- R7-9 recordMatches parameter on readLastMatchingLineFieldSync is production-dead (packages/core/src/utils/sessionStorageUtils.ts:413) — already reported as R7-9 (review 5059823601)
Not reviewed: build-and-test — the harness test phase did not complete (the build phase consumed the per-call budget); the PR-touched suites were run directly instead (core 352/352, cli 37/37 — 389/389 across the five PR-touched test files).
Not reviewed: test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.
Not reviewed: build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only.
Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 5.
Deferred under the convergence posture (round 10, not a blocker) — recorded, not requested in this round; 1 Critical(s) among them are deferred by their axes — fails-closed on new surface, where no wrong result is certified and the merge base had neither the surface nor the defect — and remain follow-up work recorded in the findings artifact:
packages/core/src/utils/sessionStorageUtils.test.ts:572 — [probe] Critical [fails-closed] [new-surface] new fstat-spy growth tests fail on O_NOFOLLOW-absent platforms (Windows): openSyncNoFollow's identity check consumes the rigged first fs…packages/core/src/services/sessionService.ts:1861 — [probe] exact-10-record fully-parsed files are routed to the blind tail scan; >64KB files with the goal_state near the head stay unlabelledpackages/core/src/utils/sessionStorageUtils.ts:382 — [probe] picker/resume divergence on torn/glued newest goal_state — under-label identical to the pre-PR display
中文说明
仅完成部分审查,审查缺口已披露。
本轮确认的 4 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。
未审查:build-and-test — the harness test phase did not complete (the build phase consumed the per-call budget); the PR-touched suites were run directly instead (core 352/352, cli 37/37 — 389/389 across the five PR-touched test files)。
未审查:test-efficacy probing — all probes inconclusive (harnessValidated: null; the probe runner tripped the repo's vitest prerequisite guard), neither validated nor refuted。
未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。
未审查:build-and-test — Test (macos-latest, Node 22.x) and Test (windows-latest, Node 22.x) unit matrices were skipped in CI; unit suites ran on Linux only。
未审查:反向审计——在 5 轮的反审轮数上限内未收敛。
收敛姿态下延后(第 10 轮,非阻断)——已记录,本轮不要求修改;其中 1 条 Critical 按其失败方向与对照基线延后——fails-closed 且 new-surface:未认证任何错误结果,且 merge base 既无该功能面也无该缺陷——作为后续工作记录在 findings 工件中:共 3 条(原文未翻译,列表见上方英文部分)。
— qwen3.8-max via Qwen Code /review (v0.22.3)
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: Autofix review round — verification only, no code changes neededCritical-only mode is active. Every actionable item this round is one of the five Critical findings from the automated reviewer, and each already carries a fix committed in an earlier round. Since the last bot push the branch merged Per-finding verdicts (all verified against HEAD)
Mutation cross-checkTo prove the witnesses discriminate, the structural position check in Maintainer changes since the last bot push
Deferred itemsThe Deferred non-Critical feedback section (round-3/round-5 inline findings, deferred review bodies, and deferred PR comments) was left untouched per Critical-only mode — no code changes, no thread actions, no replies. Verification
Outcome: no changes this round, no commit. All five Critical findings and the addressed Suggestions were re-verified as resolved in the current code; their comment ids are listed in 中文说明Autofix 评审轮次 — 仅验证,无需代码改动当前处于 Critical-only 模式。本轮全部可处理条目是自动评审器提出的 5 条 Critical 发现,且每一条都已在更早的轮次中提交了修复。自上次机器人推送之后,本分支合并了 逐条结论(均已在 HEAD 上验证)
变异交叉验证为证明见证测试具有区分力,临时变异了 上次机器人推送后的维护者改动
延后条目按 Critical-only 模式,Deferred non-Critical feedback 部分(第 3/5 轮行内发现、延后的评审主体、延后的 PR 评论)未做任何处理——不改代码、不操作线程、不回复。 验证
结果:本轮无改动、无提交。全部 5 条 Critical 发现及已处理的 Suggestion 均已重新验证为在当前代码中已解决;其评论 id 列于 Deferred non-Critical feedbackCritical-only mode is active: the round counter reached 5 (this window was seeded at round 9 by
中文说明已进入仅处理 Critical 的模式:轮次计数已达 5(本窗口由 Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧵 Resolved all 16 selected review thread(s). · 已关闭全部选中的 16 条评审线程。 🧠 Handled by Qwen Code · model/模型 |
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: Autofix review round — no code changesA maintainer ran a full real-environment A/B verification against There is nothing actionable for this round:
The verification's four non-blocking observations are recorded for follow-up rather than merged here:
No code changes were made this round. VerificationNo code changed this round, so no build/typecheck/lint/test commands were run. The working tree is clean and HEAD is the maintainer-verified 中文说明Autofix 审阅轮次 —— 无代码改动一位维护者在真实环境对 本轮没有可执行的工作:
该验证的 4 条非阻塞观察已记录为后续跟进项,而非在本 PR 中合入:
本轮未做任何代码改动。 验证本轮未改动任何代码,因此未运行 build/typecheck/lint/测试命令。工作区为干净状态,HEAD 即为维护者验证过的 Deferred non-Critical feedbackCritical-only mode is active: the round counter reached 5 (this window was seeded at round 9 by 中文说明已进入仅处理 Critical 的模式:轮次计数已达 5(本窗口由 Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧠 Handled by Qwen Code · model/模型 |
yiliang114
left a comment
There was a problem hiding this comment.
LGTM at 7aef1b0. Reviewed the full diff:
- The goal-objective fallback is correctly scoped: precedence stays customTitle > prompt > goalObjective, the policy has a single owner (resolveGoalObjective) so listSessions and getSessionListItem can't disagree, and the field is deliberately limited to the /resume picker with the widening work documented for later.
- The lifecycle semantics are right: the newest goal_state line decides, including cleared goals (goal: null / no objective), so a cleared Goal stops showing; matched-with-undefined vs absent vs out-of-window vs unreadable are properly distinguished, and the tail-only window deliberately has no head fallback because lifecycle fields can be cleared by unreadable newer records.
- The new readLastMatchingLineFieldSync is bounded (one LITE_READ_BUF_SIZE tail read plus one re-read for concurrent appends), uses openSyncNoFollow, closes its fd in finally, and handles crash-truncated lines via complete-suffix recovery with an authoritative-parser path that can't expose stale lifecycle values.
- readLines→readLinesWithIntegrity keeps the existing extraction behavior while exposing the completeness flag the fallback selection needs.
- Picker display/preview/search all covered by tests; 26 prior threads resolved.
CI shows no failures on this head. Approving; the stale bot CHANGES_REQUESTED predates this head.
qwen-code-dev-bot
left a comment
There was a problem hiding this comment.
Reviewed at head 7aef1b0d.
- The prior CHANGES_REQUESTED rounds were all on superseded heads; every review thread (26/26) is resolved and the reworked implementation addresses the earlier findings: the newest
goal_staterecord is decisive (so/goal clearcan't resurrect a stale objective), a record-window overflow or unreadable file fails closed to an unlabelled session, and the nested-marker case is handled by reading the parsed record rather than a raw substring. resolveGoalObjectivekeeps the precedence policy (prompt || titleshort-circuit, complete-prefix vs bounded file scan) in one place used by both list and single-session read paths, so the TUI picker and serve can't disagree.- No new Critical issues found in the diff; test coverage (cleared goal, out-of-window, priority, both read paths) looks appropriate.
- Required checks are green at this head.




What this PR does
Goal-only sessions now use their persisted Goal objective as the fallback label in the resume picker when no custom title or user prompt exists. The same fallback is used in the preview, and picker search can match the displayed objective. Existing custom-title and prompt precedence remains unchanged.
Why it's needed
Sessions started with
/goalcan contain no ordinary user prompt, so/resumepreviously rendered them as(empty prompt)even though the Goal objective clearly identifies the work. This makes those sessions recognizable and searchable without changing their stored transcript format.Reviewer Test Plan
How to verify
Create a session with
/goal, leave it without a custom title or ordinary prompt, then open/resume. Confirm that the picker row and preview show the latest persisted Goal objective instead of(empty prompt), and that searching for text from the objective finds the session. Also confirm that a custom title still wins over a prompt or Goal objective, and a prompt still wins over the Goal objective.Evidence (Before & After)
Before: Goal-only sessions appeared as
(empty prompt)in the picker and had no useful preview title.After: Goal-only sessions display their latest Goal objective in both locations and can be found by objective text. Automated regression coverage verifies the picker row, preview, search behavior, and latest-objective recovery.
Tested on
Environment (optional)
Node.js 22; targeted core and CLI unit tests, package typechecks, related ESLint checks, and the repository build.
Risk & Scope
Linked Issues
Fixes #10265
中文说明
本 PR 的改动
仅包含 Goal 的会话在没有自定义标题和普通用户提示词时,现在会使用持久化的 Goal objective 作为
/resume选择器中的后备名称。预览区使用同一后备逻辑,选择器搜索也可以匹配当前显示的 objective。原有的自定义标题和提示词优先级保持不变。为什么需要
通过
/goal启动的会话可能没有普通用户提示词,因此/resume之前会把它们显示为(empty prompt),即使 Goal objective 已经清楚描述了工作内容。此改动让这些会话无需修改存储格式即可被识别和搜索。Reviewer Test Plan
如何验证
使用
/goal创建一个会话,不设置自定义标题,也不添加普通提示词,然后打开/resume。确认选择器行和预览区显示最新持久化的 Goal objective,而不是(empty prompt);同时确认使用 objective 中的文本搜索可以找到该会话。还应确认自定义标题仍优先于提示词和 Goal objective,提示词仍优先于 Goal objective。前后对比证据
改动前:仅包含 Goal 的会话在选择器中显示为
(empty prompt),预览区也没有有用的标题。改动后:仅包含 Goal 的会话在选择器和预览区都会显示最新 Goal objective,并可通过 objective 文本搜索。自动化回归测试覆盖了选择器行、预览、搜索行为和最新 objective 的恢复。
测试平台
环境(可选)
Node.js 22;执行了 core 与 CLI 定向单元测试、包级类型检查、相关 ESLint 检查以及仓库构建。
风险与范围
关联 Issue
Fixes #10265