From 503173c4e7ffce7e4f45d12d8105548f9c5341c3 Mon Sep 17 00:00:00 2001
From: JSONbored <49853598+JSONbored@users.noreply.github.com>
Date: Sat, 6 Jun 2026 23:20:30 -0700
Subject: [PATCH] fix(signals): stabilize pr queue readiness
---
README.md | 2 +-
apps/gittensory-ui/public/openapi.json | 11 +++
.../src/routes/docs.beta-onboarding.tsx | 6 +-
.../src/routes/docs.github-app.tsx | 77 +++++++++++++++++--
.../src/routes/docs.maintainer-workflow.tsx | 7 +-
src/openapi/schemas.ts | 2 +
src/signals/engine.ts | 57 +++++++++++---
test/unit/docs-github-app.test.ts | 32 ++++++++
test/unit/signals-coverage.test.ts | 52 ++++++++++++-
test/unit/signals-v2.test.ts | 6 +-
10 files changed, 231 insertions(+), 21 deletions(-)
create mode 100644 test/unit/docs-github-app.test.ts
diff --git a/README.md b/README.md
index f967c660b3..baf04774d4 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ It is not a Gittensor explorer, public leaderboard, reward-farming bot, or auton
| MCP package | Local stdio tools for Codex, Claude Desktop, Cursor, and other MCP clients. | [MCP client setup](https://gittensory.aethereal.dev/docs/mcp-clients) |
| Web app | Operator UI, docs, API browser, roadmap, and workflow views. | [gittensory.aethereal.dev](https://gittensory.aethereal.dev/) |
| Worker API | Protected Cloudflare Worker API with OpenAPI metadata. | [OpenAPI JSON](https://gittensory-api.aethereal.dev/openapi.json) |
-| GitHub App | Quiet maintainer automation for installed repos. | [GitHub App docs](https://gittensory.aethereal.dev/docs/github-app) |
+| GitHub App | Quiet maintainer automation for installed repos. | [Install](https://github.com/apps/gittensory/installations/new) and [setup docs](https://gittensory.aethereal.dev/docs/github-app) |
## Install MCP
diff --git a/apps/gittensory-ui/public/openapi.json b/apps/gittensory-ui/public/openapi.json
index 8b93fbc23d..875fb10ad3 100644
--- a/apps/gittensory-ui/public/openapi.json
+++ b/apps/gittensory-ui/public/openapi.json
@@ -755,6 +755,17 @@
},
"likelyReviewablePullRequests": {
"type": "number"
+ },
+ "cachedOpenPullRequests": {
+ "type": "number"
+ },
+ "likelyReviewablePullRequestsSource": {
+ "type": "string",
+ "enum": [
+ "cache",
+ "sampled_cache",
+ "authoritative"
+ ]
}
},
"required": [
diff --git a/apps/gittensory-ui/src/routes/docs.beta-onboarding.tsx b/apps/gittensory-ui/src/routes/docs.beta-onboarding.tsx
index e7c47470a6..48ad0062de 100644
--- a/apps/gittensory-ui/src/routes/docs.beta-onboarding.tsx
+++ b/apps/gittensory-ui/src/routes/docs.beta-onboarding.tsx
@@ -113,7 +113,8 @@ gittensory-mcp preflight --login your-login --json`}
Install the GitHub App. Choose repositories and approve permissions —
- default posture is silence. See GitHub App setup.
+ default posture is silence. Start with the{" "}
+ GitHub App first-10-minutes checklist.
Configure settings. Opt in to at most one configured label and one sticky
@@ -122,7 +123,8 @@ gittensory-mcp preflight --login your-login --json`}
Preview the public surface. Dry-run what would be written to GitHub
- without mutating state.
+ without mutating state. Keep Gittensory Context advisory; require{" "}
+ Gittensory Gate only after blocking rules are explicitly configured.
({
@@ -33,10 +35,58 @@ function GithubApp() {
description="Install Gittensory on a repo, then choose whether it should stay advisory or enforce repo-configured PR quality rules."
>
Install
+
+ The hosted deployment uses the GitHub App slug gittensory. Start from{" "}
+
+ the GitHub App install flow
+
+ , then choose only the repositories you want Gittensory to see.
+
-
Open the Gittensory GitHub App listing.
-
Choose the repositories you want to grant access to.
-
Approve the requested permissions (issues, pulls, checks, metadata).
+
Open the install flow and pick the owning account.
+
+ Choose selected repositories instead of all repositories unless you are onboarding an org.
+
+
+ Approve Metadata: read, Pull requests: read, and{" "}
+ Issues: write. Enable Checks: write when Context or Gate check
+ runs are enabled.
+
+
+ Keep webhook events enabled for issues, issue_comment,{" "}
+ pull_request, and repository.
+
+
+
+
First 10 minutes
+
+
Install the app on one test repository first.
+
+ Confirm the installation appears in the private API, then open its health record.
+
+
+
+ Check repo readiness before enabling public output.
+
+
+
+ Preview the exact public surface without posting to GitHub.
+
+
+
+ Leave Gittensory Context advisory while you tune copy and settings. Make{" "}
+ Gittensory Gate required only after the repo explicitly enables blocking
+ rules.
+
Default posture
@@ -59,6 +109,12 @@ function GithubApp() {
protection. Gittensory Gate is opt-in and can be made required after a repo
owner chooses blocking rules.
+
+ Branch protection should require Gittensory Gate only after the repo has
+ verified installation health, previewed the public panel, and configured at least one{" "}
+ block rule. Do not require Gittensory Context; it is there to
+ inform reviewers, not stop merges.
+
Gate modes
@@ -81,6 +137,17 @@ function GithubApp() {
After installing, verify your install health from the API. The readiness endpoint separates
service health from data quality.
+
+ If the install route changes, check the deployed GITHUB_APP_SLUG before
+ publishing setup copy. For the hosted app, the expected slug is gittensory.
+
+
+
+ New maintainers should continue with{" "}
+ Maintainer workflow or the{" "}
+ beta onboarding checklist after the health endpoint
+ reports clean permissions and events.
+
Gittensory's GitHub App never requests source push, never stores repository contents, and
diff --git a/apps/gittensory-ui/src/routes/docs.maintainer-workflow.tsx b/apps/gittensory-ui/src/routes/docs.maintainer-workflow.tsx
index d56af2546b..c93af46ff2 100644
--- a/apps/gittensory-ui/src/routes/docs.maintainer-workflow.tsx
+++ b/apps/gittensory-ui/src/routes/docs.maintainer-workflow.tsx
@@ -1,4 +1,4 @@
-import { createFileRoute } from "@tanstack/react-router";
+import { createFileRoute, Link } from "@tanstack/react-router";
import { DocsPage } from "@/components/site/docs-page";
import { CodeBlock, Callout } from "@/components/site/primitives";
@@ -130,6 +130,11 @@ GET /v1/repos/:owner/:repo/registration-readiness`}
Each step on the right is what you see in the repo; the matching step on the left is what
the contributor is doing privately via MCP at the same point.
+
+ New installations should start with GitHub App setup:
+ install on one repo, verify installation health, preview the public panel, then decide
+ whether Gittensory Gate should become a required check.
+