Repository navigation
fix: preserve prompt ownership during repetition recovery - #814
Conversation
Co-authored-by: arena-agent <[email protected]>
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summaries (3 snapshots, latest commit 54026cd)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 54026cd)Status: No Issues Found | Recommendation: Merge Overview
Issue Details (click to expand)No unresolved issues remain in the changed code. The previously reported Files Reviewed (12 files)
Notes: Reviewed current PR metadata/head and incremental diff context available in this environment. Some auxiliary read-only shell inspection commands were unavailable/rejected, so this summary is based on the PR diff/state and file contents examined here. No inline comments posted. Previous review (commit ea52aa8)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Previous review (commit 32510f5)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (9 files)
Reviewed by free · Input: 166.4K · Output: 3.3K · Cached: 150.5K |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Issue for this PR
Closes #738
Type of change
What does this PR do?
Bounds repetition recovery and keeps queued, interrupted, and unfinished turns associated with the correct prompt. Repeated-result supersession now requires an assistant generation belonging to that prompt with
finish: "tool-calls"; a newer settled answer alone is not sufficient.Retains the text-only repetition guard and raw reasoning behavior. Also preserves legacy shell/Bash compatibility and includes the supporting session schema, compaction, and test changes.
Update 2 (head 54026cd, on top of bedf48d): adds
fix(session): resume declined waits with terminal child results. A failed wait-for-subagent finish is no longer counted as real tool work when it is the whole declined-wait checkpoint; the refusal is identified by its exact FinishTool message, not a substring. This is a small product change in packages/opencode/src/session/prompt.ts, plus test coverage. The Windows db-path smoke repair in the same commit is test-only: it makes the db path predicate portable (drive-letter and UNC paths, with pure controls) and changes no product code. The broader true-caller fix for the retry/wait failure remains OFF (not part of this PR) and its underlying behavior is still RED.Related: #780.
How did you verify your code works?
Local runs on the previous head (bedf48d, tree 920b8118):
Fresh CI on bedf48d then reported one failure per OS, neither reproduced locally before repair:
Repair verification on the exact new head 54026cd (writer-run, Linux host):
An independent source review of the earlier tree (bedf48d) reported no must-fix or should-fix items introduced by this change; it did not read every line of the large prompt test file, and it does NOT cover the new 54026cd delta. No current remote CI result is claimed for the new head: fresh full CI, typecheck, and an exact named review of the new delta are still required before merge.
Screenshots / recordings
N/A.
Checklist
Update 3 (head 82567b4, on top of 54026cd)
Test-only type repair in packages/opencode/test/session/prompt.test.ts (10 insertions, 7 deletions): an assistant-role typeguard now narrows
result.infobefore theparentIDassertions, which keeps the original parent/content assertions intact. Product code and the smoke test are unchanged. Focused suite on the exact head (writer-run, Linux): 10 passed, 0 failed, 60 assertions, 14.86s. No local typecheck was run - authoritative fresh CI typecheck on this head is required. Earlier full-suite evidence predates this guard; current proof scope is the focused suite plus fresh CI.