Skip to content

fix(knowledge): avoid duplicate scribe repairs after reconnecting - #198146

Merged
vincentkoc merged 1 commit into
mainfrom
fix/knowledge-repair-retry-20261113
Nov 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/knowledge-repair-retry-20261113

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Related: #198030

What Problem This Solves

Retrying a Knowledge scribe's Repair after losing its response can start another repair turn and create an extra conversation.

User Impact

Repair retries within the same browser page reuse the accepted request and its conversation across Gateway reconnects. A deliberate late Try again still starts a fresh attempt.

Why This Change Was Made

Repair now uses the existing scribe-update attempt owner. It retains the request identity and resolved conversation when a send fails, including when conversation creation already succeeded. The view consumes that operation instead of owning separate repair lifecycle logic. Archived-conversation restoration keeps its existing behavior.

Evidence

  • Four rendered Repair/Try again cases fail on base ee854a1d757943482bb6361c7ccd4f560c8fc92e because retries change the request key. At reviewed head ecd2665e2886071505bf2c0b261c8f39dc41ff94, all 29 scribe-view tests pass: 2.75 seconds Vitest duration, 3.57 seconds wrapper wall time.
  • An isolated real WebSocket Gateway trace drives the actual Repair renderer, discards an accepted acknowledgment at the host-response boundary, disconnects/reconnects the authenticated client, then retries. Both existing and missing-conversation cases produce two Gateway send attempts, one local HTTP model request, one persisted user message, and one assistant reply. The missing case creates exactly one replacement conversation. The fixed local provider and fixed automation inventory make this deterministic; this is not a live-provider claim. Runtime trace: 18.97 seconds test time, 58.69 seconds including cold preparation and cleanup.
  • Native Knowledge Control UI bundle build, scoped production/test typecheck using the existing UI CSS declaration, targeted lint, formatting, and whitespace checks pass. The direct package-only typecheck has the same pre-existing control-ui.ts:25 missing CSS declaration error on base and head; no unrelated configuration change is included.
  • Fresh independent review is clear. Full local ClawSweeper reviewed the complete base-to-head range with no correctness or security findings. The real Gateway trace addresses its source-only review's transport-proof request.
  • Production delta: +35/-24 lines; regression delta: +62 lines. Exact-head CI passed: 20 successful jobs, 32 skipped, no failures, 8 minutes 16 seconds elapsed. Its changed-extension-config job took 178 seconds and logged all 29 scribe-view tests passing; that job duration includes other work.

@vincentkoc vincentkoc self-assigned this Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 13, 2026 06:46
@vincentkoc
vincentkoc enabled auto-merge (squash) November 13, 2026 06:54
@vincentkoc
vincentkoc merged commit 42f933c into main Nov 13, 2026
169 checks passed
@vincentkoc
vincentkoc deleted the fix/knowledge-repair-retry-20261113 branch November 13, 2026 06:56
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
…enclaw#198146)

(cherry picked from commit 42f933c)

Release adaptation: Retain repair request and created-conversation identity in the existing 11.6 view; do not import the absent later update-notice owner or Try again UI. Scope attempts to Gateway, agent, job and revision. Baseline two lost-response cases fail; fixed full view suite24passes.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 34310341f2c59cdde1ff69bf543b731286ee6b85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant