Skip to content

fix(gate): count qualified cross-repository issue references as competing work - #93

Open
betterkite wants to merge 1 commit into
tiammomo:mainfrom
betterkite:betterkite/gate/competing-cross-repo-refs
Open

fix(gate): count qualified cross-repository issue references as competing work#93
betterkite wants to merge 1 commit into
tiammomo:mainfrom
betterkite:betterkite/gate/competing-cross-repo-refs

Conversation

@betterkite

Copy link
Copy Markdown

Closes #92

Treat qualified owner/name#N issue references as competing work when the qualifier matches the target repository


The competing-work scan only matched bare #N references, but GitHub also auto-links qualified owner/name#N references, so PR #5045 in bytedance/deer-flow passed the gate for issue #5043 despite targeting it (Closes #92). The fix adds a qualified reference pattern whose qualifier must equal the target repository full_name case-insensitively, ignores qualifiers pointing at other repositories and URL fragments such as #issuecomment-1, and de-duplicates bare and qualified references to the same issue within one pull request. Six regression tests cover the deer-flow miss, other-repo qualifiers, case-insensitive matching, deduplication, and URL fragments. Local checks: full unittest suite (381 tests; the only 3 failures are the pre-existing macOS /private/var path failures that also fail on clean main), ruff check, ruff format --check, and CLI smoke all pass. Container verification runs the full unittest suite and the focused regression class without network. Change is limited to src/reposteward/github.py and tests/test_github.py. Authored with coding-agent assistance and human-reviewed before publication.

Verified with uv run --no-sync python -m unittest discover -s tests, uv run --no-sync python -m unittest tests.test_github.GitHubCompetingWorkTests -v.

Areas for careful review:

  • No known behavior changes outside the reported bug.

Implementation assistance: an external coding workspace was used to prepare the change and its
tests. betterkite reviewed the final diff, understands it, and takes responsibility
for this contribution.

…ting work

The competing-work scan only matched bare "#N" references, but GitHub
also auto-links qualified "owner/name#N" references. A PR whose body says
"Fixes bytedance/deer-flow#5043" therefore passed the competing-work gate
even though an open PR for the same issue existed (deer-flow #5043/#5045).

Match qualified references whose qualifier equals the target repository
(case-insensitively), ignore qualifiers pointing at other repositories and
URL fragments such as "#issuecomment-1", and de-duplicate bare and
qualified references to the same issue within one pull request.

Add regression tests covering the deer-flow miss, other-repo qualifiers,
case-insensitive matching, deduplication, and URL fragments.

Closes tiammomo#92

Signed-off-by: betterkite <1240167669@qq.com>
@betterkite
betterkite marked this pull request as ready for review August 31, 2026 05:36
@betterkite
betterkite requested a review from tiammomo as a code owner August 31, 2026 05:36

@tiammomo tiammomo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed dd413d65b6b68ba8330f2e23759d29129d083521. This is a useful, focused fix for #92: matching the full repository qualifier case-insensitively closes the reported gap, preserves the existing own-PR filtering, and deduplicates each PR's references without combining different issue numbers. I found no blocking code issues in the two-file diff.

I also tested an unpublished merge of this head with current main e555d77d3001f16d2fb52951f21de00f50fff5dc. It merges without conflicts. The hardened verifier passed all 544 tests (including the five added regressions and MCP tests), the 33-test GitHub module suite, Ruff lint and format checks, CLI smoke, and the package build. Dependency bootstrap had network access; tests and checks ran without network or GitHub credentials. This integration result is local evidence and does not replace the required GitHub check.

The current branch is behind, and main requires branches to be up to date for the quality check. Please update the PR branch with current main and let that required check run on the updated head before merging. My code-review recommendation is to accept this fix, subject to reviewing any changes introduced by that update.

One non-blocking documentation correction: the PR body says six new regression tests, while the diff adds five test methods.

This maintainer review was prepared with coding-agent assistance.

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.

竞争工作检测漏报跨仓库 Issue 引用(owner/repo#N 写法)

2 participants