Skip to content

✨ hub: v1 registration discovery and configurable repo cap (1/3) - #18892

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
feat/18642-hub-v1-discovery-cap
Nov 18, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
feat/18642-hub-v1-discovery-cap

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Refs #18642

Rollout step 1, PR A of 3 (A: discovery and cap, B: per-repo proofs, revision, create/list/delete/rotate, C: PATCH). Ported from hanthor's prototype (tuna-os#189); his authorship is kept via a Co-authored-by trailer and his Signed-off-by, as the commits are re-created in slices on v5.

All behind HIVE_HUB_SELFSERVICE_REGISTRATION.

  • GET /api/hub/v1: public discovery (versions, operations, limits max_repos/max_per_user/expiry/key_rotation_overlap, proof methods advertised as hub-session-token). Lists only operations that exist in this PR; later PRs add theirs.
  • HIVE_HUB_SELFSERVICE_MAX_REPOS: default 20, clamped to 500, replaces the selfServiceMaxRepos const. Legacy create keeps its 400 body. The request body limit scales with the cap.
  • Docs: env-vars.md, hub-deployment.md, api-reference; changelog fragment.

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

Tests: discovery shape, flag-off 404, cap default and clamp, legacy 400 body, route registered (helper and real hub mux).

🤖 Generated with Claude Code

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

- GET /api/hub/v1 discovery: protocol version, operations, limits
  (max_repos, max_per_user, expiry, key_rotation_overlap) and the proof
  method the hub actually offers, hub-session-token. Readable without
  signing in.
- HIVE_HUB_SELFSERVICE_MAX_REPOS makes the per-registration repo cap
  configurable (default 20, clamped to 500). The legacy create keeps its
  400 body; the request body limit scales with the cap.

Everything is 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels 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
#18888 ✨ Customers list: GitHub avatars, tag pills and one-line rows same files src/docs/env-vars.md

@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

@kubestellar-prow
kubestellar-prow Bot merged commit 095dde4 into v5 Nov 18, 2026
103 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/18642-hub-v1-discovery-cap branch November 18, 2026 04:40
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 1 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/hub/selfservice_v1_api.go 66 CONDITIONALS_NEGATION

Verdict: lived (#17349).

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant