Skip to content

feat(registration): create Gittensory self-dogfood registration pack#388

Open
kiannidev wants to merge 9 commits into
JSONbored:mainfrom
kiannidev:feat/issue-117-self-dogfood-registration-pack
Open

feat(registration): create Gittensory self-dogfood registration pack#388
kiannidev wants to merge 9 commits into
JSONbored:mainfrom
kiannidev:feat/issue-117-self-dogfood-registration-pack

Conversation

@kiannidev
Copy link
Copy Markdown
Contributor

Fixes #117

Summary

  • Adds a private self-dogfood registration pack for the Gittensory repo (JSONbored/gittensory by default, overridable via GITTENSORY_DRIFT_ISSUE_REPO).
  • Composes existing buildRegistrationReadiness and buildGittensorConfigRecommendation into one maintainer-facing report with direct-PR-first posture, separated maintainer-economics vs miner-scoreability notes, and actionable areas (labels, maintainer cut, tests/docs, queue, GitHub App).
  • Exposes GET /v1/app/self-dogfood/registration-pack (maintainer/owner/operator) and GET /v1/repos/{owner}/{repo}/self-dogfood-registration-pack (self-dogfood repo only).

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

Verified locally with npm run test:ci on Node v24.15.0 (repo requires Node >= 22 per .nvmrc).

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

New tests: test/unit/self-dogfood-registration-pack.test.ts — ready, not-ready, issue-discovery disabled, maintainer-cut, and public wording regression fixtures.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • Pack is privateOnly / advisoryOnly; no public scoring or autonomous PR behavior.
  • Visible UI changes include screenshots or a short recording (API-only; no UI surface in this PR).

Notes

  • Parent roadmap: roadmap: beta-grade Gittensory base agent v2 #82. Rerun the pack after registry, .gittensor.yml, label policy, GitHub App, or queue changes.
  • Reuses existing registration-readiness signals; does not add ranking, strategy rendering, or public GitHub comments.

Compose registration readiness and config recommendations into a private,
rerunnable maintainer report for the Gittensory repo with direct-PR-first
guidance and actionable readiness areas.

Fixes JSONbored#117
@kiannidev kiannidev requested a review from JSONbored as a code owner June 4, 2026 19:31
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 4, 2026
@github-actions github-actions Bot added the feature New feature or request label Jun 4, 2026
Copy link
Copy Markdown
Owner

@JSONbored JSONbored left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiannidev this is close, but there is a real auth blocker.

A few notes:

  • The app-scoped route correctly uses the app-role authorization check.
  • The repo-scoped route for the same self-dogfood registration pack does not apply that role check before returning the private/advisory response.
  • This surface should not expose maintainer registration context to unauthenticated or unauthorized callers.

Required changes:

  • Add the same maintainer/owner/operator authorization guard to the repo-scoped self-dogfood registration-pack route.
  • Add regression coverage for unauthenticated and unauthorized access on that route.
  • Keep the OpenAPI/contract behavior aligned with the protected route.

Validation expected:

  • Rerun the route tests and OpenAPI check touched by this PR.

kiannidev added 2 commits June 5, 2026 15:18
Add maintainer/owner/operator auth to the repo-scoped registration-pack
route, regression tests for unauthorized access, and merge upstream main
including onboarding-pack preview.
@gittensory
Copy link
Copy Markdown

gittensory Bot commented Jun 5, 2026

Important

Gittensory found maintainer review notes

Scoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker.

Readiness score: 75/100

Signal Result Evidence Action
Linked issue ✅ Linked #117 No action.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden. Review top overlaps.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:L. Add scope summary.
Validation evidence ✅ 25/25 PR body includes validation/test evidence. No action.
Open PR queue ❌ 3/10 17 open PR(s), 15 likely reviewable. Expect slower review.
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 119 PR(s), 32 issue(s). No action.
Gate result ✅ Passing No configured blocker found. No action.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Review context
Maintainer notes
  • Possible duplicate or overlapping work: 82 related open work cluster(s) were detected.
Contributor next steps
  • Review top overlaps.
  • Add scope summary.
  • Expect slower review.
  • Check active issues and PRs before submitting.
  • Re-run Gittensory review

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. Learn more about Gittensor contribution workflows.

@gittensory gittensory Bot added the gittensory:reviewed Gittensor contributor context label Jun 5, 2026
@kiannidev
Copy link
Copy Markdown
Contributor Author

kiannidev commented Jun 5, 2026

@JSONbored Pushed the auth fix and merged latest main (resolved fork divergence with your earlier main merge).

Changes

  • Added requireAppRole(["maintainer", "owner", "operator"]) to GET /v1/repos/{owner}/{repo}/self-dogfood-registration-pack before returning the private/advisory pack.
  • Regression tests in test/unit/routes-self-dogfood-registration-pack.test.ts for unauthenticated (401), unauthorized session (403 insufficient_role), and wrong-repo (403 self_dogfood_repo_only).
  • Merged upstream main; kept both self-dogfood registration pack and onboarding-pack preview routes.
  • OpenAPI updated; npm run ui:openapi:check passes.

Validation

  • test/unit/routes-self-dogfood-registration-pack.test.ts
  • test/unit/self-dogfood-registration-pack.test.ts
  • npm run ui:openapi:check

Ready for another look when you have a moment.

check result:
image

Cover issue-discovery-enabled, actionable-area branches, and invalid
drift-repo fallback so global branch coverage stays at or above 97%.
@kiannidev kiannidev force-pushed the feat/issue-117-self-dogfood-registration-pack branch from ba42156 to 0a05e99 Compare June 5, 2026 13:31
Use a full QueueHealth signals object in the self-dogfood registration
pack fixture so typecheck passes in CI.
Signed-off-by: kpdev <156195510+kiannidev@users.noreply.github.com>
@github-actions github-actions Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue label Jun 6, 2026
kiannidev and others added 2 commits June 6, 2026 02:34
…SONbored#388

Add missing gate-mode settings to self-dogfood tests after main merge, and
cover quiet public-surface plus unsafe publicNotes policy paths to clear the
97% branch coverage gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate apps/gittensory-ui/public/openapi.json from the current API
schema so the UI check step passes on PR JSONbored#388.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request gittensor:feature Gittensor-scored feature linked to a feature issue gittensory:reviewed Gittensor contributor context size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

feat(registration): create Gittensory self-dogfood registration pack

2 participants