Repository navigation
Conversation
Gate sync-repos separately, retain proofs for active repos, and persist new requests separately until the owner proves them. Hive-Run: hivecommons#19236 Hive-Plan: Hub registration protocol rollout hivecommons#19056 step 4 Hive-Spec: RFC-18642#3-hive-to-hub-record-sync Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.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 |
There was a problem hiding this comment.
Correctness review (head d65cd25): one in-scope issue; see the inline thread on selfservice_v1_sync.go:161. Requested change: reject with 400 when no requested repo is already active, so the registration keeps at least one active repo, and add a test for an all-new request.
-- hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.328
| pending = append(pending, repo) | ||
| } | ||
| } | ||
| h.Repos = active |
There was a problem hiding this comment.
A nonempty request made only of new repos leaves h.Repos empty (all go to pending). Owner PATCH refuses a list that leaves no repo (400), and server.go:4100 treats a repo-less hive as a placeholder. Suggested fix:
| h.Repos = active | |
| if len(active) == 0 { | |
| return hubV1Refuse(http.StatusBadRequest, "sync-repos must keep at least one already-proven repo active") | |
| } | |
| h.Repos = active |
Please add a test for an all-new request.
There was a problem hiding this comment.
Fixed in 2df1a6da80: sync-repos now returns 400 for an all-new list without changing the registration or its ETag. The API docs and changelog describe the rule, and go test ./pkg/hub -run "^TestHubV1SyncRepos" -count=1 passed. The previous head’s coverage check failed because the agent shard failed two kick lifecycle tests, not because of Hub coverage.
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Decision needed (credentials and CI trust surface). The sync logic itself reads sound to me, but two things need a person.
Open question (not verified): the lane is selected by token shape before the flag is checked, so with the flag off a hub bearer that happens to be 43 chars of valid base64url would get 404 from the sync handler instead of falling through to Mismatch with CI: I have not closed or approved anything. Review findings from Routing to a maintainer: this carries What I verified in the diff:
The PR body claims match the diff (flag off by default, no identity/dashboard edits, ETag required). Tests cover the flag, foreign/missing IDs, forbidden fields and ETag refusals. I have not approved or merged anything. Findings not on a changed line
stage 095-pre-merge-soak → 060-reviewed: untrusted-author-role Ready for a human merge: verdict approved The hive never approves on your behalf: hive/awaiting-ci: held for human review. Green CI will not merge this on its own; it merges after a maintainer reviews it and removes hold. build-go failed with 🐝 Hive Agent: |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
/ok-to-test |
|
@hivecommons-hive[bot]: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
needs-human: Prow has not run this fork PR's presubmits. Its author is not one of Prow's trusted users, so the trigger plugin waits for A maintainer can comment |
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity. |
|
Scanner triage at 9b8c7a0: the failing shard is 🐝 Hive Agent: |
Reject an all-new repo list without changing the registration. Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
There was a problem hiding this comment.
Decision needed: @clubanderson should a registration key (not a hub session) be allowed to rewrite its own registration's repo list through the new auth lane in routeHubV1Patch?
The change matches #19236 as written (own registration only, pending_proof for unproven repos, flag off by default, no GitHub calls), and I found no defect in the diff I read. It does add a new credential path on the hub, so a person should sign off.
What I verified:
selfservice_v1_sync.gorouteHubV1Patchpicks the lane from the bearer's shape (a 32-byte base64url value), and authority comes only frommatchesKeyagainst the addressed record, checked under the store lock. A wrongly routed hub-session token would get 404 rather than gain access.- Only
opandreposare accepted, at least one already-proven repo must remain active, and unproven repos land inPendingProof, which does not grant registry visibility. The owner's existing PATCH clears them by proving them. - The old overlap key also passes
matchesKey, so a rotated-out key can sync during the grace window. That seems intended, but it is worth a conscious yes.
Open questions (not verified as defects):
- A registration key is a long-lived heartbeat secret on the spoke. With this flag on, its compromise also lets an attacker drop active repos from the registry, not just spoof heartbeats.
- The label
conflicts-with-open-pris set; I did not identify which PR.
Suggestion only: the new tests cover flag gating and foreign IDs, and a test that a hub-session bearer still reaches the ordinary PATCH would pin the routing split.
-- hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.328
|
Needs a decision, not a merge:
Head: verdict requires_human @2df1a6d, 18/58 checks green, 40 pending, DCO yes, soak 0s of 10m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
scanner: 🐝 Hive Agent: |
|
hive/awaiting-ci: the red 🐝 Hive Agent: |
|
scanner: the failing 🐝 Hive Agent: |
|
hive/scanner: the failing test (hub 4/4) shard died on infrastructure (go mod download TLS 'bad record MAC', then fetch-pack error), not on this diff. Coverage fails only because that shard did not run. Nothing to change in the code; a maintainer re-run of the shard should clear it. 🐝 Hive Agent: |
The runner can hit a transient Go proxy failure after the main module download succeeds, because the pinned tool resolves its own dependencies. Retry the tool install with bounded backoff and preserve its final error. Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
374fc45
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether a registration bearer key may mutate its own repo list (opt-in via HIVE_HUB_SELFSERVICE_SYNC_REPOS), and whether the unrelated CI installer change should ride in this PR or be split out?
Routing to a human: this PR carries sentinel-alert and touches two trust surfaces, so I am not judging it merge-ready. I found no defect in the sync logic itself.
Facts from the diff at 374fc45:
- New credential path.
routeHubV1Patch(src/pkg/hub/selfservice_v1_sync.go) sends a bearer shaped like a registration key (43-char strict base64url) straight tohandleHubV1SyncRepos, bypassingrequireAuth, where the old doc said "a registration key is not accepted" on this route. Mitigations I verified: it is off unlessHIVE_HUB_SELFSERVICE_SYNC_REPOSis set; the key is checked viamatchesKeyunder the store lock before the ETag is revealed; the body is limited toopandrepos; new repos land inPendingProofand do not become active; at least one already-proven repo must remain; a CSRF/non-browser check applies. Whether a leaked heartbeat key should be allowed to drop or reshape the repo list is the policy call. - Unrelated workflow change.
.github/workflows/v2-tests.yml(fiveInstall gotestsumsteps) and the new.github/scripts/ci-install-gotestsum.shreplace an inline step with a retry script. It is unrelated to #19236 and touches CI, which needs its own owner sign-off. Splitting it out is the smaller, safer change. - Overlap. The
conflicts-with-open-prlabel is set; I did not compare it against the other open PR.
Suggestion, not a defect: the PR has route tests, but none that I saw for a bearer of a rotated-out key inside the overlap window versus after it expires.
-- hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.328
|
@Karibhou the hive has adopted this PR ( |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
HUMAN DECISION NEEDED - whether the bundled .github/workflows/v2-tests.yml + .github/scripts/ci-install-gotestsum.sh change may ship in this feature PR. @Karibhou
Correctness delta re-review at 1d11c31 (vs 374fc45).
The 1590-line / 29-file delta looks like a merge of base-branch content: none of its files is in the PR's own 9-file list (gh pr view files: selfservice_registry.go, selfservice_v1_api.go, selfservice_v1_patch.go, selfservice_v1_sync.go, its test, docs, changelog.d fragment, plus the two CI files). selfservice_v1_sync.go and its test are untouched by the delta. I found no new correctness defect in the delta.
Previous findings at the new head:
- [intent-alignment]
.github/scripts/ci-install-gotestsum.shunrelated CI change: still present (file still ADDED, +25). - [security]
selfservice_v1_sync.goregistration key can mutate its repo list: still present, file unchanged. Issue #19236 states the key may sync its own repos, so the open question is only the pending_proof gating, not intent. - [security]
.github/workflows/v2-tests.ymlbundled workflow change: still present (+5/-20). It is not a pure permissions narrowing, so it stays a human call. Suggested fix: move both CI files to a separate PR.
I did not re-run or re-read the full sync logic at this head beyond confirming it is outside the delta; the prior head's correctness review stands.
-- hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.328
…ate stays in sync Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Superseded by hive: re-authored as #19252 with the same commits and sign-off because its commits needed a sign-off only a hive-owned branch can carry. This PR is closed; if #19252 fails, hive reopens it. The merge stays manual: the PR edits CI workflow / action files, which the lane never merges unattended; once CI is green a maintainer reviews and merges it (stage 085). |
native-queue-policy resolved the `gate` evidence to the skipped Feedback Wanted `gate` job (a pull_request `closed` run left on this head SHA when #19243 was superseded) instead of docker.yml's successful one. That is a per-head artifact; a new head SHA gets a clean check set. No source change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Closes #19236
PATCH op: sync-reposbehindHIVE_HUB_SELFSERVICE_SYNC_REPOS(off by default). The bearer can update only its own registration and cannot edit identity or dashboard fields.pending_proof, out of the active repo list. An owner can prove them through the existing owner PATCH. Spoke sync makes no GitHub calls.Verification:
gofmt -dwas clean. Added route tests for own and foreign registrations, persistence and proof promotion, forbidden fields, flag gating, and ETag handling. Go tests are left to CI per repository instructions.-- hive: backend=omp model=openai-codex/gpt-6.2-sol