Skip to content

πŸ› fix: qualify bare project repos when deriving the public repo set - #16238

Merged
clubanderson merged 3 commits into
v5from
fix-public-repos-bare-names
Nov 2, 2026
Merged

clubanderson merged 3 commits into
v5from
fix-public-repos-bare-names

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #16234

Root cause

config.Load strips the org off project.repos / primary_repo (live hive config: repos: [crux, dibs, hive, …], primary_repo: ""). registryPublicRepos added those bare names via publicRepoSet.add, which requires owner/name, so a public hive's derived public set was empty. HubActivitySnapshot then marked every tracker row Private, hubactivity.Build dropped them, and the hub's anonymous /activity/public (the fleet stream) showed 0 items for every reporting hive.

Fix

Qualify bare names with project.org in registryPublicRepos (names that already carry an owner are untouched). The existing HubActivityItemsReadsTheMemoisedTracker test now uses the bare-name shape config loading actually produces, and TestRegistryPublicReposDerivedFromPublicHive covers bare / qualified / no-org cases.

Validation

go test ./pkg/dashboard/ -run 'TestRegistryPublicRepos|TestHubActivity|TestBattleLogAndHiveOfWeek', go vet ./pkg/dashboard/.

config.Load strips the org off project.repos and primary_repo, but
registryPublicRepos added the bare names through publicRepoSet.add,
which only accepts owner/name. A public hive therefore derived an
empty public set, HubActivitySnapshot marked every tracker row
Private, hubactivity.Build dropped them, and the hub's anonymous
/activity/public view showed 0 items for every reporting hive.

Qualify bare names with project.org (names that already carry an
owner are left alone) and exercise the bare-name shape in tests.

Closes #16234

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 2, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read registryPublicRepos/publicRepoSet.add in src/pkg/dashboard/battle_log.go and the config loader at this head. The premise holds: src/pkg/config/config.go:5911 and :5914 store parts[1] for repos and primary_repo, so a public hive's live values really are bare names and add (owner/name only) was dropping all of them. qualifyProjectRepo leaves already-qualified and empty-org inputs alone, and the new table case plus the hub_activity_test.go fixture now use the bare shape the loader actually produces. Looks correct to me.

Note for whoever merges: #16239 fixes the same root cause (bare slug from config) at a different site (sentinel_sweep.go observer β†’ Matrix allowlist). They touch disjoint files and are complementary, not duplicates β€” both should land.

Optional, not blocking: the dashboard already has this exact qualify-if-no-slash pattern inline at api_contribute.go:757-762, api_config.go:24, api.go:1429 and api_event_triggers.go:36; a later cleanup could point them at qualifyProjectRepo.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Verified the premise rather than taking it from the body: src/pkg/config/config.go:5903-5914 (applyBootstrapEnv) stores parts[1] of HIVE_REPO β€” the bare name β€” into both Project.Repos and Project.PrimaryRepo, so a live spoke really does hand registryPublicRepos bare names, and publicRepoSet.add (owner/name only) dropped all of them. qualifyProjectRepo at battle_log.go:542 leaves names that already carry an owner alone and returns the bare name unchanged when org is empty, where add still rejects it β€” the new test asserts both. Looks correct to me.

Note for the maintainer: #16239 fixes the same root cause on the sentinel side (sentinel_sweep.go), different files, no overlap β€” they are complementary, not duplicates, and can land in either order.

@clubanderson
clubanderson merged commit 8664848 into v5 Nov 2, 2026
79 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix-public-repos-bare-names branch November 2, 2026 16:15
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› Hub public activity view shows 0 items: spoke marks every project repo private because registryPublicRepos gets bare repo names

1 participant