[Fix] Address review findings on the transcript convergence and question panel fixes#44
Merged
Merged
Conversation
|
3 issues outstanding. See task
|
…ion panel fixes Three issues from the openmote reviews of #33 and #37: - The history rebuild no longer resets the protocol service's auxiliary lookups: rebindMessages re-points only the id/position indexes, so the pending request_user_input map populated from history survives a refetch and a subsequent live response still masks secret answers. - Todos now converge to the fetched history whenever it carries plan state, including an intentionally empty list, instead of falling back to stale live todos. - A taskAborted status (cancel or terminal session error) drops the client-side pending user input requests, matching the worker-side clear, so an aborted question can no longer stay answerable and swallow free-text sends. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- The history rebuild now derives the trailing turn-completion decision from the live task status (falling back to what the transcript already shows), instead of always marking it - merging while a task is running no longer flips the active trailing assistant message to completed. - todowrite plan state arriving through ToolCall/ToolCallUpdate history envelopes now counts as authoritative plan history for todo convergence. - Live terminal tool results are matched by terminality rather than id/tool key: a persisted pending tool_call no longer swallows the live result (which can sit under the same envelope id after an in-place update), and the superseded pending call row is dropped instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lt kind A persisted in-progress ToolCallUpdate also rebuilds as a (partial) tool_result, so kind alone let it swallow a live terminal result and leave the transcript stuck on stale in-progress output. Coverage now requires a non-partial persisted result for live terminal results, and carried terminal results supersede both pending tool_call and partial tool_result rebuilt rows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
daniel-lxs
force-pushed
the
fix/transcript-merge-review-findings
branch
from
July 9, 2026 16:52
99dec35 to
ff474c4
Compare
daniel-lxs
added a commit
that referenced
this pull request
Jul 9, 2026
…ase range (#49) * [Fix] Scope GitHub sync review to the PR's Files Changed, not the rebase range The sync re-review computed its since-last-review delta as compare(lastReviewSha...currentHead) — three-dot semantics, so after the branch was rebased onto its base it also contained every commit pulled in from the base branch. The reviewer then flagged findings in files the PR never touched (observed on #44: 3 findings in ado/index.ts, CommsProviderSection.tsx, opencode-runtime.test.ts inherited from develop), and the merged PR permanently showed them as outstanding. The sync review now fetches the PR's authoritative Files Changed (base...head, via gh pr diff) and intersects the range diff and changed-file list with it, dropping rebased-in base-branch files. A rebase-only head change with no PR-relevant delta collapses to the existing no-op path. The review-code skill also records the authoritative file set (pull_request_changed_files) and is instructed to only report findings within it and to disregard base-branch/rebase hunks when running its own local delta diff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * [Fix] Harden sync-review scoping: fetch-failure safety and two-dot rebase no-op Addresses the two review findings on #49: - A fetch failure or too-large diff from either gh pr diff or the compare API returns { diff: undefined, changedFiles: [] }, indistinguishable from a genuine empty result. The no-op decision now keeps the delta (reviewer inspects manually) on failure, and falls back to the unscoped range when the PR's authoritative Files Changed cannot be read, instead of silently suppressing the delta. Extracted the decision into a pure, unit-tested resolveScopedSyncReviewDelta helper. - Filtering the three-dot range to PR file paths still re-shows the PR's own already-reviewed files after a rebase, so it cannot collapse to no-op from the API layer. The review-code skill now inspects the delta with a two-dot diff (git diff last..head) scoped to the PR files — the actual content difference between the reviewed commits, which is empty for a rebase-only head change — and marks no_new_delta when it is empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * [Fix] Review scope is the PR's base...head diff, not the two-dot range Second review round on #49: - knip: dropped the unused exported ScopedSyncReviewDelta interface (the helper now returns an inline-typed object). - A two-dot last..head diff still leaks base-branch hunks on files the PR also touches: it compares the old reviewed tree with the new rebased tree, so a base-branch change to a shared file shows up as a reviewable change even though it is outside the PR's base...head Files Changed. The only leak-free scope is the PR's own base...head diff. resolveScoped- SyncReviewDelta now uses the three-dot range only to pick which PR files changed since the last review, and presents the PR's authoritative base...head hunks for those files (fed as a pull-request diff, not a compare range). The skill makes base...head the sole in-scope change set and uses two-dot only to detect the no-op/rebase-only case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What problem this solves
Follow-up addressing the three outstanding openmote review findings on already-merged PRs #33 and #37:
acpService.setMessagesafter the history rebuild reset the whole protocol service, discarding the pendingrequest_user_inputlookup populated from history — a liverequest_user_input_responseafter a refetch formatted withrequest === null, so secret answers could render raw in the transcript.rebuilt.todos.length > 0 ? rebuilt.todos : state.todoskept stale todos when the server history's latest plan state was intentionally empty — refetches couldn't converge todos to server truth.pendingUserInputRequests— the aborted question stayed answerable and free-text sends could be swallowed as answers to a dead request.What changed
AcpProtocolService.rebindMessagesre-points only the id/position indexes; the merge path uses it instead ofsetMessages(removed), so request/user/tool lookups built byloadAcpEnvelopessurvive. Two service tests that emulated the old merge now callreset()+rebindMessages()explicitly.loadAcpEnvelopesreturnshasPlanHistory; the merge treats fetched todos as authoritative (including empty) whenever history carries plan state._setTaskStatusdrops pending user-input requests (store + service map) whentaskStateEvent === 'taskAborted'.Validation
Three new regression tests (secret masking after refetch-over-pending-request, todos converging to an empty plan, abort clearing the pending question). Full
src/app/(sandbox)/task/suite green — 486 tests. Lint + typecheck clean.🤖 Generated with Claude Code