Repository navigation
π fix: give the sentinel patch observer the full owner/name repo - #16239
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
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
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Followed Sibling of #16238 (dashboard public-repo set); different files, complementary, not a duplicate. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #16235
Root cause
SweepSentineliteratesc.getRepos()β the configured slugs, which are bare names ("hive", as the sentinel logs show) once config loading strips the org β and passed that slug asSentinelPatchObservation.Repo.matrixSource.admitsβMatrixConfig.RepoAllowed(obs.Repo)does an exact match againstowner/nameentries, so"hive"never matched"hivecommons/hive"and every observation was dropped;/api/matrix/linesstayed{"seq":0,"lines":[]}even after a hive-authored push (#16201 at 14:59Z). The bare slug also madesentinelRepoPrivatefall back to "treat as private" when the PR payload lackedbase.repo.private.Fix
observeSentinelPatchtakes theowner/namethe sweep already split out and reportsowner/name; the privacy fallback uses the same pair. NewTestSentinelPatchObserverQualifiesBareRepoSlugconfigures the client with a barerslug and fails without the fix.Validation
go test ./pkg/github/ -run Sentinel,go vet ./pkg/github/.