Skip to content

refactor(vscode): share question resolution routing - #13739

Merged
marius-kilocode merged 1 commit into
mainfrom
dedupe-question-resolution
Sep 3, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
dedupe-question-resolution

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Question reply and reject handlers duplicate origin-directory routing, recovery, one-time retry, route cleanup, and error signaling. Separate implementations can drift when one path changes.

Why This Change Was Made

Extract one private question-only resolution helper with an endpoint callback and operation label. Keep the public signatures, operation-specific logs, and existing recovery scan unchanged. Retry only when recovery finds a different directory. An incomplete scan must not prove staleness; stale requests still return false, and failures remain retryable. Permission handling stays separate because its save-always-rules ordering and stale/error behavior differ.

User Impact

No intended behavior change. Replies and dismissals retain their original session and request-directory routing. The change removes 15 production lines and 10 total lines, including a small same-directory recovery regression case.

Evidence

  • 80 focused question and adjacent recovery/UI-contract tests pass.
  • Extension and webview typecheck, lint, knip, and bundles pass after rebasing onto current main.
  • Duplication reports before and after retain 21 pairs, 404 duplicated lines, and 2,758 duplicated tokens. This semantic duplicate is below the scanner threshold; the scanner and allowlist are unchanged. The duplication gate passes.
  • All 115 open PRs were checked during the initial audit, with relevant adjacent patches reviewed; none overlapped this extraction.
  • Real UI routing was not exercised: no ready deterministic pending-question fixture exists, and the self-test profile inherits Kilo storage and credentials. No self-test instance was started.

Manual verification: reply to and dismiss worktree questions after switching sessions; verify the correct session continues. Stale questions should clear, while temporary failures must leave questions available for retry.

@kilo-code-bot

kilo-code-bot Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/kilo-vscode/src/kilo-provider/handlers/question.ts
  • packages/kilo-vscode/tests/unit/question-handler.test.ts

Reviewed by grok-4.6 · Input: 143K · Output: 6.5K · Cached: 201.7K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit c0e1831 into main Sep 3, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the dedupe-question-resolution branch September 3, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants