Repository navigation
feat(cli): link sessions to pull requests via tool and remote check - #14315
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge All actionable findings from the previous review were addressed in Files Reviewed (5 files)
Previous Review Summary (commit f6b1535)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f6b1535)Status: 10 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Files Reviewed (18 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
marked this pull request as draft
September 19, 2026 01:18
iscekic
added a commit
that referenced
this pull request
Sep 19, 2026
iscekic
force-pushed
the
kwf/owner-link-pr-8f6b
branch
from
September 19, 2026 02:40
f6b1535 to
67543d8
Compare
iscekic
force-pushed
the
kwf/owner-link-pr-8f6b
branch
from
September 19, 2026 04:18
67543d8 to
ba08be9
Compare
iscekic
marked this pull request as ready for review
September 19, 2026 04:38
Collaborator
Author
|
This description names a scenario the proof did not capture:
A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision. |
eshurakov
approved these changes
Sep 22, 2026
This was referenced Sep 23, 2026
This was referenced Sep 27, 2026
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.
Changelog for users
link_prtool with the pull request URL.kilo pr statusperforms a fresh check on demand.Changelog for maintainers
session_pr_linkassociation the app already reads; the explicit link uses thesession_pr_linkoverride record and the check's link thesession_pr_link_recordedrecord.resolvePrLinkreads the override before detection and maps a clear to the null triple that updates the app row.remote.<name>.urlconfig, so aurl.*.insteadOfrewrite cannot hide the host.check-opencode-promise-facadesallowlist count forkilocode/kilo-sessions.test.tsrises from 44 to 46; risky areas to look at first are the host-query bounds and theclearPolledPrLinkguards in the poller.E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e1-link.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e2-link.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e3-github.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e4-gitlab.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e5-bitbucket.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e6-closed-clears.log/home/igor_kilocode_ai/.local/share/kwf/sections/owner-link-pr-8f6b/e2e-cli/e7-remote-failure-keeps.logOwner request
Follow-ups (not changed here)
link_prrejects a URL that is not a pull request (non-retryable unhappy): have the agent calllink_prwithnot-a-url; the tool result saysis not a pull request URL, names the accepted hosts, andkilo pr statusstill printsno PR linked(no capture cited it)#12, deleterefs/pull/12/headin the fixture bare repo (keep the branch) and runkilo pr statusagain; it printsno PR linked. (no capture cited it)#12, rewrite the origin to an unreachable path (git config url./nonexistent/repo.git.insteadOf https://github.com/owner/repo.git) sogit ls-remotefails;kilo pr statusstill printsDetected PR #12 (github). (no capture cited it)link_prtool links the session (happy): in the GitHub worktree from the first scenario,kilo pr link https://github.com/cli/cli/pull/7thenkilo pr statusprintsLinked PR #7 (github)although the detected PR differs; then start a session in the same worktree, have the agent calllink_prwithhttps://github.com/cli/cli/pull/7, and quote the tool resultLinked github pull request #7(no capture cited it)refs/pull/12/headat the branch head;kilo pr link https://github.com/owner/repo/pull/7thenkilo pr statusprintsLinked PR #7 (github), not Found some more mentions #12. (no capture cited it)git init, one commit,git remote add origin https://github.com/owner/repo.git), run a session with the section's cheap model and prompt the agent to call thelink_prtool with urlhttps://github.com/owner/repo/pull/7; thenpr statusfrom that worktree printsLinked PR #7 (github)followed by the URL. (no capture cited it)link_prwith urlnot-a-url; the tool result says the argument is not a pull request URL andpr statusstill printsno PR linked(nothing was written). (no capture cited it)kilo pr statusprintsno PR linked. (no capture cited it)curl -s 'https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests?state=OPEN&pagelen=1'and read the first PR'ssource.branch.nameandid; in a temp worktree whose origin ishttps://bitbucket.org/<workspace>/<repo>.gitand whose branch is that name,kilo pr statusprintsDetected PR #<id> (bitbucket)(no capture cited it)gh pr list --repo cli/cli --state open --limit 20 --json number,headRefName,headRepositoryOwner,url, keep a PR whoseheadRepositoryOwner.loginiscli; in a temp worktree (git init, one commit,git remote add origin https://github.com/cli/cli.git,git checkout -b <headRefName>) runkilo pr statusand quoteDetected PR #<n> (github); run it again withGH_TOKEN=invalid-token(the gh call fails -> inconclusive) and the sameDetected PR #<n> (github)line still prints; thengit checkout -b kilo-pr-noneand run again:no PR linked(no capture cited it)curl -s 'https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/merge_requests?state=opened&per_page=1'and readsource_branchandiid; in a temp worktree whose origin ishttps://gitlab.com/gitlab-org/gitlab.gitand whose branch is thatsource_branch,kilo pr statusprintsDetected PR #<iid> (gitlab)via the/api/v4REST path, nevergit ls-remote(no capture cited it)refs/pull-requests/3/fromat the branch head;kilo pr statusprintsDetected PR #3 (bitbucket)and a URL ending/pull-requests/3. (no capture cited it)E2E proof — log excerpts
E2E proof — log excerpts