Skip to content

✨ hub: v1 registration resources, per-repo proofs and revision (2/3) - #18896

Merged
kubestellar-prow[bot] merged 2 commits into
v5from
feat/18642-hub-v1-registrations
Nov 18, 2026
Merged

kubestellar-prow[bot] merged 2 commits into
v5from
feat/18642-hub-v1-registrations

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Refs #18642

Rollout step 1, PR B of 3 (A #18892 merged; C is PATCH). Ported from hanthor's prototype (tuna-os#189); his authorship is kept via a Co-authored-by trailer and his Signed-off-by. All behind HIVE_HUB_SELFSERVICE_REGISTRATION.

  • SelfServiceHive.RepoProofs (per-repo proof time) and Revision: additive JSON fields, old binaries ignore them, a record without a revision loads as 0. Heartbeats do not bump the revision (tested).
  • Store update() restoring key hashes, owner, ID, CreatedAt and the heartbeat stamp; rotate and revoke guarded by an ETag precondition. OwnershipCheckedAt is kept as is.
  • selfServiceRegisterCore / selfServiceProveOwnership split out of the legacy handler; tests pin the legacy /api/hub/selfservice/* responses byte for byte.
  • v1 POST/GET /registrations, GET/DELETE /registrations/{id}, POST .../keys: strong ETag on records, optional If-Match on delete and rotate, 413 with limit: max_repos on over-cap create, 201 on rotate, 400 on a grace window.
  • Discovery now lists these operations.

Note: "org is not editable" is a PATCH refusal, so it ships with PATCH in PR C (no PATCH route exists in this PR).

Not touched: heartbeat_signing.go, the credential fence, any GitHub write.

🤖 Generated with Claude Code

Rollout step 1, part B of the hub registration protocol
(#18642), ported from the tuna-os#189 prototype:

- Per-repo proof times (SelfServiceHive.RepoProofs) and a Revision
  counter. Both are additive JSON fields, so older binaries ignore them;
  a record without a revision loads as 0. Heartbeats do not bump the
  revision, so a live spoke never invalidates an operator's ETag.
- Store update() that restores the key hashes, owner, ID, CreatedAt and
  the heartbeat stamp after any mutation, plus rotate and revoke guarded
  by an ETag precondition.
- selfServiceRegisterCore and selfServiceProveOwnership split out of the
  legacy register handler. Tests pin the legacy /api/hub/selfservice/*
  responses byte for byte.
- v1 POST/GET/list/DELETE and POST .../keys: an ETag on every record,
  optional If-Match on delete and rotate, 413 with limit: max_repos over
  the repo cap, 201 on rotate, and a 400 for a caller-chosen grace window.

Behind HIVE_HUB_SELFSERVICE_REGISTRATION. No GitHub writes;
heartbeat_signing.go and the credential fence are untouched.

Co-authored-by: James Reilly <5840441+hanthor@users.noreply.github.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 18, 2026
@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

Co-authored-by: James Reilly <5840441+hanthor@users.noreply.github.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@clubanderson clubanderson added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2026
@github-actions

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.

PR Title Relation Files
#18903 ✨ Customers step E: budgeted GitHub mention search on suggestion accept same files src/docs/env-vars.md

@kubestellar-prow
kubestellar-prow Bot merged commit 7b534d0 into v5 Nov 18, 2026
93 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/18642-hub-v1-registrations branch November 18, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant