Skip to content

fix: recover scout searches after repo transfers - #20

Merged
VrtxOmega merged 1 commit into
mainfrom
fix/serious-scout-repository-redirect
Jul 30, 2026
Merged

fix: recover scout searches after repo transfers#20
VrtxOmega merged 1 commit into
mainfrom
fix/serious-scout-repository-redirect

Conversation

@VrtxOmega

Copy link
Copy Markdown
Owner

Problem

A bounded serious-scout run failed closed with GitHub 422 when a repo: qualifier used the former name of a transferred repository. The error was correct but opaque, and the operator had to discover and repair the repository identity manually.

Changes

  • on a 422 only, resolve repo: qualifiers through GitHub repository identity
  • retry the read-only issue search once only when full_name changed
  • preserve each former-to-canonical mapping in collection evidence
  • keep unresolved or unchanged 422 queries fail-closed

No GitHub write path, candidate scoring, overlap policy, or rate-limit behavior changes.

Validation

  • RED transferred-repository regression failed before the fix and passes afterward
  • unchanged-identity 422 control proves no second search occurs
  • live GitHub proof resolved invariantlabs-ai/mcp-scan to snyk/agent-scan
  • npm run ci:gates — 281/281 tests, 77/77 benchmark cases, 29/29 hostile cases, maintainer demo PASS
  • git diff --check

AI assistance

Codex assisted with reproduction, the focused implementation, regression tests, and verification. I reviewed the exact diff and command outputs before submission.

@VrtxOmega
VrtxOmega merged commit f12b0e8 into main Jul 30, 2026
1 check passed
@VrtxOmega
VrtxOmega deleted the fix/serious-scout-repository-redirect branch July 30, 2026 03:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: efa981f7ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/github/client.mjs

async function resolveSearchRepositoryQualifiers({ query, installationId, signal }) {
const repositories = [...new Set(
[...String(query || "").matchAll(/(?:^|\s)repo:([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+)(?=\s|$)/g)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match repository qualifiers case-insensitively

When a query uses a valid mixed-case qualifier such as Repo:old-owner/old-repo, the initial search can still return 422, but this case-sensitive matcher finds no repositories, so resolution.query remains unchanged and the transfer recovery immediately rethrows the error. Since normalizeOpenIssueSearchQuery preserves qualifier spelling and already treats qualifiers case-insensitively, make both the extraction and replacement regexes case-insensitive so these queries receive the canonical-name retry.

Useful? React with 👍 / 👎.

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.

1 participant