Repository navigation
🐛 [v6] contribute: disabled_repos matches repo names by substring, so disabling one repo disables others #14707
Description
Target: v6.
Target branch:
v6only. Open the PR with--base v6.hive-open-prdefaults to the repo's default branch (v5) when--baseis omitted.v5has the same three selection call sites (contribute_sse.go:348,contribute_select.go:771,contribute_opportunistic.go:206onv5), but this issue is forv6only.
Citations:path:lineagainstv6@dd406b3e9, paths relative tosrc/.
Disabling one repo for contribution silently disables every repo whose name contains it.
What happened
Seen on a hosted hive on 2026-10-27. The hub's hub.disabled_repos held projectbluefin/dakota, an untracked repo. Then projectbluefin/dakota-iso was withheld from contributors with "Repository is disabled for contribution". Its toggle under Contribute settings → Repos for contribute showed Off, though nobody had disabled it. Removing the projectbluefin/dakota entry fixed it at once.
Cause
Every disabled-repo check runs config.MatchesAny (pkg/config/filters.go:4), which calls WildcardMatch (crux/config/agent_runtime.go:1321). A pattern with no * and not wrapped in /…/ falls through to return strings.Contains(text, pattern) (agent_runtime.go:1356). So projectbluefin/dakota matches projectbluefin/dakota-iso, and the bare-name check matches dakota inside dakota-iso too.
Server call sites, all of them MatchesAny(full, disabled) || MatchesAny(name, disabled):
pkg/dashboard/contribute_sse.go:349: ready queue and withheld reasonspkg/dashboard/contribute_select.go:771: task selectionpkg/dashboard/contribute_opportunistic.go:206: opportunistic selectionpkg/dashboard/api_contribute.go:721:GET /api/contribute/repositories
The dashboard has its own copy of the same rule, in pkg/dashboard/static/index.html:
contribRepoWildcardMatch(:47133) doestext.indexOf(pattern) >= 0for a plain entry (:47137). It has no/regex/support at all, so a regex entry is treated as a literal substring.contribRepoDisabledEntryMatches(:47153) andcontribRepoMatchingDisabledEntries(:47161) build on it.renderGovHubuses it for the toggle state (:47171). That is whydakota-isoshowed Off.toggleContribRepo(:47802) uses it to edit the list. Turningdakota-isoback On runs the filter at:47816, which also deletes theprojectbluefin/dakotaentry. Re-enabling one repo silently re-enables the other.
config.NormalizeDisabledReposForRepos (pkg/config/repo_target.go:96) already treats plain entries as exact names: it rewrites a bare name to owner/name only on an exact, case-insensitive match. Only the matching is wrong.
Fix
For repository matching, a plain entry (no *, not /…/) must equal the full name or the bare name exactly, case-insensitively. Keep * globs and /regex/ working as they do now, against both forms.
- Do not change
WildcardMatchorMatchesAny. The contribute title, label and author filters use them (pkg/config/contribute_repo_filter.go:124-153,pkg/config/filters.go:49-77), and the deny-title defaults rely on*…*substring globs. - Add a repo-specific matcher in
pkg/config, for exampleRepoMatchesAny(full, name string, patterns []string) bool, and use it at the four server call sites above. Skip empty entries: today an empty pattern matches every repo throughstrings.Contains(text, ""). - Make the same change in the dashboard: an exact, case-insensitive match for plain entries in
contribRepoDisabledEntryMatches. Add/regex/support there (new RegExp(body, 'i')in atry, no match on a bad regex) so the toggle agrees with the server. - In
toggleContribRepo, treat a/regex/blocker like a*blocker (:47809-47815): show the toast and do not delete it. TestGovernorHubReposUseCanonicalDisabledRepoMatching(pkg/dashboard/contribute_bugs_rest_test.go:222) pins some of these lines as text markers. Update the markers that change.
Acceptance criteria
- With
disabled_repos: [projectbluefin/dakota], onlyprojectbluefin/dakotais disabled.projectbluefin/dakota-isois not. The same holds for the bare entrydakota. projectbluefin/dakota*still disables both./^projectbluefin\/dakota$/still disables onlyprojectbluefin/dakota.- Matching is case-insensitive:
ProjectBluefin/Dakotadisablesprojectbluefin/dakota. - Repos for contribute shows the right state for repos whose names share a prefix. Turning one of them on leaves the other's entry in place.
- The contribute title, label and author filters behave exactly as before.
Test plan
- A table test for the new matcher: exact full name, exact bare name, prefix-sharing names (
dakotavsdakota-iso, both forms), a glob, a regex, case differences, and an empty entry. - A ready-queue test (the
contribute_sse.gopath) where the disabled entry is a prefix of another tracked repo. The longer-named repo must still serve work, and the disabled one must be withheld withdisabled_repo. - A node test running the shipped
contribRepoDisabledEntryMatchesandtoggleContribRepo, through the existingjsFunchelper as inhive_advice_readable_test.go. It covers the toggle state fordakotavsdakota-iso, a regex entry, and that turningdakota-isoon keeps theprojectbluefin/dakotaentry. - Run
go test ./pkg/config/... ./pkg/dashboard/....
Out of scope
- The semantics of the title, label and author filters.
NormalizeDisabledReposForRepos.- The same bug on
v5.
Activity
hivecommons-hive commentedon Oct 27, 2026
🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 27, 2026
🔓 Claim by @Karibhou released (lease revoked).
hivecommons-hive commentedon Oct 27, 2026
PR #14716 covers this issue: #14716
GitHub only shows its linked-PR icon for closing-keyword PRs that target the repository default branch; this PR targets
v6, so Hive cannot make GitHub display that icon for this issue.🐛 contribute: match disabled_repos entries by exact repo name
github-actions commentedon Oct 28, 2026
@Danathar this issue was closed by @hivecommons-hive[bot] as completed.
If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.
If you are still seeing the problem, comment
/reopenand it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.hivecommons-hive commentedon Oct 28, 2026
Verified resolved by #14716 (merged into v6): PR adds RepoMatchesAny() for exact repo name matching and applies it to all disabled_repos checks, so plain entries now equal the full or bare name exactly (case-insensitive), preventing substring matches. Closing.
🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88