Skip to content

πŸ› fix: give the sentinel patch observer the full owner/name repo - #16239

Merged
clubanderson merged 1 commit into
v5from
fix-matrix-obs-full-repo
Nov 2, 2026
Merged

clubanderson merged 1 commit into
v5from
fix-matrix-obs-full-repo

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #16235

Root cause

SweepSentinel iterates c.getRepos() β€” the configured slugs, which are bare names ("hive", as the sentinel logs show) once config loading strips the org β€” and passed that slug as SentinelPatchObservation.Repo. matrixSource.admits β†’ MatrixConfig.RepoAllowed(obs.Repo) does an exact match against owner/name entries, so "hive" never matched "hivecommons/hive" and every observation was dropped; /api/matrix/lines stayed {"seq":0,"lines":[]} even after a hive-authored push (#16201 at 14:59Z). The bare slug also made sentinelRepoPrivate fall back to "treat as private" when the PR payload lacked base.repo.private.

Fix

observeSentinelPatch takes the owner/name the sweep already split out and reports owner/name; the privacy fallback uses the same pair. New TestSentinelPatchObserverQualifiesBareRepoSlug configures the client with a bare r slug and fails without the fix.

Validation

go test ./pkg/github/ -run Sentinel, go vet ./pkg/github/.

SweepSentinel iterates the configured slugs, which are bare names
("hive") once config loading strips the org, and passed that slug as
the observation's Repo. matrixSource.admits compares it with
MatrixConfig.RepoAllowed against owner/name entries, so no observation
ever matched and /api/matrix/lines stayed empty. The bare slug also made
sentinelRepoPrivate fall back to "treat as private" whenever the PR
payload lacked base.repo.private.

Build the observation from the owner and name the sweep already split
out, and cover the bare-slug configuration in the observer tests.

Closes #16235

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 nicholasjackson 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 trySentinelPR, observeSentinelPatch and sentinelRepoPrivate in src/pkg/github/sentinel_sweep.go and splitRepo at client.go:1804-1809 at this head. Before this change a bare configured slug (config.go:5911 stores parts[1]) hit two failures at once: strings.Cut(displayRepo, "/") at the old :103 failed, so sentinelRepoPrivate returned true and every observation was marked private, and Repo carried the bare name that the owner/name allowlist could never match. Passing owner, repo (already derived via splitRepo, which falls back to c.org) fixes both, and the new test asserts both Repo == "o/r" and !Private. Looks correct to me.

Related, not duplicate: #16238 fixes the same bare-slug root cause in the dashboard's public-repo set; disjoint files, both should land.

β€” 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):

Followed owner/repo back to the call site: sentinelEvaluatePR β†’ trySentinelPR (sentinel_sweep.go:453, :479) receives them from Client.splitRepo (client.go:1804), which falls back to c.org for a bare slug, so owner+"/"+name at the new observeSentinelPatch is always fully qualified where displayRepo was not. sentinelRepoPrivate keeps the same fallback semantics (empty owner/name β†’ private) without re-splitting. The bare-slug premise itself is real: config.go:5903-5914 stores HIVE_REPO's parts[1] into Project.Repos. Looks correct to me.

Sibling of #16238 (dashboard public-repo set); different files, complementary, not a duplicate.

@clubanderson
clubanderson merged commit af50351 into v5 Nov 2, 2026
69 of 74 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix-matrix-obs-full-repo branch November 2, 2026 16:11
@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.

πŸ› Matrix stream never admits a line: sentinel PatchObserver reports the bare repo slug, so dashboard.matrix.repos never matches

1 participant