From 91feb293b8d14a1e5630d918f74ddfbc167bca96 Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Tue, 2 Jun 2026 12:33:53 -0400 Subject: [PATCH 1/6] fix(signals): include recent_merged_pull_requests in outcome pattern analysis --- src/signals/engine.ts | 95 ++++++++++++++++--------- test/unit/repo-outcome-patterns.test.ts | 75 +++++++++++++++++++ 2 files changed, 136 insertions(+), 34 deletions(-) diff --git a/src/signals/engine.ts b/src/signals/engine.ts index 1c458cac30..879c8e2af3 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -1798,33 +1798,56 @@ export function buildRepoOutcomePatterns(args: { const lane = buildLaneAdvice(args.repo, args.repoFullName).lane; const primaryLanguage = args.syncState?.primaryLanguage ?? null; - const analyzed: RepoOutcomePullRequest[] = args.pullRequests - .filter((pr) => pr.repoFullName.toLowerCase() === repoKey) - .map((pr) => { - const mergedDetail = mergedDetailByNumber.get(pr.number); - const merged = Boolean(pr.mergedAt) || pr.state === "merged"; - const closedUnmerged = !merged && pr.state === "closed"; - const open = !merged && !closedUnmerged; - const stale = open && daysSince(pr.updatedAt ?? pr.createdAt) >= REPO_OUTCOME_STALE_OPEN_DAYS; - const bucket: RepoOutcomeBucket = merged ? "merged" : closedUnmerged ? "closed_unmerged" : stale ? "open_stale" : "open_active"; - const fileRecords = filesByNumber.get(pr.number) ?? []; - const filePaths = [...new Set([...fileRecords.map((file) => file.path), ...(mergedDetail?.changedFiles ?? [])])].sort(); - const reviewRecords = reviewsByNumber.get(pr.number) ?? []; - return { - number: pr.number, - bucket, - decided: merged || closedUnmerged, - merged, - maintainerLane: isMaintainerAssociation(pr.authorAssociation), - linked: pr.linkedIssues.length > 0 || (mergedDetail?.linkedIssues.length ?? 0) > 0, - labels: [...new Set([...pr.labels, ...(mergedDetail?.labels ?? [])])].sort(), - filePaths, - changedLineCount: fileRecords.reduce((sum, file) => sum + file.additions + file.deletions, 0), - authorRole: pr.authorAssociation === "CONTRIBUTOR" ? "returning_contributor" : "first_time_or_external", - hasReview: reviewRecords.length > 0, - changesRequested: reviewRecords.some((review) => review.state === "CHANGES_REQUESTED"), - }; - }); + const knownPrNumbers = new Set( + args.pullRequests.filter((pr) => pr.repoFullName.toLowerCase() === repoKey).map((pr) => pr.number), + ); + const analyzed: RepoOutcomePullRequest[] = [ + ...args.pullRequests + .filter((pr) => pr.repoFullName.toLowerCase() === repoKey) + .map((pr): RepoOutcomePullRequest => { + const mergedDetail = mergedDetailByNumber.get(pr.number); + // Reconcile: a "closed" PR that has a merged record with a timestamp was actually merged and mislabelled. + const merged = Boolean(pr.mergedAt) || pr.state === "merged" || Boolean(mergedDetail?.mergedAt); + const closedUnmerged = !merged && pr.state === "closed"; + const open = !merged && !closedUnmerged; + const stale = open && daysSince(pr.updatedAt ?? pr.createdAt) >= REPO_OUTCOME_STALE_OPEN_DAYS; + const bucket: RepoOutcomeBucket = merged ? "merged" : closedUnmerged ? "closed_unmerged" : stale ? "open_stale" : "open_active"; + const fileRecords = filesByNumber.get(pr.number) ?? []; + const filePaths = [...new Set([...fileRecords.map((file) => file.path), ...(mergedDetail?.changedFiles ?? [])])].sort(); + const reviewRecords = reviewsByNumber.get(pr.number) ?? []; + return { + number: pr.number, + bucket, + decided: merged || closedUnmerged, + merged, + maintainerLane: isMaintainerAssociation(pr.authorAssociation), + linked: pr.linkedIssues.length > 0 || (mergedDetail?.linkedIssues.length ?? 0) > 0, + labels: [...new Set([...pr.labels, ...(mergedDetail?.labels ?? [])])].sort(), + filePaths, + changedLineCount: fileRecords.reduce((sum, file) => sum + file.additions + file.deletions, 0), + authorRole: pr.authorAssociation === "CONTRIBUTOR" ? "returning_contributor" : "first_time_or_external", + hasReview: reviewRecords.length > 0, + changesRequested: reviewRecords.some((review) => review.state === "CHANGES_REQUESTED"), + }; + }), + // Include merged PRs that exist only in recent_merged_pull_requests (absent from pull_requests). + ...(args.recentMergedPullRequests ?? []) + .filter((record) => record.repoFullName.toLowerCase() === repoKey && !knownPrNumbers.has(record.number)) + .map((record): RepoOutcomePullRequest => ({ + number: record.number, + bucket: "merged", + decided: true, + merged: true, + maintainerLane: false, + linked: record.linkedIssues.length > 0, + labels: [...record.labels].sort(), + filePaths: [...record.changedFiles].sort(), + changedLineCount: 0, + authorRole: "first_time_or_external", + hasReview: false, + changesRequested: false, + })), + ]; const decided = analyzed.filter((pr) => pr.decided); const maintainer = analyzed.filter((pr) => pr.maintainerLane); @@ -1957,18 +1980,22 @@ export function buildRepoOutcomePatterns(args: { for (const state of args.detailSyncStates ?? []) { if (state.repoFullName.toLowerCase() === repoKey) detailByNumber.set(state.pullNumber, state); } - const withFileDetail = analyzed.filter((pr) => Boolean(detailByNumber.get(pr.number)?.filesSyncedAt)).length; - const withReviewDetail = analyzed.filter((pr) => Boolean(detailByNumber.get(pr.number)?.reviewsSyncedAt)).length; - const withCheckDetail = analyzed.filter((pr) => Boolean(detailByNumber.get(pr.number)?.checksSyncedAt)).length; + // evidenceCompleteness tracks detail-sync progress for pull_requests records only — merged-only records from + // recent_merged_pull_requests are never eligible for detail sync and must not dilute the denominator. + const syncEligible = analyzed.filter((pr) => knownPrNumbers.has(pr.number)); + const withFileDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.filesSyncedAt)).length; + const withReviewDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.reviewsSyncedAt)).length; + const withCheckDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.checksSyncedAt)).length; const fullyDecidedWithDetail = decided.filter((pr) => { + if (!knownPrNumbers.has(pr.number)) return false; const state = detailByNumber.get(pr.number); return Boolean(state?.filesSyncedAt && state?.reviewsSyncedAt && state?.checksSyncedAt); }).length; - const filesCompletenessRatio = rate(withFileDetail, analyzed.length); - const reviewsCompletenessRatio = rate(withReviewDetail, analyzed.length); - const checksCompletenessRatio = rate(withCheckDetail, analyzed.length); + const filesCompletenessRatio = rate(withFileDetail, syncEligible.length); + const reviewsCompletenessRatio = rate(withReviewDetail, syncEligible.length); + const checksCompletenessRatio = rate(withCheckDetail, syncEligible.length); const completenessStatus: RepoOutcomeEvidenceCompleteness["status"] = - analyzed.length === 0 || (withFileDetail === 0 && withReviewDetail === 0 && withCheckDetail === 0) + syncEligible.length === 0 || (withFileDetail === 0 && withReviewDetail === 0 && withCheckDetail === 0) ? "missing" : filesCompletenessRatio >= 0.85 && reviewsCompletenessRatio >= 0.85 && checksCompletenessRatio >= 0.85 ? "complete" diff --git a/test/unit/repo-outcome-patterns.test.ts b/test/unit/repo-outcome-patterns.test.ts index 9d43614409..d2408318e4 100644 --- a/test/unit/repo-outcome-patterns.test.ts +++ b/test/unit/repo-outcome-patterns.test.ts @@ -395,6 +395,81 @@ describe("buildRepoOutcomePatterns", () => { expect(details.join("\n")).not.toMatch(/duplicate\n@octo-team|@octo-team|[^\\]\[click\]\(https:\/\/example\.test\)/); }); + it("includes merged-only PRs absent from pull_requests in the analysis", () => { + // Repo has 5 open/closed PRs in pull_requests and 200 merged PRs only in recent_merged_pull_requests. + // Without the fix: merge rate = 0/3, triggering false "high closure risk". + // With the fix: merge rate = ~0.97 from the full unified set. + const pullRequests: PullRequestRecord[] = [ + closedPr(1), + closedPr(2), + closedPr(3), + pr(4, { state: "open" }), + pr(5, { state: "open" }), + ]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = Array.from({ length: 200 }, (_, i) => ({ + repoFullName: REPO, + number: 100 + i, + title: `Merged PR ${100 + i}`, + authorLogin: "dev", + mergedAt: "2026-05-01T00:00:00.000Z", + labels: ["bug"], + linkedIssues: [200 + i], + changedFiles: ["src/feature.ts"], + payload: {}, + })); + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + + expect(result.totals.analyzed).toBe(205); + expect(result.totals.merged).toBe(200); + expect(result.totals.closedUnmerged).toBe(3); + expect(result.outsideContributorMergeRate).toBeCloseTo(200 / 203, 4); + expect(result.riskPatterns.some((p) => p.title === "Outside contributor PRs rarely merge here")).toBe(false); + expect(result.successPatterns.some((p) => p.title === "Outside contributors merge well here")).toBe(true); + }); + + it("does not double-count PRs present in both pull_requests and recent_merged_pull_requests", () => { + const pullRequests = [mergedPr(1), mergedPr(2), closedPr(3)]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ + { repoFullName: REPO, number: 1, title: "PR 1", authorLogin: "dev", mergedAt: "2026-05-01T00:00:00.000Z", labels: [], linkedIssues: [], changedFiles: [], payload: {} }, + { repoFullName: REPO, number: 2, title: "PR 2", authorLogin: "dev", mergedAt: "2026-05-01T00:00:00.000Z", labels: [], linkedIssues: [], changedFiles: [], payload: {} }, + { repoFullName: REPO, number: 99, title: "Merged only", authorLogin: "dev", mergedAt: "2026-05-01T00:00:00.000Z", labels: [], linkedIssues: [], changedFiles: [], payload: {} }, + ]; + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + expect(result.totals.analyzed).toBe(4); + expect(result.totals.merged).toBe(3); + expect(result.totals.closedUnmerged).toBe(1); + }); + + it("reconciles a closed PR in pull_requests that has a mergedAt in its recent-merged record", () => { + // A PR recorded as "closed" in the pull_requests table was actually merged; the merged table has the timestamp. + const pullRequests = [ + closedPr(1), + closedPr(2), + closedPr(3), + mergedPr(4), + mergedPr(5), + mergedPr(6), + ]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ + { repoFullName: REPO, number: 1, title: "PR 1", authorLogin: "dev", mergedAt: "2026-05-01T00:00:00.000Z", labels: [], linkedIssues: [], changedFiles: ["src/a.ts"], payload: {} }, + { repoFullName: REPO, number: 2, title: "PR 2", authorLogin: "dev", mergedAt: "2026-05-01T00:00:00.000Z", labels: [], linkedIssues: [], changedFiles: ["src/b.ts"], payload: {} }, + ]; + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + expect(result.totals.merged).toBe(5); + expect(result.totals.closedUnmerged).toBe(1); + expect(result.outsideContributorMergeRate).toBeCloseTo(5 / 6, 4); + }); + + it("does not reconcile a closed PR whose recent-merged record carries no mergedAt timestamp", () => { + const pullRequests = [closedPr(1), mergedPr(2), mergedPr(3), mergedPr(4)]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ + { repoFullName: REPO, number: 1, title: "PR 1", authorLogin: "dev", mergedAt: null, labels: [], linkedIssues: [], changedFiles: [], payload: {} }, + ]; + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + expect(result.totals.closedUnmerged).toBe(1); + expect(result.totals.merged).toBe(3); + }); + it("never emits forbidden public-surface language", () => { const fixtures = [ buildRepoOutcomePatterns(primaryFixture()), From 867cf15bcf5366d09212a6fe99e1d72b85003177 Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Tue, 2 Jun 2026 19:09:18 -0400 Subject: [PATCH 2/6] fix(signals): derive maintainer lane from payload.author_association on merged-only repo outcome rows --- src/signals/engine.ts | 34 ++++++++------ test/unit/repo-outcome-patterns.test.ts | 59 +++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 14 deletions(-) diff --git a/src/signals/engine.ts b/src/signals/engine.ts index f926aa8bf2..4a925830c9 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -1857,22 +1857,28 @@ export function buildRepoOutcomePatterns(args: { }; }), // Include merged PRs that exist only in recent_merged_pull_requests (absent from pull_requests). + // Derive maintainer lane and author role from payload.author_association when present so that + // owner/member/collaborator merges are not counted in the outside-contributor merge rate. ...(args.recentMergedPullRequests ?? []) .filter((record) => record.repoFullName.toLowerCase() === repoKey && !knownPrNumbers.has(record.number)) - .map((record): RepoOutcomePullRequest => ({ - number: record.number, - bucket: "merged", - decided: true, - merged: true, - maintainerLane: false, - linked: record.linkedIssues.length > 0, - labels: [...record.labels].sort(), - filePaths: [...record.changedFiles].sort(), - changedLineCount: 0, - authorRole: "first_time_or_external", - hasReview: false, - changesRequested: false, - })), + .map((record): RepoOutcomePullRequest => { + const payloadAssociation = typeof record.payload["author_association"] === "string" ? record.payload["author_association"] : undefined; + const isMaintainer = isMaintainerAssociation(payloadAssociation); + return { + number: record.number, + bucket: "merged", + decided: true, + merged: true, + maintainerLane: isMaintainer, + linked: record.linkedIssues.length > 0, + labels: [...record.labels].sort(), + filePaths: [...record.changedFiles].sort(), + changedLineCount: 0, + authorRole: payloadAssociation === "CONTRIBUTOR" ? "returning_contributor" : "first_time_or_external", + hasReview: false, + changesRequested: false, + }; + }), ]; const decided = analyzed.filter((pr) => pr.decided); diff --git a/test/unit/repo-outcome-patterns.test.ts b/test/unit/repo-outcome-patterns.test.ts index d2408318e4..ca8af3e236 100644 --- a/test/unit/repo-outcome-patterns.test.ts +++ b/test/unit/repo-outcome-patterns.test.ts @@ -470,6 +470,65 @@ describe("buildRepoOutcomePatterns", () => { expect(result.totals.merged).toBe(3); }); + it("does not count merged-only OWNER/MEMBER/COLLABORATOR PRs in the outside-contributor merge rate", () => { + // 3 outside-contributor PRs from pull_requests: 1 merged, 2 closed. + // 10 merged-only maintainer PRs in recent_merged_pull_requests with OWNER/MEMBER/COLLABORATOR associations. + // Without the fix: outside merge rate = 11/13 ≈ 0.85 (falsely inflated by owner work). + // With the fix: outside merge rate = 1/3 ≈ 0.33 (only outside-contributor decided PRs counted). + const pullRequests: PullRequestRecord[] = [ + mergedPr(1, { authorAssociation: "NONE" }), + closedPr(2, { authorAssociation: "NONE" }), + closedPr(3, { authorAssociation: "NONE" }), + ]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ + ...["OWNER", "OWNER", "OWNER", "MEMBER", "MEMBER", "COLLABORATOR", "COLLABORATOR", "COLLABORATOR", "OWNER", "MEMBER"].map( + (association, i): RecentMergedPullRequestRecord => ({ + repoFullName: REPO, + number: 100 + i, + title: `Maintainer PR ${100 + i}`, + authorLogin: "repo-owner", + mergedAt: "2026-05-01T00:00:00.000Z", + labels: [], + linkedIssues: [], + changedFiles: ["src/internal.ts"], + payload: { author_association: association }, + }), + ), + ]; + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + + expect(result.totals.analyzed).toBe(13); + expect(result.totals.maintainerLanePullRequests).toBe(10); + expect(result.totals.outsideContributorPullRequests).toBe(3); + // Only the 3 outside-contributor PRs (1 merged, 2 closed) form the denominator. + expect(result.outsideContributorMergeRate).toBeCloseTo(1 / 3, 4); + // Maintainer merge rate covers the 10 merged-only maintainer PRs. + expect(result.maintainerLaneMergeRate).toBeCloseTo(1, 4); + // The repo should NOT be flagged as "merges well" since outside rate is low. + expect(result.successPatterns.some((p) => p.title === "Outside contributors merge well here")).toBe(false); + }); + + it("derives returning_contributor authorRole from payload.author_association CONTRIBUTOR on merged-only rows", () => { + const pullRequests: PullRequestRecord[] = [closedPr(1)]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ + { + repoFullName: REPO, + number: 99, + title: "Returning contributor PR", + authorLogin: "returning-dev", + mergedAt: "2026-05-01T00:00:00.000Z", + labels: [], + linkedIssues: [], + changedFiles: [], + payload: { author_association: "CONTRIBUTOR" }, + }, + ]; + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + // CONTRIBUTOR is outside-contributor lane but returning — must not be maintainerLane. + expect(result.totals.maintainerLanePullRequests).toBe(0); + expect(result.outsideContributorMergeRate).toBeCloseTo(1 / 2, 4); + }); + it("never emits forbidden public-surface language", () => { const fixtures = [ buildRepoOutcomePatterns(primaryFixture()), From d1116eebec8382cf1903c083e4cf34db1bdf8691 Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Tue, 2 Jun 2026 19:34:12 -0400 Subject: [PATCH 3/6] chore(ui): regenerate stale openapi artifact Co-Authored-By: Claude Sonnet 4.6 --- apps/gittensory-ui/public/openapi.json | 8181 ++++++++++++------------ 1 file changed, 4089 insertions(+), 4092 deletions(-) diff --git a/apps/gittensory-ui/public/openapi.json b/apps/gittensory-ui/public/openapi.json index 900768a546..52a7705c75 100644 --- a/apps/gittensory-ui/public/openapi.json +++ b/apps/gittensory-ui/public/openapi.json @@ -146,6 +146,59 @@ "generatedAt" ] }, + "RegistryRepo": { + "type": "object", + "properties": { + "repo": { + "type": "string" + }, + "emissionShare": { + "type": "number" + }, + "issueDiscoveryShare": { + "type": "number" + }, + "labelMultipliers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "trustedLabelPipeline": { + "type": "boolean", + "nullable": true + }, + "maintainerCut": { + "type": "number" + }, + "defaultLabelMultiplier": { + "type": "number", + "nullable": true + }, + "fixedBaseScore": { + "type": "number", + "nullable": true + }, + "eligibilityMode": { + "type": "string", + "nullable": true + }, + "raw": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "repo", + "emissionShare", + "issueDiscoveryShare", + "labelMultipliers", + "maintainerCut", + "raw" + ] + }, "RegistrySnapshot": { "type": "object", "properties": { @@ -207,59 +260,6 @@ "repositories" ] }, - "RegistryRepo": { - "type": "object", - "properties": { - "repo": { - "type": "string" - }, - "emissionShare": { - "type": "number" - }, - "issueDiscoveryShare": { - "type": "number" - }, - "labelMultipliers": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "trustedLabelPipeline": { - "type": "boolean", - "nullable": true - }, - "maintainerCut": { - "type": "number" - }, - "defaultLabelMultiplier": { - "type": "number", - "nullable": true - }, - "fixedBaseScore": { - "type": "number", - "nullable": true - }, - "eligibilityMode": { - "type": "string", - "nullable": true - }, - "raw": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "required": [ - "repo", - "emissionShare", - "issueDiscoveryShare", - "labelMultipliers", - "maintainerCut", - "raw" - ] - }, "Repository": { "type": "object", "properties": { @@ -313,6 +313,40 @@ "isPrivate" ] }, + "Finding": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "title": { + "type": "string" + }, + "severity": { + "type": "string", + "enum": [ + "info", + "warning", + "critical" + ] + }, + "detail": { + "type": "string" + }, + "action": { + "type": "string" + }, + "publicText": { + "type": "string" + } + }, + "required": [ + "code", + "title", + "severity", + "detail" + ] + }, "Advisory": { "type": "object", "properties": { @@ -387,177 +421,98 @@ "generatedAt" ] }, - "Finding": { + "ActionPortfolioBucketName": { + "type": "string", + "enum": [ + "cleanup", + "wait", + "direct_pr", + "issue_discovery", + "avoid", + "maintainer_lane" + ] + }, + "DecisionActionKind": { + "type": "string", + "enum": [ + "cleanup_existing_prs", + "land_existing_prs", + "open_new_direct_pr", + "file_issue_discovery", + "maintainer_lane_improve_repo", + "maintainer_cut_readiness" + ] + }, + "DecisionRecommendation": { + "type": "string", + "enum": [ + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "watch" + ] + }, + "ActionPortfolioItem": { "type": "object", "properties": { - "code": { - "type": "string" + "bucket": { + "$ref": "#/components/schemas/ActionPortfolioBucketName" }, - "title": { + "repoFullName": { "type": "string" }, - "severity": { + "actionKind": { + "$ref": "#/components/schemas/DecisionActionKind" + }, + "priorityScore": { + "type": "number" + }, + "recommendation": { + "$ref": "#/components/schemas/DecisionRecommendation" + }, + "status": { "type": "string", "enum": [ - "info", - "warning", - "critical" + "recommended", + "blocked", + "watch" ] }, - "detail": { + "whyNow": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreabilityImpact": { "type": "string" }, - "action": { + "riskImpact": { "type": "string" }, - "publicText": { + "maintainerImpact": { "type": "string" - } - }, - "required": [ - "code", - "title", - "severity", - "detail" - ] - }, - "ActionPortfolio": { - "type": "object", - "properties": { - "generatedAt": { + }, + "blockedBy": { + "type": "array", + "items": { + "type": "string" + } + }, + "rerunWhen": { "type": "string" }, - "bucketOrder": { + "publicSafeSummary": { + "type": "string" + }, + "nextActions": { "type": "array", "items": { - "$ref": "#/components/schemas/ActionPortfolioBucketName" + "type": "string" } }, - "buckets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "bucket": { - "$ref": "#/components/schemas/ActionPortfolioBucketName" - }, - "label": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionPortfolioItem" - } - } - }, - "required": [ - "bucket", - "label", - "summary", - "actions" - ] - } - }, - "topActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionPortfolioItem" - } - }, - "counts": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "summary": { - "type": "string" - } - }, - "required": [ - "generatedAt", - "bucketOrder", - "buckets", - "topActions", - "counts", - "summary" - ] - }, - "ActionPortfolioBucketName": { - "type": "string", - "enum": [ - "cleanup", - "wait", - "direct_pr", - "issue_discovery", - "avoid", - "maintainer_lane" - ] - }, - "ActionPortfolioItem": { - "type": "object", - "properties": { - "bucket": { - "$ref": "#/components/schemas/ActionPortfolioBucketName" - }, - "repoFullName": { - "type": "string" - }, - "actionKind": { - "$ref": "#/components/schemas/DecisionActionKind" - }, - "priorityScore": { - "type": "number" - }, - "recommendation": { - "$ref": "#/components/schemas/DecisionRecommendation" - }, - "status": { - "type": "string", - "enum": [ - "recommended", - "blocked", - "watch" - ] - }, - "whyNow": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreabilityImpact": { - "type": "string" - }, - "riskImpact": { - "type": "string" - }, - "maintainerImpact": { - "type": "string" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "string" - } - }, - "rerunWhen": { - "type": "string" - }, - "publicSafeSummary": { - "type": "string" - }, - "nextActions": { - "type": "array", - "items": { - "type": "string" - } - }, - "publicNextActions": { + "publicNextActions": { "type": "array", "items": { "type": "string" @@ -625,25 +580,70 @@ "source" ] }, - "DecisionActionKind": { - "type": "string", - "enum": [ - "cleanup_existing_prs", - "land_existing_prs", - "open_new_direct_pr", - "file_issue_discovery", - "maintainer_lane_improve_repo", - "maintainer_cut_readiness" - ] - }, - "DecisionRecommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "watch" + "ActionPortfolio": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string" + }, + "bucketOrder": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionPortfolioBucketName" + } + }, + "buckets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "bucket": { + "$ref": "#/components/schemas/ActionPortfolioBucketName" + }, + "label": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionPortfolioItem" + } + } + }, + "required": [ + "bucket", + "label", + "summary", + "actions" + ] + } + }, + "topActions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionPortfolioItem" + } + }, + "counts": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "summary": { + "type": "string" + } + }, + "required": [ + "generatedAt", + "bucketOrder", + "buckets", + "topActions", + "counts", + "summary" ] }, "WorkboardItem": { @@ -785,46 +785,35 @@ "findings" ] }, - "CollisionReport": { + "CollisionItem": { "type": "object", "properties": { - "repoFullName": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "issue", + "pull_request" + ] }, - "generatedAt": { + "number": { + "type": "number" + }, + "title": { "type": "string" }, - "summary": { - "type": "object", - "properties": { - "clusterCount": { - "type": "number" - }, - "highRiskCount": { - "type": "number" - }, - "itemsReviewed": { - "type": "number" - } - }, - "required": [ - "clusterCount", - "highRiskCount", - "itemsReviewed" - ] + "authorLogin": { + "type": "string", + "nullable": true }, - "clusters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CollisionCluster" - } + "htmlUrl": { + "type": "string", + "nullable": true } }, "required": [ - "repoFullName", - "generatedAt", - "summary", - "clusters" + "type", + "number", + "title" ] }, "CollisionCluster": { @@ -858,35 +847,86 @@ "items" ] }, - "CollisionItem": { + "CollisionReport": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "issue", - "pull_request" - ] - }, - "number": { - "type": "number" + "repoFullName": { + "type": "string" }, - "title": { + "generatedAt": { "type": "string" }, - "authorLogin": { - "type": "string", - "nullable": true + "summary": { + "type": "object", + "properties": { + "clusterCount": { + "type": "number" + }, + "highRiskCount": { + "type": "number" + }, + "itemsReviewed": { + "type": "number" + } + }, + "required": [ + "clusterCount", + "highRiskCount", + "itemsReviewed" + ] }, - "htmlUrl": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollisionCluster" + } + } + }, + "required": [ + "repoFullName", + "generatedAt", + "summary", + "clusters" + ] + }, + "LaneAdvice": { + "type": "object", + "properties": { + "lane": { "type": "string", - "nullable": true + "enum": [ + "direct_pr", + "issue_discovery", + "split", + "inactive", + "unknown" + ] + }, + "repoFullName": { + "type": "string" + }, + "issueDiscoveryShare": { + "type": "number" + }, + "directPrShare": { + "type": "number" + }, + "summary": { + "type": "string" + }, + "contributorGuidance": { + "type": "string" + }, + "maintainerGuidance": { + "type": "string" } }, "required": [ - "type", - "number", - "title" + "lane", + "repoFullName", + "summary", + "contributorGuidance", + "maintainerGuidance" ] }, "ConfigQuality": { @@ -950,46 +990,6 @@ "findings" ] }, - "LaneAdvice": { - "type": "object", - "properties": { - "lane": { - "type": "string", - "enum": [ - "direct_pr", - "issue_discovery", - "split", - "inactive", - "unknown" - ] - }, - "repoFullName": { - "type": "string" - }, - "issueDiscoveryShare": { - "type": "number" - }, - "directPrShare": { - "type": "number" - }, - "summary": { - "type": "string" - }, - "contributorGuidance": { - "type": "string" - }, - "maintainerGuidance": { - "type": "string" - } - }, - "required": [ - "lane", - "repoFullName", - "summary", - "contributorGuidance", - "maintainerGuidance" - ] - }, "LabelAudit": { "type": "object", "properties": { @@ -2126,199 +2126,111 @@ "summary" ] }, - "ContributorDecisionPack": { + "DecisionPackFreshness": { + "type": "string", + "enum": [ + "fresh", + "stale", + "rebuilding", + "missing" + ] + }, + "AgentRecommendationOutcomeState": { + "type": "string", + "enum": [ + "accepted", + "ignored", + "stale", + "merged", + "closed", + "improved" + ] + }, + "AgentRecommendationOutcomeStateBucket": { "type": "object", "properties": { - "status": { - "type": "string", - "enum": [ - "ready" - ] - }, - "source": { - "type": "string", - "enum": [ - "computed", - "snapshot" - ] + "state": { + "$ref": "#/components/schemas/AgentRecommendationOutcomeState" }, - "login": { + "count": { + "type": "number" + } + }, + "required": [ + "state", + "count" + ] + }, + "AgentRecommendationOutcomeRepoSummary": { + "type": "object", + "properties": { + "repoFullName": { "type": "string" }, - "generatedAt": { - "type": "string" + "total": { + "type": "number" }, - "snapshotAgeSeconds": { + "accepted": { + "type": "number" + }, + "ignored": { "type": "number" }, "stale": { - "type": "boolean" + "type": "number" }, - "freshness": { - "$ref": "#/components/schemas/DecisionPackFreshness" + "merged": { + "type": "number" }, - "rebuildEnqueued": { - "type": "boolean" + "closed": { + "type": "number" }, - "scoringModelSnapshotId": { - "type": "string" + "improved": { + "type": "number" }, - "profile": { - "type": "object", - "additionalProperties": { - "nullable": true - } + "positive": { + "type": "number" }, - "outcomeHistory": { - "$ref": "#/components/schemas/ContributorOutcomeHistory" + "negative": { + "type": "number" }, - "roleContexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RoleContext" - } + "maintainerLaneTotal": { + "type": "number" }, - "opportunities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContributorOpportunity" - } + "latestOutcomeAt": { + "type": "string", + "nullable": true }, - "repoDecisions": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "topActions": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "actionPortfolio": { - "$ref": "#/components/schemas/ActionPortfolio" - }, - "cleanupFirst": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "pursueRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "avoidRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "maintainerLaneRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "scoreBlockers": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "recommendationOutcomeFeedback": { - "$ref": "#/components/schemas/AgentRecommendationOutcomeSummary" - }, - "evidenceGraph": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "dataQuality": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "summary": { - "type": "string" - }, - "nextActions": { - "type": "array", - "items": { - "type": "string" - } - }, - "openPrMonitor": { - "$ref": "#/components/schemas/ContributorOpenPrMonitor" - } - }, - "required": [ - "status", - "source", - "login", - "generatedAt", - "stale", - "freshness", - "rebuildEnqueued", - "scoringModelSnapshotId", - "profile", - "outcomeHistory", - "roleContexts", - "opportunities", - "repoDecisions", - "topActions", - "actionPortfolio", - "cleanupFirst", - "pursueRepos", - "avoidRepos", - "maintainerLaneRepos", - "scoreBlockers", - "recommendationOutcomeFeedback", - "dataQuality", - "summary", - "nextActions" - ] - }, - "DecisionPackFreshness": { - "type": "string", - "enum": [ - "fresh", - "stale", - "rebuilding", - "missing" - ] - }, - "AgentRecommendationOutcomeSummary": { - "type": "object", - "properties": { - "login": { - "type": "string" + "signal": { + "type": "string", + "enum": [ + "positive", + "negative", + "mixed", + "neutral" + ] + } + }, + "required": [ + "repoFullName", + "total", + "accepted", + "ignored", + "stale", + "merged", + "closed", + "improved", + "positive", + "negative", + "maintainerLaneTotal", + "signal" + ] + }, + "AgentRecommendationOutcomeSummary": { + "type": "object", + "properties": { + "login": { + "type": "string" }, "generatedAt": { "type": "string" @@ -2418,95 +2330,58 @@ "privateSummary" ] }, - "AgentRecommendationOutcomeStateBucket": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/AgentRecommendationOutcomeState" - }, - "count": { - "type": "number" - } - }, - "required": [ - "state", - "count" - ] - }, - "AgentRecommendationOutcomeState": { - "type": "string", - "enum": [ - "accepted", - "ignored", - "stale", - "merged", - "closed", - "improved" - ] - }, - "AgentRecommendationOutcomeRepoSummary": { + "ContributorOpenPrNextStepPacket": { "type": "object", "properties": { "repoFullName": { "type": "string" }, - "total": { - "type": "number" - }, - "accepted": { - "type": "number" - }, - "ignored": { - "type": "number" - }, - "stale": { - "type": "number" - }, - "merged": { - "type": "number" - }, - "closed": { - "type": "number" - }, - "improved": { - "type": "number" - }, - "positive": { - "type": "number" - }, - "negative": { - "type": "number" - }, - "maintainerLaneTotal": { + "number": { "type": "number" }, - "latestOutcomeAt": { - "type": "string", - "nullable": true + "title": { + "type": "string" }, - "signal": { + "classification": { "type": "string", "enum": [ - "positive", - "negative", - "mixed", - "neutral" + "approved", + "blocked", + "stale", + "needs_author", + "failing_checks", + "missing_tests", + "duplicate_prone", + "reviewable", + "should_close_or_withdraw", + "maintainer_lane", + "draft" ] + }, + "summary": { + "type": "string" + }, + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextSteps": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ "repoFullName", - "total", - "accepted", - "ignored", - "stale", - "merged", - "closed", - "improved", - "positive", - "negative", - "maintainerLaneTotal", - "signal" + "number", + "title", + "classification", + "summary", + "reasons", + "nextSteps" ] }, "ContributorOpenPrMonitor": { @@ -2641,58 +2516,183 @@ "pullRequests" ] }, - "ContributorOpenPrNextStepPacket": { + "ContributorDecisionPack": { "type": "object", "properties": { - "repoFullName": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "ready" + ] }, - "number": { - "type": "number" + "source": { + "type": "string", + "enum": [ + "computed", + "snapshot" + ] }, - "title": { + "login": { "type": "string" }, - "classification": { - "type": "string", - "enum": [ - "approved", - "blocked", - "stale", - "needs_author", - "failing_checks", - "missing_tests", - "duplicate_prone", - "reviewable", - "should_close_or_withdraw", - "maintainer_lane", - "draft" - ] + "generatedAt": { + "type": "string" }, - "summary": { + "snapshotAgeSeconds": { + "type": "number" + }, + "stale": { + "type": "boolean" + }, + "freshness": { + "$ref": "#/components/schemas/DecisionPackFreshness" + }, + "rebuildEnqueued": { + "type": "boolean" + }, + "scoringModelSnapshotId": { "type": "string" }, - "reasons": { + "profile": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "outcomeHistory": { + "$ref": "#/components/schemas/ContributorOutcomeHistory" + }, + "roleContexts": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RoleContext" } }, - "nextSteps": { + "opportunities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorOpportunity" + } + }, + "repoDecisions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "topActions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "actionPortfolio": { + "$ref": "#/components/schemas/ActionPortfolio" + }, + "cleanupFirst": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "pursueRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "avoidRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "maintainerLaneRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "scoreBlockers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "recommendationOutcomeFeedback": { + "$ref": "#/components/schemas/AgentRecommendationOutcomeSummary" + }, + "evidenceGraph": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "dataQuality": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "summary": { + "type": "string" + }, + "nextActions": { "type": "array", "items": { "type": "string" } + }, + "openPrMonitor": { + "$ref": "#/components/schemas/ContributorOpenPrMonitor" } }, "required": [ - "repoFullName", - "number", - "title", - "classification", + "status", + "source", + "login", + "generatedAt", + "stale", + "freshness", + "rebuildEnqueued", + "scoringModelSnapshotId", + "profile", + "outcomeHistory", + "roleContexts", + "opportunities", + "repoDecisions", + "topActions", + "actionPortfolio", + "cleanupFirst", + "pursueRepos", + "avoidRepos", + "maintainerLaneRepos", + "scoreBlockers", + "recommendationOutcomeFeedback", + "dataQuality", "summary", - "reasons", - "nextSteps" + "nextActions" ] }, "DecisionPackRefreshNeeded": { @@ -2794,6 +2794,66 @@ "dataQuality" ] }, + "BurdenForecast": { + "type": "object", + "properties": { + "repoFullName": { + "type": "string" + }, + "generatedAt": { + "type": "string" + }, + "horizonDays": { + "anyOf": [ + { + "type": "number", + "enum": [ + 7 + ] + }, + { + "type": "number", + "enum": [ + 30 + ] + } + ] + }, + "level": { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "critical" + ] + }, + "forecast": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "findings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Finding" + } + }, + "summary": { + "type": "string" + } + }, + "required": [ + "repoFullName", + "generatedAt", + "horizonDays", + "level", + "forecast", + "findings", + "summary" + ] + }, "RepoIntelligence": { "type": "object", "properties": { @@ -2928,64 +2988,52 @@ "dataQuality" ] }, - "BurdenForecast": { + "RepoOutcomeEvidenceCompleteness": { "type": "object", "properties": { - "repoFullName": { - "type": "string" + "pullRequestsAnalyzed": { + "type": "number" }, - "generatedAt": { - "type": "string" + "withFileDetail": { + "type": "number" }, - "horizonDays": { - "anyOf": [ - { - "type": "number", - "enum": [ - 7 - ] - }, - { - "type": "number", - "enum": [ - 30 - ] - } - ] + "withReviewDetail": { + "type": "number" }, - "level": { - "type": "string", - "enum": [ - "low", - "medium", - "high", - "critical" - ] + "withCheckDetail": { + "type": "number" }, - "forecast": { - "type": "object", - "additionalProperties": { - "type": "number" - } + "filesCompletenessRatio": { + "type": "number" }, - "findings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Finding" - } + "reviewsCompletenessRatio": { + "type": "number" }, - "summary": { - "type": "string" + "checksCompletenessRatio": { + "type": "number" + }, + "fullyDecidedWithDetail": { + "type": "number" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "partial", + "missing" + ] } }, "required": [ - "repoFullName", - "generatedAt", - "horizonDays", - "level", - "forecast", - "findings", - "summary" + "pullRequestsAnalyzed", + "withFileDetail", + "withReviewDetail", + "withCheckDetail", + "filesCompletenessRatio", + "reviewsCompletenessRatio", + "checksCompletenessRatio", + "fullyDecidedWithDetail", + "status" ] }, "RepoOutcomePatterns": { @@ -3083,54 +3131,6 @@ "summary" ] }, - "RepoOutcomeEvidenceCompleteness": { - "type": "object", - "properties": { - "pullRequestsAnalyzed": { - "type": "number" - }, - "withFileDetail": { - "type": "number" - }, - "withReviewDetail": { - "type": "number" - }, - "withCheckDetail": { - "type": "number" - }, - "filesCompletenessRatio": { - "type": "number" - }, - "reviewsCompletenessRatio": { - "type": "number" - }, - "checksCompletenessRatio": { - "type": "number" - }, - "fullyDecidedWithDetail": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "complete", - "partial", - "missing" - ] - } - }, - "required": [ - "pullRequestsAnalyzed", - "withFileDetail", - "withReviewDetail", - "withCheckDetail", - "filesCompletenessRatio", - "reviewsCompletenessRatio", - "checksCompletenessRatio", - "fullyDecidedWithDetail", - "status" - ] - }, "RepoOutcomePatternsResponse": { "type": "object", "properties": { @@ -3887,1872 +3887,881 @@ } ] }, - "LocalBranchAnalysis": { + "ScorePreviewResult": { "type": "object", "properties": { - "login": { - "type": "string" - }, "repoFullName": { "type": "string" }, "generatedAt": { "type": "string" }, - "baseRef": { + "scoringModelSnapshotId": { "type": "string" }, - "headRef": { - "type": "string" + "activeModel": { + "type": "string", + "enum": [ + "current_density_model", + "pending_saturation_model", + "exponential_saturation_model", + "unknown" + ] }, - "branchName": { - "type": "string" + "privateOnly": { + "type": "boolean", + "enum": [ + true + ] }, - "baseFreshness": { + "laneMath": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "scoreEstimate": { "type": "object", "properties": { - "status": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { "type": "string", "enum": [ - "fresh", - "stale", - "possibly_stale", - "unknown" + "none", + "standard", + "maintainer" ] }, - "baseRef": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] }, - "baseSha": { - "type": "string" + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] }, - "headSha": { - "type": "string" + "eligible": { + "type": "boolean" }, - "mergeBaseSha": { - "type": "string" + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } }, - "remoteTrackingSha": { - "type": "string" + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } }, - "changedFileCount": { + "baseMultiplier": { "type": "number" }, - "testFileCount": { + "appliedMultiplier": { "type": "number" }, - "passedValidationCount": { - "type": "number" + "reason": { + "type": "string" }, "warnings": { "type": "array", "items": { "type": "string" } - }, - "recommendation": { - "type": "string" } }, "required": [ + "mode", "status", - "changedFileCount", - "testFileCount", - "passedValidationCount", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", "warnings" ] }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" - }, - "roleContext": { - "$ref": "#/components/schemas/RoleContext" - }, - "preflight": { - "$ref": "#/components/schemas/LocalDiffPreflightResult" - }, - "scorePreview": { - "$ref": "#/components/schemas/ScorePreviewResult" + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] }, - "scenarioScorePreview": { + "branchEligibility": { "type": "object", "properties": { - "current": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] + "required": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "eligible", + "ineligible", + "unknown", + "not_required" + ] + }, + "evidence": { + "type": "string", + "enum": [ + "provided", + "missing" + ] + }, + "source": { + "type": "string", + "enum": [ + "github_metadata", + "local_metadata", + "registry", + "user_supplied", + "missing" + ] + }, + "reason": { + "type": "string" + }, + "checkedAt": { + "type": "string" + }, + "stale": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "status", + "evidence", + "source", + "stale", + "warnings" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "gateDeltas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gate": { + "type": "string", + "enum": [ + "open_pr_threshold", + "credibility_floor", + "linked_issue_multiplier" + ] + }, + "current": { + "type": "string" + }, + "projected": { + "type": "string" + }, + "explanation": { + "type": "string" + } + }, + "required": [ + "gate", + "current", + "projected", + "explanation" + ] + } + }, + "scenarioPreviews": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } + "openPrThreshold": { + "type": "number" }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" } }, - "linkedIssueMultiplier": { + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { "type": "object", "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { + "code": { "type": "string", "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" ] }, - "source": { + "severity": { "type": "string", "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" + "blocker", + "reducer", + "context" ] }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { + "detail": { "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" + "code", + "severity", + "detail" ] - }, - "deltaExplanation": { - "type": "string" } }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - }, - "bestReasonableCase": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { "type": "number" } }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { + "solvedByPullRequests": { + "type": "array", + "items": { "type": "number" } }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } } }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { - "type": "string" - } + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" + "deltaExplanation": { + "type": "string" + } + }, + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + } + }, + "scoreabilityStatus": { + "type": "string", + "enum": [ + "blocked", + "conditionally_scoreable", + "scoreable", + "hold" + ] + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "recommendation": { + "type": "object", + "properties": { + "level": { + "type": "string", + "enum": [ + "strong_fit", + "reasonable_fit", + "needs_work", + "hold" ] }, - "afterPendingMerges": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } - }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } - }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { - "type": "string" - } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" + "actions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "level", + "actions" + ] + } + }, + "required": [ + "repoFullName", + "generatedAt", + "scoringModelSnapshotId", + "activeModel", + "privateOnly", + "laneMath", + "scoreEstimate", + "linkedIssueMultiplier", + "gates", + "branchEligibility", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "gateDeltas", + "scenarioPreviews", + "scoreabilityStatus", + "warnings", + "assumptions", + "recommendation" + ] + }, + "RewardRiskAction": { + "type": "object", + "properties": { + "actionKind": { + "type": "string", + "enum": [ + "cleanup_existing_prs", + "land_existing_prs", + "close_or_withdraw_low_fit_prs", + "open_new_direct_pr", + "file_issue_discovery", + "maintainer_lane_improve_repo", + "maintainer_cut_readiness" + ] + }, + "repoFullName": { + "type": "string" + }, + "priorityScore": { + "type": "number" + }, + "laneValueScore": { + "type": "number" + }, + "scoreabilityScore": { + "type": "number" + }, + "personalFitScore": { + "type": "number" + }, + "riskPenalty": { + "type": "number" + }, + "maintainerFrictionPenalty": { + "type": "number" + }, + "actionLeverageScore": { + "type": "number" + }, + "whyThisHelps": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "actionKind", + "repoFullName", + "priorityScore", + "laneValueScore", + "scoreabilityScore", + "personalFitScore", + "riskPenalty", + "maintainerFrictionPenalty", + "actionLeverageScore", + "whyThisHelps", + "nextActions" + ] + }, + "RepoRewardRisk": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "repoFullName": { + "type": "string" + }, + "generatedAt": { + "type": "string" + }, + "roleContext": { + "$ref": "#/components/schemas/RoleContext" + }, + "lane": { + "$ref": "#/components/schemas/LaneAdvice" + }, + "recommendation": { + "type": "string", + "enum": [ + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "unknown" + ] + }, + "rewardUpside": { + "type": "object", + "properties": { + "relevantLane": { + "type": "string", + "enum": [ + "direct_pr", + "issue_discovery", + "maintainer_lane", + "none" ] }, - "afterApprovedPrsMerge": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } - }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } - }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { - "type": "string" - } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - }, - "afterStalePrsClose": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } - }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } - }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { - "type": "string" - } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - }, - "gateDeltas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "gate": { - "type": "string", - "enum": [ - "open_pr_threshold", - "credibility_floor", - "linked_issue_multiplier" - ] - }, - "current": { - "type": "string" - }, - "projected": { - "type": "string" - }, - "explanation": { - "type": "string" - } - }, - "required": [ - "gate", - "current", - "projected", - "explanation" - ] - } - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } - } - }, - "required": [ - "current", - "bestReasonableCase", - "gateDeltas", - "blockedBy" - ] - }, - "observedPullRequestScenarios": { - "type": "object", - "properties": { - "approvedOrMergeable": { - "type": "number" - }, - "stale": { - "type": "number" - }, - "closed": { - "type": "number" - }, - "draft": { - "type": "number" - }, - "blocked": { - "type": "number" - }, - "maintainerLane": { - "type": "number" - }, - "notes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "approvedOrMergeable", - "stale", - "closed", - "draft", - "blocked", - "maintainerLane", - "notes" - ] - }, - "githubBranchStatus": { - "type": "object", - "properties": { - "source": { - "type": "string", - "enum": [ - "cached_github_data" - ] - }, - "status": { - "type": "string", - "enum": [ - "approved", - "failing_checks", - "needs_author", - "blocked", - "pending_review", - "no_pr", - "unknown" - ] - }, - "pullNumber": { - "type": "number" - }, - "title": { - "type": "string" - }, - "reviewDecision": { - "type": "string", - "nullable": true - }, - "mergeableState": { - "type": "string", - "nullable": true - }, - "notes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "source", - "status", - "notes" - ] - }, - "branchEligibility": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "eligible", - "ineligible", - "unknown", - "not_required" - ] - }, - "evidence": { - "type": "string", - "enum": [ - "provided", - "missing" - ] - }, - "source": { - "type": "string", - "enum": [ - "github_metadata", - "local_metadata", - "registry", - "user_supplied", - "missing" - ] - }, - "reason": { - "type": "string" - }, - "checkedAt": { - "type": "string" - }, - "stale": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "required", - "status", - "evidence", - "source", - "stale", - "warnings" - ] - }, - "rewardRisk": { - "$ref": "#/components/schemas/RepoRewardRisk" - }, - "scoreBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "branchQualityBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "accountStateBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendedRerunCondition": { - "type": "string" - }, - "localFindings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Finding" - } - }, - "maintainerFit": { - "type": "object", - "properties": { - "recommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "unknown" - ] - }, - "reviewBurden": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "role": { - "type": "string", - "enum": [ - "outside_contributor", - "repo_maintainer", - "org_member", - "collaborator", - "owner", - "unknown" - ] - }, - "maintainerLane": { - "type": "boolean" - }, - "reasons": { - "type": "array", - "items": { - "type": "string" - } - }, - "risks": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "recommendation", - "reviewBurden", - "role", - "maintainerLane", - "reasons", - "risks" - ] - }, - "manifestGuidance": { - "type": "object", - "properties": { - "present": { - "type": "boolean" - }, - "source": { - "type": "string", - "enum": [ - "repo_file", - "api_record", - "none" - ] - }, - "linkedIssuePolicy": { - "type": "string", - "enum": [ - "required", - "preferred", - "optional" - ] - }, - "issueDiscoveryPolicy": { - "type": "string", - "enum": [ - "encouraged", - "neutral", - "discouraged" - ] + "repoSlice": { + "type": "number" }, - "matchedWantedPaths": { - "type": "array", - "items": { - "type": "string" - } + "directPrSlice": { + "type": "number" }, - "matchedBlockedPaths": { - "type": "array", - "items": { - "type": "string" - } + "issueDiscoverySlice": { + "type": "number" }, - "preferredLabelHits": { - "type": "array", - "items": { - "type": "string" - } + "maintainerCutSlice": { + "type": "number" }, - "findings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "severity": { - "type": "string", - "enum": [ - "info", - "warning", - "critical" - ] - }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - }, - "action": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "title", - "detail" - ] - } + "labelMultiplier": { + "type": "number" }, - "publicNextSteps": { - "type": "array", - "items": { - "type": "string" - } + "issueMultiplier": { + "type": "number" }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } + "estimatedScoreIfClean": { + "type": "number" }, - "summary": { - "type": "string" + "currentEstimatedScore": { + "type": "number" } }, "required": [ - "present", - "source", - "linkedIssuePolicy", - "issueDiscoveryPolicy", - "matchedWantedPaths", - "matchedBlockedPaths", - "preferredLabelHits", - "findings", - "publicNextSteps", - "warnings", - "summary" - ] - }, - "prPacket": { - "type": "object", - "properties": { - "titleSuggestion": { - "type": "string" - }, - "markdown": { - "type": "string" - }, - "bodySections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "heading": { - "type": "string" - }, - "lines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "heading", - "lines" - ] - } - }, - "reviewerNotes": { - "type": "array", - "items": { - "type": "string" - } - }, - "validationSummary": { - "type": "object", - "properties": { - "passed": { - "type": "number" - }, - "failed": { - "type": "number" - }, - "notRun": { - "type": "number" - }, - "commands": { - "type": "array", - "items": { - "type": "object", - "properties": { - "command": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "passed", - "failed", - "not_run", - "skipped", - "focused", - "unknown" - ] - }, - "summary": { - "type": "string" - }, - "durationMs": { - "type": "number" - }, - "exitCode": { - "type": "number" - } - }, - "required": [ - "command", - "status" - ] - } - } - }, - "required": [ - "passed", - "failed", - "notRun", - "commands" + "relevantLane", + "repoSlice", + "directPrSlice", + "issueDiscoverySlice", + "maintainerCutSlice", + "labelMultiplier", + "issueMultiplier", + "estimatedScoreIfClean", + "currentEstimatedScore" + ] + }, + "scoreBlockers": { + "type": "array", + "items": { + "type": "string" + } + }, + "riskBreakdown": { + "type": "object", + "properties": { + "queueBurden": { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "critical" ] }, - "publicSafeWarnings": { - "type": "array", - "items": { - "type": "string" - } + "queueBurdenScore": { + "type": "number" + }, + "duplicateClusters": { + "type": "number" + }, + "highRiskDuplicateClusters": { + "type": "number" + }, + "closedPullRequestRate": { + "type": "number" + }, + "openPullRequests": { + "type": "number" + }, + "credibility": { + "type": "number" + }, + "reviewChurnRisk": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] } }, "required": [ - "titleSuggestion", - "markdown", - "bodySections", - "reviewerNotes", - "validationSummary", - "publicSafeWarnings" + "queueBurden", + "queueBurdenScore", + "duplicateClusters", + "highRiskDuplicateClusters", + "closedPullRequestRate", + "openPullRequests", + "credibility", + "reviewChurnRisk" ] }, - "nextActions": { + "actionImpact": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "currentPreview": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "afterCleanupPreview": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "actions": { "type": "array", "items": { "$ref": "#/components/schemas/RewardRiskAction" } }, - "workspaceIntelligence": { - "$ref": "#/components/schemas/LocalWorkspaceIntelligence" + "whyThisHelps": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } }, "summary": { "type": "string" @@ -5762,636 +4771,1718 @@ "login", "repoFullName", "generatedAt", - "baseFreshness", - "lane", "roleContext", - "preflight", - "scorePreview", - "scenarioScorePreview", - "observedPullRequestScenarios", - "githubBranchStatus", - "branchEligibility", - "rewardRisk", + "lane", + "recommendation", + "rewardUpside", "scoreBlockers", - "branchQualityBlockers", - "accountStateBlockers", - "recommendedRerunCondition", - "localFindings", - "maintainerFit", - "manifestGuidance", - "prPacket", + "riskBreakdown", + "actionImpact", + "currentPreview", + "afterCleanupPreview", + "actions", + "whyThisHelps", "nextActions", - "workspaceIntelligence", "summary" ] }, - "ScorePreviewResult": { + "LocalWorkspaceIntelligence": { "type": "object", "properties": { - "repoFullName": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "scoringModelSnapshotId": { - "type": "string" - }, - "activeModel": { - "type": "string", + "version": { + "type": "number", "enum": [ - "current_density_model", - "pending_saturation_model", - "exponential_saturation_model", - "unknown" + 2 ] }, - "privateOnly": { - "type": "boolean", - "enum": [ - true + "sourceUpload": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + false + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "enabled", + "detail" ] }, - "laneMath": { + "branch": { "type": "object", - "additionalProperties": { - "type": "number" - } + "properties": { + "name": { + "type": "string" + }, + "baseRef": { + "type": "string" + }, + "headSha": { + "type": "string" + }, + "pendingCommitCount": { + "type": "number" + } + }, + "required": [ + "pendingCommitCount" + ] }, - "scoreEstimate": { + "changedFiles": { "type": "object", "properties": { - "baseScore": { + "total": { "type": "number" }, - "densityMultiplier": { + "added": { "type": "number" }, - "contributionBonus": { + "modified": { "type": "number" }, - "labelMultiplier": { + "deleted": { "type": "number" }, - "issueMultiplier": { + "renamed": { "type": "number" }, - "credibilityMultiplier": { + "binary": { "type": "number" }, - "reviewPenaltyMultiplier": { - "type": "number" + "paths": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "total", + "added", + "modified", + "deleted", + "renamed", + "binary", + "paths" + ] + }, + "testEvidence": { + "type": "object", + "properties": { + "level": { + "type": "string", + "enum": [ + "test_files", + "validation_commands", + "both", + "none" + ] }, - "openPrMultiplier": { + "testFileCount": { "type": "number" }, - "estimatedMergedScore": { + "passedValidationCount": { "type": "number" }, - "pendingSaturationScore": { - "type": "number" + "commands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "command": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "passed", + "failed", + "not_run" + ] + }, + "summary": { + "type": "string" + } + }, + "required": [ + "command", + "status" + ] + } } }, "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" + "level", + "testFileCount", + "passedValidationCount", + "commands" ] }, - "linkedIssueMultiplier": { + "linkedIssues": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseFreshness": { "type": "object", "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, "status": { "type": "string", "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" + "fresh", + "stale", + "possibly_stale", + "unknown" ] }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] + "baseRef": { + "type": "string" }, - "eligible": { - "type": "boolean" + "baseSha": { + "type": "string" }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } + "headSha": { + "type": "string" }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } + "mergeBaseSha": { + "type": "string" }, - "baseMultiplier": { + "remoteTrackingSha": { + "type": "string" + }, + "changedFileCount": { "type": "number" }, - "appliedMultiplier": { + "testFileCount": { "type": "number" }, - "reason": { - "type": "string" + "passedValidationCount": { + "type": "number" }, "warnings": { "type": "array", "items": { "type": "string" } + }, + "recommendation": { + "type": "string" } }, "required": [ - "mode", "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", + "changedFileCount", + "testFileCount", + "passedValidationCount", "warnings" ] }, - "gates": { + "ciStatusHints": { + "type": "array", + "items": { + "type": "string" + } + }, + "localScorerDiagnostics": { "type": "object", "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" + "mode": { + "type": "string" }, - "collateralFraction": { - "type": "number" + "activeModel": { + "type": "string" }, - "credibilityFloor": { - "type": "number" + "warnings": { + "type": "array", + "items": { + "type": "string" + } }, - "credibilityObserved": { - "type": "number" + "metadataOnly": { + "type": "boolean" } }, "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" + "mode", + "warnings", + "metadataOnly" ] }, - "branchEligibility": { + "blockers": { "type": "object", "properties": { - "required": { - "type": "boolean" + "branchQuality": { + "type": "array", + "items": { + "type": "string" + } }, + "accountState": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "branchQuality", + "accountState" + ] + }, + "rerunWhen": { + "type": "string" + } + }, + "required": [ + "version", + "sourceUpload", + "branch", + "changedFiles", + "testEvidence", + "linkedIssues", + "baseFreshness", + "ciStatusHints", + "blockers", + "rerunWhen" + ] + }, + "LocalBranchAnalysis": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "repoFullName": { + "type": "string" + }, + "generatedAt": { + "type": "string" + }, + "baseRef": { + "type": "string" + }, + "headRef": { + "type": "string" + }, + "branchName": { + "type": "string" + }, + "baseFreshness": { + "type": "object", + "properties": { "status": { "type": "string", "enum": [ - "eligible", - "ineligible", - "unknown", - "not_required" + "fresh", + "stale", + "possibly_stale", + "unknown" ] }, - "evidence": { - "type": "string", - "enum": [ - "provided", - "missing" - ] + "baseRef": { + "type": "string" }, - "source": { - "type": "string", - "enum": [ - "github_metadata", - "local_metadata", - "registry", - "user_supplied", - "missing" - ] + "baseSha": { + "type": "string" }, - "reason": { + "headSha": { "type": "string" }, - "checkedAt": { + "mergeBaseSha": { "type": "string" }, - "stale": { - "type": "boolean" + "remoteTrackingSha": { + "type": "string" + }, + "changedFileCount": { + "type": "number" + }, + "testFileCount": { + "type": "number" + }, + "passedValidationCount": { + "type": "number" }, "warnings": { "type": "array", "items": { "type": "string" } + }, + "recommendation": { + "type": "string" } }, - "required": [ - "required", - "status", - "evidence", - "source", - "stale", + "required": [ + "status", + "changedFileCount", + "testFileCount", + "passedValidationCount", "warnings" ] }, - "effectiveEstimatedScore": { - "type": "number" + "lane": { + "$ref": "#/components/schemas/LaneAdvice" }, - "underlyingPotentialScore": { - "type": "number" + "roleContext": { + "$ref": "#/components/schemas/RoleContext" }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] + "preflight": { + "$ref": "#/components/schemas/LocalDiffPreflightResult" + }, + "scorePreview": { + "$ref": "#/components/schemas/ScorePreviewResult" + }, + "scenarioScorePreview": { + "type": "object", + "properties": { + "current": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + }, + "bestReasonableCase": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } }, - "detail": { - "type": "string" - } + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] }, - "required": [ - "code", - "severity", - "detail" - ] - } - }, - "gateDeltas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "gate": { - "type": "string", - "enum": [ - "open_pr_threshold", - "credibility_floor", - "linked_issue_multiplier" - ] - }, - "current": { - "type": "string" - }, - "projected": { - "type": "string" + "afterPendingMerges": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } }, - "explanation": { - "type": "string" - } + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] }, - "required": [ - "gate", - "current", - "projected", - "explanation" - ] - } - }, - "scenarioPreviews": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { + "afterApprovedPrsMerge": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { "type": "string" } }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + }, + "afterStalePrsClose": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" } }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } }, - "credibilityFloor": { - "type": "number" + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } }, - "credibilityObserved": { - "type": "number" + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] } }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { + "linkedIssueMultiplier": { "type": "object", "properties": { - "code": { + "mode": { "type": "string", "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" + "none", + "standard", + "maintainer" ] }, - "severity": { + "status": { "type": "string", "enum": [ - "blocker", - "reducer", - "context" + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" ] }, - "detail": { + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "code", - "severity", - "detail" + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" ] + }, + "deltaExplanation": { + "type": "string" } }, - "linkedIssueMultiplier": { + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + }, + "gateDeltas": { + "type": "array", + "items": { "type": "object", "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { + "gate": { "type": "string", "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" + "open_pr_threshold", + "credibility_floor", + "linked_issue_multiplier" ] }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" + "current": { + "type": "string" }, - "reason": { + "projected": { "type": "string" }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } + "explanation": { + "type": "string" } }, "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" + "gate", + "current", + "projected", + "explanation" + ] + } + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" ] - }, - "deltaExplanation": { - "type": "string" } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - } - }, - "scoreabilityStatus": { - "type": "string", - "enum": [ - "blocked", - "conditionally_scoreable", - "scoreable", - "hold" + } + }, + "required": [ + "current", + "bestReasonableCase", + "gateDeltas", + "blockedBy" ] }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendation": { + "observedPullRequestScenarios": { "type": "object", "properties": { - "level": { - "type": "string", - "enum": [ - "strong_fit", - "reasonable_fit", - "needs_work", - "hold" - ] + "approvedOrMergeable": { + "type": "number" }, - "actions": { + "stale": { + "type": "number" + }, + "closed": { + "type": "number" + }, + "draft": { + "type": "number" + }, + "blocked": { + "type": "number" + }, + "maintainerLane": { + "type": "number" + }, + "notes": { "type": "array", "items": { "type": "string" @@ -6399,469 +6490,294 @@ } }, "required": [ - "level", - "actions" - ] - } - }, - "required": [ - "repoFullName", - "generatedAt", - "scoringModelSnapshotId", - "activeModel", - "privateOnly", - "laneMath", - "scoreEstimate", - "linkedIssueMultiplier", - "gates", - "branchEligibility", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "gateDeltas", - "scenarioPreviews", - "scoreabilityStatus", - "warnings", - "assumptions", - "recommendation" - ] - }, - "RepoRewardRisk": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "repoFullName": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "roleContext": { - "$ref": "#/components/schemas/RoleContext" - }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" - }, - "recommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "unknown" + "approvedOrMergeable", + "stale", + "closed", + "draft", + "blocked", + "maintainerLane", + "notes" ] }, - "rewardUpside": { + "githubBranchStatus": { "type": "object", "properties": { - "relevantLane": { + "source": { "type": "string", "enum": [ - "direct_pr", - "issue_discovery", - "maintainer_lane", - "none" + "cached_github_data" ] }, - "repoSlice": { - "type": "number" - }, - "directPrSlice": { - "type": "number" - }, - "issueDiscoverySlice": { - "type": "number" + "status": { + "type": "string", + "enum": [ + "approved", + "failing_checks", + "needs_author", + "blocked", + "pending_review", + "no_pr", + "unknown" + ] }, - "maintainerCutSlice": { + "pullNumber": { "type": "number" }, - "labelMultiplier": { - "type": "number" + "title": { + "type": "string" }, - "issueMultiplier": { - "type": "number" + "reviewDecision": { + "type": "string", + "nullable": true }, - "estimatedScoreIfClean": { - "type": "number" + "mergeableState": { + "type": "string", + "nullable": true }, - "currentEstimatedScore": { - "type": "number" + "notes": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "relevantLane", - "repoSlice", - "directPrSlice", - "issueDiscoverySlice", - "maintainerCutSlice", - "labelMultiplier", - "issueMultiplier", - "estimatedScoreIfClean", - "currentEstimatedScore" + "source", + "status", + "notes" ] }, - "scoreBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "riskBreakdown": { + "branchEligibility": { "type": "object", "properties": { - "queueBurden": { + "required": { + "type": "boolean" + }, + "status": { "type": "string", "enum": [ - "low", - "medium", - "high", - "critical" + "eligible", + "ineligible", + "unknown", + "not_required" ] }, - "queueBurdenScore": { - "type": "number" - }, - "duplicateClusters": { - "type": "number" + "evidence": { + "type": "string", + "enum": [ + "provided", + "missing" + ] }, - "highRiskDuplicateClusters": { - "type": "number" + "source": { + "type": "string", + "enum": [ + "github_metadata", + "local_metadata", + "registry", + "user_supplied", + "missing" + ] }, - "closedPullRequestRate": { - "type": "number" + "reason": { + "type": "string" }, - "openPullRequests": { - "type": "number" + "checkedAt": { + "type": "string" }, - "credibility": { - "type": "number" + "stale": { + "type": "boolean" }, - "reviewChurnRisk": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] + "warnings": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "queueBurden", - "queueBurdenScore", - "duplicateClusters", - "highRiskDuplicateClusters", - "closedPullRequestRate", - "openPullRequests", - "credibility", - "reviewChurnRisk" + "required", + "status", + "evidence", + "source", + "stale", + "warnings" ] }, - "actionImpact": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "currentPreview": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "afterCleanupPreview": { - "type": "object", - "additionalProperties": { - "nullable": true - } + "rewardRisk": { + "$ref": "#/components/schemas/RepoRewardRisk" }, - "actions": { + "scoreBlockers": { "type": "array", "items": { - "$ref": "#/components/schemas/RewardRiskAction" + "type": "string" } }, - "whyThisHelps": { + "branchQualityBlockers": { "type": "array", "items": { "type": "string" } }, - "nextActions": { + "accountStateBlockers": { "type": "array", "items": { "type": "string" } }, - "summary": { - "type": "string" - } - }, - "required": [ - "login", - "repoFullName", - "generatedAt", - "roleContext", - "lane", - "recommendation", - "rewardUpside", - "scoreBlockers", - "riskBreakdown", - "actionImpact", - "currentPreview", - "afterCleanupPreview", - "actions", - "whyThisHelps", - "nextActions", - "summary" - ] - }, - "RewardRiskAction": { - "type": "object", - "properties": { - "actionKind": { - "type": "string", - "enum": [ - "cleanup_existing_prs", - "land_existing_prs", - "close_or_withdraw_low_fit_prs", - "open_new_direct_pr", - "file_issue_discovery", - "maintainer_lane_improve_repo", - "maintainer_cut_readiness" - ] - }, - "repoFullName": { + "recommendedRerunCondition": { "type": "string" }, - "priorityScore": { - "type": "number" - }, - "laneValueScore": { - "type": "number" - }, - "scoreabilityScore": { - "type": "number" - }, - "personalFitScore": { - "type": "number" - }, - "riskPenalty": { - "type": "number" - }, - "maintainerFrictionPenalty": { - "type": "number" - }, - "actionLeverageScore": { - "type": "number" - }, - "whyThisHelps": { - "type": "array", - "items": { - "type": "string" - } - }, - "nextActions": { + "localFindings": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Finding" } - } - }, - "required": [ - "actionKind", - "repoFullName", - "priorityScore", - "laneValueScore", - "scoreabilityScore", - "personalFitScore", - "riskPenalty", - "maintainerFrictionPenalty", - "actionLeverageScore", - "whyThisHelps", - "nextActions" - ] - }, - "LocalWorkspaceIntelligence": { - "type": "object", - "properties": { - "version": { - "type": "number", - "enum": [ - 2 - ] }, - "sourceUpload": { + "maintainerFit": { "type": "object", "properties": { - "enabled": { - "type": "boolean", + "recommendation": { + "type": "string", "enum": [ - false + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "unknown" ] }, - "detail": { - "type": "string" - } - }, - "required": [ - "enabled", - "detail" - ] - }, - "branch": { - "type": "object", - "properties": { - "name": { - "type": "string" + "reviewBurden": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] }, - "baseRef": { - "type": "string" + "role": { + "type": "string", + "enum": [ + "outside_contributor", + "repo_maintainer", + "org_member", + "collaborator", + "owner", + "unknown" + ] }, - "headSha": { - "type": "string" + "maintainerLane": { + "type": "boolean" }, - "pendingCommitCount": { - "type": "number" + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "risks": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "pendingCommitCount" + "recommendation", + "reviewBurden", + "role", + "maintainerLane", + "reasons", + "risks" ] }, - "changedFiles": { + "manifestGuidance": { "type": "object", "properties": { - "total": { - "type": "number" - }, - "added": { - "type": "number" - }, - "modified": { - "type": "number" + "present": { + "type": "boolean" }, - "deleted": { - "type": "number" + "source": { + "type": "string", + "enum": [ + "repo_file", + "api_record", + "none" + ] }, - "renamed": { - "type": "number" + "linkedIssuePolicy": { + "type": "string", + "enum": [ + "required", + "preferred", + "optional" + ] }, - "binary": { - "type": "number" + "issueDiscoveryPolicy": { + "type": "string", + "enum": [ + "encouraged", + "neutral", + "discouraged" + ] }, - "paths": { + "matchedWantedPaths": { "type": "array", "items": { "type": "string" } - } - }, - "required": [ - "total", - "added", - "modified", - "deleted", - "renamed", - "binary", - "paths" - ] - }, - "testEvidence": { - "type": "object", - "properties": { - "level": { - "type": "string", - "enum": [ - "test_files", - "validation_commands", - "both", - "none" - ] }, - "testFileCount": { - "type": "number" + "matchedBlockedPaths": { + "type": "array", + "items": { + "type": "string" + } }, - "passedValidationCount": { - "type": "number" + "preferredLabelHits": { + "type": "array", + "items": { + "type": "string" + } }, - "commands": { + "findings": { "type": "array", "items": { "type": "object", "properties": { - "command": { + "code": { "type": "string" }, - "status": { + "severity": { "type": "string", "enum": [ - "passed", - "failed", - "not_run" + "info", + "warning", + "critical" ] }, - "summary": { + "title": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "action": { "type": "string" } }, "required": [ - "command", - "status" + "code", + "severity", + "title", + "detail" ] } - } - }, - "required": [ - "level", - "testFileCount", - "passedValidationCount", - "commands" - ] - }, - "linkedIssues": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseFreshness": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "possibly_stale", - "unknown" - ] }, - "baseRef": { - "type": "string" - }, - "baseSha": { - "type": "string" - }, - "headSha": { - "type": "string" - }, - "mergeBaseSha": { - "type": "string" - }, - "remoteTrackingSha": { - "type": "string" - }, - "changedFileCount": { - "type": "number" - }, - "testFileCount": { - "type": "number" - }, - "passedValidationCount": { - "type": "number" + "publicNextSteps": { + "type": "array", + "items": { + "type": "string" + } }, "warnings": { "type": "array", @@ -6869,59 +6785,116 @@ "type": "string" } }, - "recommendation": { + "summary": { "type": "string" } }, "required": [ - "status", - "changedFileCount", - "testFileCount", - "passedValidationCount", - "warnings" + "present", + "source", + "linkedIssuePolicy", + "issueDiscoveryPolicy", + "matchedWantedPaths", + "matchedBlockedPaths", + "preferredLabelHits", + "findings", + "publicNextSteps", + "warnings", + "summary" ] }, - "ciStatusHints": { - "type": "array", - "items": { - "type": "string" - } - }, - "localScorerDiagnostics": { + "prPacket": { "type": "object", "properties": { - "mode": { + "titleSuggestion": { "type": "string" }, - "activeModel": { + "markdown": { "type": "string" }, - "warnings": { + "bodySections": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "heading": { + "type": "string" + }, + "lines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "heading", + "lines" + ] } }, - "metadataOnly": { - "type": "boolean" - } - }, - "required": [ - "mode", - "warnings", - "metadataOnly" - ] - }, - "blockers": { - "type": "object", - "properties": { - "branchQuality": { + "reviewerNotes": { "type": "array", "items": { "type": "string" } }, - "accountState": { + "validationSummary": { + "type": "object", + "properties": { + "passed": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "notRun": { + "type": "number" + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "command": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "passed", + "failed", + "not_run", + "skipped", + "focused", + "unknown" + ] + }, + "summary": { + "type": "string" + }, + "durationMs": { + "type": "number" + }, + "exitCode": { + "type": "number" + } + }, + "required": [ + "command", + "status" + ] + } + } + }, + "required": [ + "passed", + "failed", + "notRun", + "commands" + ] + }, + "publicSafeWarnings": { "type": "array", "items": { "type": "string" @@ -6929,25 +6902,52 @@ } }, "required": [ - "branchQuality", - "accountState" + "titleSuggestion", + "markdown", + "bodySections", + "reviewerNotes", + "validationSummary", + "publicSafeWarnings" ] }, - "rerunWhen": { + "nextActions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RewardRiskAction" + } + }, + "workspaceIntelligence": { + "$ref": "#/components/schemas/LocalWorkspaceIntelligence" + }, + "summary": { "type": "string" } }, "required": [ - "version", - "sourceUpload", - "branch", - "changedFiles", - "testEvidence", - "linkedIssues", + "login", + "repoFullName", + "generatedAt", "baseFreshness", - "ciStatusHints", - "blockers", - "rerunWhen" + "lane", + "roleContext", + "preflight", + "scorePreview", + "scenarioScorePreview", + "observedPullRequestScenarios", + "githubBranchStatus", + "branchEligibility", + "rewardRisk", + "scoreBlockers", + "branchQualityBlockers", + "accountStateBlockers", + "recommendedRerunCondition", + "localFindings", + "maintainerFit", + "manifestGuidance", + "prPacket", + "nextActions", + "workspaceIntelligence", + "summary" ] }, "MaintainerPacket": { @@ -7023,7 +7023,7 @@ "suggestedActions" ] }, - "MaintainerLaneReport": { + "ContributorIntakeHealth": { "type": "object", "properties": { "repoFullName": { @@ -7032,23 +7032,38 @@ "generatedAt": { "type": "string" }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" + "level": { + "type": "string", + "enum": [ + "healthy", + "watch", + "strained", + "blocked" + ] }, - "maintainerCut": { + "score": { "type": "number" }, - "maintainerCutConfigured": { - "type": "boolean" - }, "queueHealth": { - "$ref": "#/components/schemas/QueueHealth" + "type": "object", + "additionalProperties": { + "nullable": true + } }, - "configQuality": { - "$ref": "#/components/schemas/ConfigQuality" + "configLevel": { + "type": "string", + "enum": [ + "excellent", + "good", + "needs_attention", + "fragile" + ] }, - "contributorIntakeHealth": { - "$ref": "#/components/schemas/ContributorIntakeHealth" + "duplicateClusters": { + "type": "number" + }, + "reviewablePullRequests": { + "type": "number" }, "summary": { "type": "string" @@ -7063,17 +7078,17 @@ "required": [ "repoFullName", "generatedAt", - "lane", - "maintainerCut", - "maintainerCutConfigured", + "level", + "score", "queueHealth", - "configQuality", - "contributorIntakeHealth", + "configLevel", + "duplicateClusters", + "reviewablePullRequests", "summary", "findings" ] }, - "ContributorIntakeHealth": { + "MaintainerLaneReport": { "type": "object", "properties": { "repoFullName": { @@ -7082,38 +7097,23 @@ "generatedAt": { "type": "string" }, - "level": { - "type": "string", - "enum": [ - "healthy", - "watch", - "strained", - "blocked" - ] + "lane": { + "$ref": "#/components/schemas/LaneAdvice" }, - "score": { + "maintainerCut": { "type": "number" }, - "queueHealth": { - "type": "object", - "additionalProperties": { - "nullable": true - } + "maintainerCutConfigured": { + "type": "boolean" }, - "configLevel": { - "type": "string", - "enum": [ - "excellent", - "good", - "needs_attention", - "fragile" - ] + "queueHealth": { + "$ref": "#/components/schemas/QueueHealth" }, - "duplicateClusters": { - "type": "number" + "configQuality": { + "$ref": "#/components/schemas/ConfigQuality" }, - "reviewablePullRequests": { - "type": "number" + "contributorIntakeHealth": { + "$ref": "#/components/schemas/ContributorIntakeHealth" }, "summary": { "type": "string" @@ -7128,12 +7128,12 @@ "required": [ "repoFullName", "generatedAt", - "level", - "score", + "lane", + "maintainerCut", + "maintainerCutConfigured", "queueHealth", - "configLevel", - "duplicateClusters", - "reviewablePullRequests", + "configQuality", + "contributorIntakeHealth", "summary", "findings" ] @@ -7612,29 +7612,177 @@ "privateTrustEnabled": { "type": "boolean" }, - "createdAt": { - "type": "string", - "nullable": true + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "repoFullName", + "commentMode", + "publicSignalLevel", + "checkRunMode", + "checkRunDetailLevel", + "autoLabelEnabled", + "gittensorLabel", + "createMissingLabel", + "publicSurface", + "includeMaintainerAuthors", + "requireLinkedIssue", + "backfillEnabled", + "privateTrustEnabled" + ] + }, + "InstallationHealth": { + "type": "object", + "properties": { + "installationId": { + "type": "number" + }, + "accountLogin": { + "type": "string" + }, + "repositorySelection": { + "type": "string", + "nullable": true + }, + "installedReposCount": { + "type": "number" + }, + "registeredInstalledCount": { + "type": "number" + }, + "status": { + "type": "string", + "enum": [ + "healthy", + "needs_attention", + "broken" + ] + }, + "missingPermissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "missingEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "checkedAt": { + "type": "string" + }, + "errorSummary": { + "type": "string", + "nullable": true + }, + "requiredPermissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "requiredEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "optionalVisibleEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "permissionRemediation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string" + }, + "requiredAccess": { + "type": "string" + }, + "currentAccess": { + "type": "string" + }, + "ok": { + "type": "boolean" + }, + "action": { + "type": "string" + } + }, + "required": [ + "permission", + "requiredAccess", + "currentAccess", + "ok", + "action" + ] + } + }, + "eventRemediation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "ok": { + "type": "boolean" + }, + "action": { + "type": "string" + } + }, + "required": [ + "event", + "ok", + "action" + ] + } }, - "updatedAt": { - "type": "string", - "nullable": true + "repairSteps": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "repoFullName", - "commentMode", - "publicSignalLevel", - "checkRunMode", - "checkRunDetailLevel", - "autoLabelEnabled", - "gittensorLabel", - "createMissingLabel", - "publicSurface", - "includeMaintainerAuthors", - "requireLinkedIssue", - "backfillEnabled", - "privateTrustEnabled" + "installationId", + "accountLogin", + "installedReposCount", + "registeredInstalledCount", + "status", + "missingPermissions", + "missingEvents", + "permissions", + "events", + "checkedAt" ] }, "InstallationRepair": { @@ -7779,199 +7927,17 @@ "type": "string" } }, - "required": [ - "mode", - "enabled", - "affectedRepoCount", - "requiredPermissions", - "summary", - "action" - ] - } - }, - "eventDiagnostics": { - "type": "array", - "items": { - "type": "object", - "properties": { - "event": { - "type": "string" - }, - "missing": { - "type": "boolean" - }, - "optional": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "action": { - "type": "string" - } - }, - "required": [ - "event", - "missing", - "optional", - "summary", - "action" - ] - } - }, - "repairSteps": { - "type": "array", - "items": { - "type": "string" - } - }, - "refresh": { - "type": "object", - "properties": { - "method": { - "type": "string", - "enum": [ - "POST" - ] - }, - "path": { - "type": "string" - }, - "lastCheckedAt": { - "type": "string" - } - }, - "required": [ - "method", - "path", - "lastCheckedAt" - ] - }, - "refreshed": { - "type": "boolean" - } - }, - "required": [ - "generatedAt", - "installation", - "installedRepos", - "requiredPermissions", - "optionalPermissions", - "requiredEvents", - "optionalEvents", - "modeImpacts", - "eventDiagnostics", - "repairSteps", - "refresh" - ] - }, - "InstallationHealth": { - "type": "object", - "properties": { - "installationId": { - "type": "number" - }, - "accountLogin": { - "type": "string" - }, - "repositorySelection": { - "type": "string", - "nullable": true - }, - "installedReposCount": { - "type": "number" - }, - "registeredInstalledCount": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "healthy", - "needs_attention", - "broken" - ] - }, - "missingPermissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "missingEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "permissions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "events": { - "type": "array", - "items": { - "type": "string" - } - }, - "checkedAt": { - "type": "string" - }, - "errorSummary": { - "type": "string", - "nullable": true - }, - "requiredPermissions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "requiredEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "optionalVisibleEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "permissionRemediation": { - "type": "array", - "items": { - "type": "object", - "properties": { - "permission": { - "type": "string" - }, - "requiredAccess": { - "type": "string" - }, - "currentAccess": { - "type": "string" - }, - "ok": { - "type": "boolean" - }, - "action": { - "type": "string" - } - }, - "required": [ - "permission", - "requiredAccess", - "currentAccess", - "ok", + "required": [ + "mode", + "enabled", + "affectedRepoCount", + "requiredPermissions", + "summary", "action" ] } }, - "eventRemediation": { + "eventDiagnostics": { "type": "array", "items": { "type": "object", @@ -7979,16 +7945,24 @@ "event": { "type": "string" }, - "ok": { + "missing": { + "type": "boolean" + }, + "optional": { "type": "boolean" }, + "summary": { + "type": "string" + }, "action": { "type": "string" } }, "required": [ "event", - "ok", + "missing", + "optional", + "summary", "action" ] } @@ -7998,19 +7972,45 @@ "items": { "type": "string" } + }, + "refresh": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "POST" + ] + }, + "path": { + "type": "string" + }, + "lastCheckedAt": { + "type": "string" + } + }, + "required": [ + "method", + "path", + "lastCheckedAt" + ] + }, + "refreshed": { + "type": "boolean" } }, "required": [ - "installationId", - "accountLogin", - "installedReposCount", - "registeredInstalledCount", - "status", - "missingPermissions", - "missingEvents", - "permissions", - "events", - "checkedAt" + "generatedAt", + "installation", + "installedRepos", + "requiredPermissions", + "optionalPermissions", + "requiredEvents", + "optionalEvents", + "modeImpacts", + "eventDiagnostics", + "repairSteps", + "refresh" ] }, "RepoSettingsPreview": { @@ -8229,8 +8229,7 @@ "bot_author", "maintainer_author", "miner_detection_unavailable", - "not_official_gittensor_miner", - null + "not_official_gittensor_miner" ] }, "actions": { @@ -8655,6 +8654,92 @@ "payload" ] }, + "AgentActionExplanationCard": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "whyNow": { + "type": "string" + }, + "scoreabilityBlocker": { + "type": "string" + }, + "risk": { + "type": "string" + }, + "maintainerFriction": { + "type": "string" + }, + "expectedImpact": { + "type": "string" + }, + "blockerGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "category": { + "type": "string", + "enum": [ + "branch", + "account", + "queue", + "scoreability", + "risk", + "maintainer", + "unknown" + ] + }, + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "category", + "items" + ] + } + }, + "rerunWhen": { + "type": "string" + }, + "publicSafe": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "whyNow": { + "type": "string" + }, + "rerunWhen": { + "type": "string" + } + }, + "required": [ + "summary", + "whyNow", + "rerunWhen" + ] + } + }, + "required": [ + "summary", + "whyNow", + "scoreabilityBlocker", + "risk", + "maintainerFriction", + "expectedImpact", + "blockerGroups", + "rerunWhen", + "publicSafe" + ] + }, "AgentAction": { "type": "object", "properties": { @@ -8718,145 +8803,59 @@ }, "maintainerImpact": { "type": "string", - "nullable": true - }, - "blockedBy": { - "type": "array", - "items": { - "type": "string" - } - }, - "rerunWhen": { - "type": "string", - "nullable": true - }, - "publicSafeSummary": { - "type": "string" - }, - "explanationCard": { - "$ref": "#/components/schemas/AgentActionExplanationCard" - }, - "approvalRequired": { - "type": "boolean" - }, - "safetyClass": { - "type": "string", - "enum": [ - "private", - "public_safe", - "approval_required" - ] - }, - "payload": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "createdAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "runId", - "actionType", - "status", - "recommendation", - "why", - "blockedBy", - "publicSafeSummary", - "explanationCard", - "approvalRequired", - "safetyClass", - "payload" - ] - }, - "AgentActionExplanationCard": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "whyNow": { - "type": "string" - }, - "scoreabilityBlocker": { - "type": "string" - }, - "risk": { - "type": "string" - }, - "maintainerFriction": { - "type": "string" - }, - "expectedImpact": { - "type": "string" - }, - "blockerGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "enum": [ - "branch", - "account", - "queue", - "scoreability", - "risk", - "maintainer", - "unknown" - ] - }, - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "category", - "items" - ] + "nullable": true + }, + "blockedBy": { + "type": "array", + "items": { + "type": "string" } }, "rerunWhen": { + "type": "string", + "nullable": true + }, + "publicSafeSummary": { "type": "string" }, - "publicSafe": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "whyNow": { - "type": "string" - }, - "rerunWhen": { - "type": "string" - } - }, - "required": [ - "summary", - "whyNow", - "rerunWhen" + "explanationCard": { + "$ref": "#/components/schemas/AgentActionExplanationCard" + }, + "approvalRequired": { + "type": "boolean" + }, + "safetyClass": { + "type": "string", + "enum": [ + "private", + "public_safe", + "approval_required" ] + }, + "payload": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true } }, "required": [ - "summary", - "whyNow", - "scoreabilityBlocker", - "risk", - "maintainerFriction", - "expectedImpact", - "blockerGroups", - "rerunWhen", - "publicSafe" + "id", + "runId", + "actionType", + "status", + "recommendation", + "why", + "blockedBy", + "publicSafeSummary", + "explanationCard", + "approvalRequired", + "safetyClass", + "payload" ] }, "AgentContextSnapshot": { @@ -9225,236 +9224,48 @@ "degradedRepos": { "type": "number" }, - "blockedRepos": { - "type": "number" - }, - "partialRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "cappedRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "staleRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "rateLimitedRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "nextRecoverableAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "status", - "repoCount", - "completeRepos", - "degradedRepos", - "blockedRepos", - "partialRepos", - "cappedRepos", - "staleRepos", - "rateLimitedRepos" - ] - }, - "SyncStatus": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string" - }, - "signalFidelity": { - "$ref": "#/components/schemas/SignalFidelity" - }, - "freshnessSlo": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "degraded", - "blocked" - ] - }, - "generatedAt": { - "type": "string" - }, - "staleCount": { - "type": "number" - }, - "degradedCount": { - "type": "number" - }, - "blockedCount": { - "type": "number" - }, - "missingCount": { - "type": "number" - }, - "launchBlockingCount": { - "type": "number" - }, - "repairRecommended": { - "type": "boolean" - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "area": { - "type": "string" - }, - "targetKey": { - "type": "string" - }, - "status": { - "type": "string" - }, - "launchBlocking": { - "type": "boolean" - }, - "ageSeconds": { - "type": "number" - }, - "sloSeconds": { - "type": "number" - }, - "breachSeconds": { - "type": "number" - }, - "observedAt": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "string" - } - }, - "required": [ - "area", - "targetKey", - "status", - "launchBlocking", - "sloSeconds", - "summary" - ] - } - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "status", - "generatedAt", - "staleCount", - "degradedCount", - "blockedCount", - "missingCount", - "launchBlockingCount", - "repairRecommended", - "items", - "warnings" - ] - }, - "coreSignalFidelity": { - "$ref": "#/components/schemas/CoreSignalFidelity" - }, - "upstreamDrift": { - "$ref": "#/components/schemas/UpstreamStatus" - }, - "historyCoverage": { - "type": "string", - "enum": [ - "sampled", - "counts_only", - "full" - ] - }, - "refreshingRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "waitingForRateLimitRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "repositories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoSyncState" - } - }, - "segments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoSyncSegment" - } + "blockedRepos": { + "type": "number" }, - "githubTotals": { + "partialRepos": { "type": "array", "items": { - "$ref": "#/components/schemas/RepoGithubTotalsSnapshot" + "type": "string" } }, - "pullRequestDetailSync": { + "cappedRepos": { "type": "array", "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } + "type": "string" } }, - "installations": { + "staleRepos": { "type": "array", "items": { - "$ref": "#/components/schemas/InstallationHealth" + "type": "string" } }, - "rateLimits": { + "rateLimitedRepos": { "type": "array", "items": { - "$ref": "#/components/schemas/GitHubRateLimitObservation" + "type": "string" } + }, + "nextRecoverableAt": { + "type": "string", + "nullable": true } }, "required": [ - "generatedAt", - "signalFidelity", - "freshnessSlo", - "coreSignalFidelity", - "upstreamDrift", - "historyCoverage", - "refreshingRepos", - "waitingForRateLimitRepos", - "repositories", - "segments", - "githubTotals", - "pullRequestDetailSync", - "installations", - "rateLimits" + "status", + "repoCount", + "completeRepos", + "degradedRepos", + "blockedRepos", + "partialRepos", + "cappedRepos", + "staleRepos", + "rateLimitedRepos" ] }, "CoreSignalFidelity": { @@ -9520,91 +9331,6 @@ "historyCoverage" ] }, - "UpstreamStatus": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "current", - "drift_detected", - "stale", - "unavailable" - ] - }, - "latestCommitSha": { - "type": "string", - "nullable": true - }, - "latestRulesetId": { - "type": "string", - "nullable": true - }, - "latestRulesetGeneratedAt": { - "type": "string", - "nullable": true - }, - "activeModel": { - "type": "string", - "nullable": true, - "enum": [ - "current_density_model", - "pending_saturation_model", - "exponential_saturation_model", - "unknown", - null - ] - }, - "highestSeverity": { - "type": "string", - "nullable": true, - "enum": [ - "low", - "medium", - "high", - "blocking", - null - ] - }, - "affectedAreas": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "registry", - "scoring_model", - "issue_discovery", - "mirror_linkage", - "language_weights", - "source" - ] - } - }, - "registryHyperparameterDrift": { - "$ref": "#/components/schemas/RegistryHyperparameterDriftSummary" - }, - "openReportCount": { - "type": "number" - }, - "reports": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpstreamDriftReport" - } - } - }, - "required": [ - "generatedAt", - "status", - "affectedAreas", - "registryHyperparameterDrift", - "openReportCount", - "reports" - ] - }, "RegistryHyperparameterDriftSummary": { "type": "object", "properties": { @@ -9705,71 +9431,154 @@ ] } }, - "source": { - "type": "object", - "properties": { - "repo": { - "type": "string", - "nullable": true - }, - "ref": { - "type": "string", - "nullable": true - }, - "commitSha": { - "type": "string", - "nullable": true - } - }, - "required": [ - "repo", - "ref" - ] + "source": { + "type": "object", + "properties": { + "repo": { + "type": "string", + "nullable": true + }, + "ref": { + "type": "string", + "nullable": true + }, + "commitSha": { + "type": "string", + "nullable": true + } + }, + "required": [ + "repo", + "ref" + ] + }, + "recommendedFollowUp": { + "type": "array", + "items": { + "type": "string" + } + }, + "previousRulesetId": { + "type": "string", + "nullable": true + }, + "currentRulesetId": { + "type": "string", + "nullable": true + }, + "issueNumber": { + "type": "number", + "nullable": true + }, + "issueUrl": { + "type": "string", + "nullable": true + }, + "payload": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "generatedAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "id", + "fingerprint", + "severity", + "status", + "summary", + "affectedAreas", + "generatedAt", + "updatedAt" + ] + }, + "UpstreamStatus": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "current", + "drift_detected", + "stale", + "unavailable" + ] + }, + "latestCommitSha": { + "type": "string", + "nullable": true + }, + "latestRulesetId": { + "type": "string", + "nullable": true + }, + "latestRulesetGeneratedAt": { + "type": "string", + "nullable": true + }, + "activeModel": { + "type": "string", + "nullable": true, + "enum": [ + "current_density_model", + "pending_saturation_model", + "exponential_saturation_model", + "unknown" + ] + }, + "highestSeverity": { + "type": "string", + "nullable": true, + "enum": [ + "low", + "medium", + "high", + "blocking" + ] + }, + "affectedAreas": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "registry", + "scoring_model", + "issue_discovery", + "mirror_linkage", + "language_weights", + "source" + ] + } + }, + "registryHyperparameterDrift": { + "$ref": "#/components/schemas/RegistryHyperparameterDriftSummary" }, - "recommendedFollowUp": { + "openReportCount": { + "type": "number" + }, + "reports": { "type": "array", "items": { - "type": "string" - } - }, - "previousRulesetId": { - "type": "string", - "nullable": true - }, - "currentRulesetId": { - "type": "string", - "nullable": true - }, - "issueNumber": { - "type": "number", - "nullable": true - }, - "issueUrl": { - "type": "string", - "nullable": true - }, - "payload": { - "type": "object", - "additionalProperties": { - "nullable": true + "$ref": "#/components/schemas/UpstreamDriftReport" } - }, - "generatedAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" } }, "required": [ - "id", - "fingerprint", - "severity", + "generatedAt", "status", - "summary", "affectedAreas", - "generatedAt", - "updatedAt" + "registryHyperparameterDrift", + "openReportCount", + "reports" ] }, "RepoGithubTotalsSnapshot": { @@ -9834,6 +9643,194 @@ "fetchedAt" ] }, + "SyncStatus": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string" + }, + "signalFidelity": { + "$ref": "#/components/schemas/SignalFidelity" + }, + "freshnessSlo": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "fresh", + "degraded", + "blocked" + ] + }, + "generatedAt": { + "type": "string" + }, + "staleCount": { + "type": "number" + }, + "degradedCount": { + "type": "number" + }, + "blockedCount": { + "type": "number" + }, + "missingCount": { + "type": "number" + }, + "launchBlockingCount": { + "type": "number" + }, + "repairRecommended": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "area": { + "type": "string" + }, + "targetKey": { + "type": "string" + }, + "status": { + "type": "string" + }, + "launchBlocking": { + "type": "boolean" + }, + "ageSeconds": { + "type": "number" + }, + "sloSeconds": { + "type": "number" + }, + "breachSeconds": { + "type": "number" + }, + "observedAt": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string" + } + }, + "required": [ + "area", + "targetKey", + "status", + "launchBlocking", + "sloSeconds", + "summary" + ] + } + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "status", + "generatedAt", + "staleCount", + "degradedCount", + "blockedCount", + "missingCount", + "launchBlockingCount", + "repairRecommended", + "items", + "warnings" + ] + }, + "coreSignalFidelity": { + "$ref": "#/components/schemas/CoreSignalFidelity" + }, + "upstreamDrift": { + "$ref": "#/components/schemas/UpstreamStatus" + }, + "historyCoverage": { + "type": "string", + "enum": [ + "sampled", + "counts_only", + "full" + ] + }, + "refreshingRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "waitingForRateLimitRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoSyncState" + } + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoSyncSegment" + } + }, + "githubTotals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoGithubTotalsSnapshot" + } + }, + "pullRequestDetailSync": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "installations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallationHealth" + } + }, + "rateLimits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GitHubRateLimitObservation" + } + } + }, + "required": [ + "generatedAt", + "signalFidelity", + "freshnessSlo", + "coreSignalFidelity", + "upstreamDrift", + "historyCoverage", + "refreshingRepos", + "waitingForRateLimitRepos", + "repositories", + "segments", + "githubTotals", + "pullRequestDetailSync", + "installations", + "rateLimits" + ] + }, "Readiness": { "type": "object", "properties": { From 2807f0429ba69478c9eb887989ada3e6f771b98a Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Wed, 3 Jun 2026 08:02:58 -0400 Subject: [PATCH 4/6] fix(signals): include recent merged PRs in outcome patterns --- src/signals/engine.ts | 9 ++++++- test/unit/repo-outcome-patterns.test.ts | 33 ++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/signals/engine.ts b/src/signals/engine.ts index b961f0081a..4b8b53d4c4 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -1863,17 +1863,24 @@ export function buildRepoOutcomePatterns(args: { // Include merged PRs that exist only in recent_merged_pull_requests (absent from pull_requests). // Derive maintainer lane and author role from payload.author_association when present so that // owner/member/collaborator merges are not counted in the outside-contributor merge rate. + // Conservative fallback: when author_association is absent or unrecognised, treat as maintainer + // lane so the record is excluded from outside-contributor statistics rather than silently + // inflating the outside-contributor merge rate with unclassifiable data. ...(args.recentMergedPullRequests ?? []) .filter((record) => record.repoFullName.toLowerCase() === repoKey && !knownPrNumbers.has(record.number)) .map((record): RepoOutcomePullRequest => { const payloadAssociation = typeof record.payload["author_association"] === "string" ? record.payload["author_association"] : undefined; + const knownOutsider = payloadAssociation === "NONE" || payloadAssociation === "CONTRIBUTOR" || payloadAssociation === "FIRST_TIME_CONTRIBUTOR" || payloadAssociation === "FIRST_TIMER"; const isMaintainer = isMaintainerAssociation(payloadAssociation); + // When association is unknown we cannot safely classify the lane — conservative fallback + // keeps the record out of the outside-contributor decided set. + const maintainerLane = isMaintainer || !knownOutsider; return { number: record.number, bucket: "merged", decided: true, merged: true, - maintainerLane: isMaintainer, + maintainerLane, linked: record.linkedIssues.length > 0, labels: [...record.labels].sort(), filePaths: [...record.changedFiles].sort(), diff --git a/test/unit/repo-outcome-patterns.test.ts b/test/unit/repo-outcome-patterns.test.ts index ca8af3e236..51bef38547 100644 --- a/test/unit/repo-outcome-patterns.test.ts +++ b/test/unit/repo-outcome-patterns.test.ts @@ -397,6 +397,7 @@ describe("buildRepoOutcomePatterns", () => { it("includes merged-only PRs absent from pull_requests in the analysis", () => { // Repo has 5 open/closed PRs in pull_requests and 200 merged PRs only in recent_merged_pull_requests. + // The merged-only records carry author_association: "NONE" so they are outside-contributor lane. // Without the fix: merge rate = 0/3, triggering false "high closure risk". // With the fix: merge rate = ~0.97 from the full unified set. const pullRequests: PullRequestRecord[] = [ @@ -415,7 +416,7 @@ describe("buildRepoOutcomePatterns", () => { labels: ["bug"], linkedIssues: [200 + i], changedFiles: ["src/feature.ts"], - payload: {}, + payload: { author_association: "NONE" }, })); const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); @@ -427,6 +428,36 @@ describe("buildRepoOutcomePatterns", () => { expect(result.successPatterns.some((p) => p.title === "Outside contributors merge well here")).toBe(true); }); + it("conservatively excludes merged-only PRs with unknown author_association from outside-contributor statistics", () => { + // Merged-only records with payload: {} (no author_association) cannot be safely classified. + // Conservative fallback: treat as maintainer lane so they do not inflate outside-contributor merge rate. + const pullRequests: PullRequestRecord[] = [ + closedPr(1), + closedPr(2), + mergedPr(3, { authorAssociation: "NONE" }), + ]; + const recentMergedPullRequests: RecentMergedPullRequestRecord[] = Array.from({ length: 10 }, (_, i) => ({ + repoFullName: REPO, + number: 100 + i, + title: `Unknown-assoc PR ${100 + i}`, + authorLogin: "dev", + mergedAt: "2026-05-01T00:00:00.000Z", + labels: [], + linkedIssues: [], + changedFiles: [], + payload: {}, + })); + const result = buildRepoOutcomePatterns({ repo: repo(), repoFullName: REPO, pullRequests, recentMergedPullRequests }); + + expect(result.totals.analyzed).toBe(13); + expect(result.totals.maintainerLanePullRequests).toBe(10); + expect(result.totals.outsideContributorPullRequests).toBe(3); + // Outside-contributor rate uses only the 3 classifiable outside PRs (1 merged, 2 closed). + expect(result.outsideContributorMergeRate).toBeCloseTo(1 / 3, 4); + // Maintainer lane rate includes the 10 unknown-association merged PRs. + expect(result.maintainerLaneMergeRate).toBeCloseTo(1, 4); + }); + it("does not double-count PRs present in both pull_requests and recent_merged_pull_requests", () => { const pullRequests = [mergedPr(1), mergedPr(2), closedPr(3)]; const recentMergedPullRequests: RecentMergedPullRequestRecord[] = [ From 90552a92c7ad8d56da2dea0c6f9b24507581e46f Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Wed, 3 Jun 2026 08:14:44 -0400 Subject: [PATCH 5/6] chore(ui): regenerate stale openapi artifact --- .../public/downloads/gittensory-extension.zip | Bin 0 -> 20928 bytes apps/gittensory-ui/public/openapi.json | 7533 +++++++++-------- 2 files changed, 3768 insertions(+), 3765 deletions(-) create mode 100644 apps/gittensory-ui/public/downloads/gittensory-extension.zip diff --git a/apps/gittensory-ui/public/downloads/gittensory-extension.zip b/apps/gittensory-ui/public/downloads/gittensory-extension.zip new file mode 100644 index 0000000000000000000000000000000000000000..86d1bc0c32b98d2eab630c8d7d3a9c950d58a4fb GIT binary patch literal 20928 zcmcIs&2J;gb(b9{4kihZg98LG64drC)|4$ar5Vi^S09+2)$UGqK9r#rupy5*EwV`U zs>!Cio6^WyA%8)R`B##Qj{$-l^B3fnV{XaS`Mvk5s;iq#O5=5AS2JSQtE%_?UcFb% z!>|762Y1%w&j)Ki(trI||Ni5(HTwA>9!B%xH2fyl?`COMs6jf-3-#H-=TE+Ve$;<* z_^kix^|LRYy;Qp@I4z1<-tBb8aZ%`Lo@STrXcmW&E>3l(qa+;a^Wc*^m6Z;Desu7% z_w3cne(#{i|Gqx>`>&t9KKQKv0uP>iaX>5gbfKcD((h>9IGw6o=lpMxp6RKIr|Jv0 zrw5hJ3IONf&6^(l{II^~!NO)hJkIn`rJ2g~Id&d~>L~~-w2IUy)A^~lcLQdGN0s{C z(W}=WvH#VW)(2*sCla$J4F~-0#5#MhwkIL^1~bkN)@pW0^lGN*MRZhkKsN zCT1P}=#TdX=}hP4BJ!Cbk|-~pKrQsNhzB5l$eT4h1@tv&7NvRq>gki`PRxenV-V(Z zA@s>2s+$HKJ<9-?m}P@P$iip?`WtuNIPAZ8cJ$@fpZ1SleRc4%fB5>~^JhQrA3ixc zI(SXG-}zN*d^-Dfe465Cj-MPq*|)HS)A>n%78UFLPW*{s1ePMDfA#tojvM|;<09`L zNA1yO`|+Er2iw;l(M+p1qxp0|N?mGNuSm0KtXqTAES>1*@tFob<0L(alB3f&59Rqf zD_1;Htq)4T{V8l6XR5}hPE4Awt^M6dCa>0+Ku)s^CXyQ;*=q9hn?DB8JkoCXxM>w1wl(=?kz zN&FlA#2QoUJWA$TC=hMTq6_e;xSZ*9qA?!wjNMHWxTf%^Dkc^cyLq_wX0s~@`! zK9GnjvPLjhv2d29MLI|m^#N@z9+Wqy!P7J^rqM*p zAhU`dEg9ds`!L+Ze_Mf-l;iWFzb0Ho6b^`XOxg9YloTv`aB7G#@@ih^x=98}nx5sP zjquE0&QA_?mZ#Gwc`_Klb+ZriWn$J}VPs*U^P<&b>BvmAzpsK|-3SPLZO{Y=HXg!5 zIcMIJz_EaUD1|ufUA250VhvjngRUmR*6yjsVcO4BqTV-;W`z#U64VXIqTjVBlq!B0DkK4xcTZrN` zD&R;WBpnxUql(<3hn3M7-q#m>#D2lK$s~=2ZgV62mUU0NrOUEjblvw6$Fx?jfc|WV zqvGG+z@VdxC@$0?JZ_xpFiMivF&mUwIi!iCn2`-Lo-+A5_qlwYusUS%dScSG<7}d>1CU5S*NdLI-CR!E;xl z8jhXvF_A3J#IZ#xITNa2iAc5#j2LPZ&?J8qrkWj_lE20M8`7y2Xf#2W*a*$TF7gSH z{;=iPz>KP-0W}YhN9U#cFB1aCX`~opZO|EQbN-%5s*F1j1G84i#+}2suhbIre$yys zx8=IJu7s;P#@M_>+1N3gXv@gsHaJ%!+Uh`Pmfa7X3 zNF$sG4sL*8CF^p#I$_o|#6W}&z-D8mZZvMjTHmk{Tg$Rdc<`1Rh;zUWRWIWxV&{;H zLr}0dONcywf2X1pxs@jNHdqeOqJ;A^#H|+6qx4ztl}Tup717 zU*~j$`8_bN1X|dV;I%3*Vg7U0<RG2= z`Zt4(6U(iH%_NCftH-;bbH3Ga+jVB3pba=8A%M#kA$l>M@Ssyy4x1R99!6O-$=M2n z^kS+r%n`yv{>a-lgJ*h{meBNR1u&uYay~iX4UA(j`;_7n@d|m`#G@B(<-$S{n^9_XVCIJShp;qu49_*^OpF)FC0s835(&!U^{Z;}O z>J9SC^?Jy~g%;{6NT}!2p&rFkJ!G9DUvXQ1Wc2e&rDw=0vbi<|p_&V4<~Z#t^;dEh zs|kNNui}JpOEp93c!oMP74C#`x4;rG~) z0A8Rf#}=G2Po>!90CSw5=Q$@`+nZZdVx%nIxMZp#e~$9tJk#|V8_Mi$a`4-0#dnEP z9CjV<>DgkmHOZ?%F4R;5t*4aLLDsE8qPo) zI8;(KlQO;#zqSm^m>8EkuiL8YC`xi&inxeTVKkFxQI>1(a79qY$RuRoK>c| zv~}`pJbwp8&h%mt(*`*U14{9->mgK)rcfnxd-L8Rx(1Qs;6w_}edA>MCTb7iB?B-~ zqJ85is$28XC?3RUUGzB_r#Yxm8-J#U!J9Ci4wCs$=eF8t#ISE}#eriydBdgP(qXRG68T%Cxrdc*-~Hns{CM;GYisoL7wGn# zM1!+&mSP83cs${rA64m_;`0Vnqn@g%YjncWi3-9F@f3>$)I#CjM3~LdFq-HvoxVVX zN7EvVhQsGE3XaHjTCIsZ+)xl5LPACf#&r1FI7ep274(s{+Q4$h;y6H`g`|#-W4D%c z`9mg@dIC19gk;mO8Jq6Z>?6w0U>`oL*t@r@S(o#!9lFUYbp2kBYeEC^O zowZiWsGTT*#|V@iY`Akqgo1+e#q5!m&0^c%Pz=+Rf6zXKB!=O)=mecn_q8W!bv*34ECNQ&q3=? z&9e9$ft1SEbaKOC#x3=h*zM#;({P%b!8V_s#>ued#K!iFPv~(NVjvJV8p3I2mpz^6 z0Zyc?AY7DdA2Cgsz)P7A`{XYV&Y>;NX$AwN=w}FGl1fvqR-$3gkCK(Ke^~<16wH=@ za^w=)hym|S7&DuxVn-1~GE<4~Pl^3gsy+tGC1drU8C^@FYe9!%$qR`vuys;K z9C1p{*8>N{E@sTNS`&3_#A1>X zh7Q@4P|6S-5}wRV18oSPosAc4THquajx{fk#OLtU5Qgsud2Z=;crAF~#QI5j@X=MP zS~V8rD5oV^l%JUWwuUTom11_c04!W4UEA9k7FBF99G)?rqA&$OhKnHQ9>{RdDAvM; z-=y)hg+@DRnEeA-k1B9ML~IE)2Yy*9vJz<5&TVy*Fqs4Md&5UFmUIIC` zi?N=$c-J{h7Geq>G7uu{C(%H+I>#UH>;*r0(;34<4o;(txh962qpge!4(72ugAGME zhX)@AT}Q3iAow_%%syd`EZ&OCVDzXm!9s>Z2JCOd=mb? zG5;|-^qv_|AGfQ>mPxtXF26@2#H&>OiS;B;gl1^Dcow4>oGb0Q^QP|#T*7d30%jN* z81uv0?AnEGX7FV?r2MZW?=}g9UAPRj-fF&tMyOv<&H%v+gu+39WNITE$yi4ALmW}~ zniTrOm;KrN1ldPFk473&7@TRjnq(>@b_%78L*&+#B8gqw1}&2#F3*ll-pJID{mExO zxlxK>hDi(j(P|#?6iDMNKuEUw?s87e1K=P~?*GZ)@CvQ{D=qdZ}8CBTb#3dT~$;0VWRRM1U9wM1>@aw~a3 zGp{$)*7oM6hun4LRv5vQl4#)d2&KIW&NhZfiIHY|N?FOJMWAkL(*1Z!2ThtJ%QWfb zd8{w`CWG&vpig*)>Na1PtHxZboEF3t8LdJNH5?YFQ7+%Fo!1P6_$$InY$%^kAXUnX zmrXPf6$;2H|FVPMb*&8Y+u}d|^$OKB`k@NjB$~z}^f$SJPL>+jCw-jh z=~jEtRrjb-5>PP&AA<5^tzMvtU?Qn0TyR$=K)G^|#eCnLW?0qnW>WP6sTLRPIF!I% z6|!=G;C^N(%aj-dxJVjq%2Ql0#634cEyv==xFgF~jsw1s5YUy>ejUVn7XUY)!$CUf z{FF+q-g8s2TYN_Vkg{@FjKsFYD)0msjnAQe{fjh%X%np_6jd9g!xT^qqQOZzoF_WK zTyAXyz3Or?t+0JQQ@r$q64!s}eDG%tYDNo7-EVxGqwPw@u`3%Vn zidyg}cW3X^U2l%vLJq}Oj{aesG)SDaIWo5;px2*)2SFoO=v>w;C8H8Hz`sD3f8xqY9>mbYIPGN!W)EwSIUqDABbl z2*tctQO!AS*n_<@9M^GUwVXiowJ&r$K81=t-1Km$k_ZK{ldK4ZL?oE7&>~Jro*Xmb2}aDjCaV}S;q@cVx8d5>6Y&|kqAi3 z6f?IR%xv!vH+}JHoA<7fy~8B8J*Cr!W|d!*hvy4bPcHD-tNftll3vm?eOtMIY_HvJ z$cqXZsRzI8qlb7h9h$sk)yoZ;{sv_yyx6eQnK`tP!cJ5?+(n{L;KVS_z4G7=`#K9s zwvQJW@j4&9Zs!ymM|SaCw1~U18z>1{-UD*9$ZO!}3q-SYG;*PdR^I8#j7e? zn=$b()L3My&nQCg1~c@FkQ)urJ^AkV(ff{gk)&9O(t&;9u!ffRoQrX%X#!Wi8@%Ey z6>pp2UMgQ6fO<@3?~m`yh?x`9o}9Xac(d`|BuxX#$pC7;q2TCt(UWxdK1=^$By z)%P94Fusoys4PV~g;bty=Xh+}=}^ugb9N+4R(Upnf}59Vk=+^^O>PaA3mi=XM(lIo zN;p@nW|_bH_#gi5(VwlY(GRtR%Qfv)11z!lk{RXnjh9ntfZ9~fl8ob#=S_`x8fktb zfJbn!S-9gX*Bb9MUu@vA8T%aXyk9HNedt^fLLnk4&gI6tubLx*aWkCb@ekMajT{gi zvdvE7ikXO2Q!BotKHHh{Emm-_3pf}Xy~P^VnjIcuZmVV*gLE@Wi&{0Sgd%M3aEsJ5 zTYDycv}k}N+|YbA9s>c3F5ajXg4h&gQ`~8!xXqvNhA02~nH276HNRpgwZdkNY&mg; z+}5z~CZK_}Xd}F?EyD1fKG5w8wX%jJFH}Hd(6Sn9@L6gH)H<_2Ja!P8;M<^%$}M-2J`~HwyC&fv=s(3oYkpz<#0i~ z?0T&4HyUs66*t975lPL}u1+8S?T#e+M6i%$Z)) zfc~-WL4Iw8jOSdd6O^3J;C|GZ)-#18ADtb=9kGGSd4=8+Zr~$(t-wRJ=B<2uoNFVB zg^We*!F7JaARm3&z|$kohL^*W8*U!8e%b6`!eXsr9=uE&=%pGhjz&!JwZc6Q%@-#f z(n6zq18DUQMj(sYi7$9C3*pd5GO}NUA`u9kMP`O^Bb4>vTOf!>2BjiZEX`3~P4R^?qxhW^O>i8hN|7z;ous(EHz_~=rj4$ne%DoZx3(W{Kf3o|o9m-o zt?epQDO&faG`WGmnhaW7o15nsuwW`b$~Ck}^v=~W2$~C-9`tDin(jG{P|xYQy5^F? z)7ISwV9UKNv@9PzqN2+7eGbC40-`C?_@zUy$ZKnBWqJ1`eb>%UBeYpjK4PAzZLA@s zOSHhu|8_T12foL3;O*~J2*%Bq2BFy-n=HJALKVL4VmxhA8w|D50lcHs0sR7%;fIsz zO~u%|%tcozq(Z3LGNr;wW%0p%R2G*ZO?~bv%JCFMaox5hHlsdw&C0IOWj-$<>>GTG zL_E5bm+YtlU(#HYyQxoCinhC&6ov8pPdIVf-A%2O%mL+fg z4Rvp+0^W>xt#Z0pGqu%FuN2Jm{&H8Y!mr--XR6U^N|gL6J$r+d>+y}Cs^(giy{%57$c=8+i7qa*o)Y7I zb2QjkbG$7=bn9>xgBQJFlQVq$7`+X`$m)M-5x%~d-bX10=!>x@y0Oq^eWVj|SIu!7 zI-{#`%j`uB6VFoMQ&$1fwQUMg3x00F?wfhMN=wyHdQ*nF>n#2j32=ll- zNvA3AxS@KVzrcs~YdxMP5#Bd=p{EI6IB*cl$&>bl$e;P(#L$e(W0v6m11kN#oU(}1 zRuM*{lkMmcA%FPQ_rCulP9~5~tSx>$AU!Srz~|9BKlMrVw~WdO|BY`MES+-0)cRW_ z<%UV{-?Dz~qMUcwsa?XTPp$XD%c=jnRn{!2zFD7HuWyz!f4Ni6T;xwZZ!72h c_6t9YJN)X8|AfYVi2wfaduwZdb4Z{54+NVq8~^|S literal 0 HcmV?d00001 diff --git a/apps/gittensory-ui/public/openapi.json b/apps/gittensory-ui/public/openapi.json index 52a7705c75..900768a546 100644 --- a/apps/gittensory-ui/public/openapi.json +++ b/apps/gittensory-ui/public/openapi.json @@ -146,59 +146,6 @@ "generatedAt" ] }, - "RegistryRepo": { - "type": "object", - "properties": { - "repo": { - "type": "string" - }, - "emissionShare": { - "type": "number" - }, - "issueDiscoveryShare": { - "type": "number" - }, - "labelMultipliers": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "trustedLabelPipeline": { - "type": "boolean", - "nullable": true - }, - "maintainerCut": { - "type": "number" - }, - "defaultLabelMultiplier": { - "type": "number", - "nullable": true - }, - "fixedBaseScore": { - "type": "number", - "nullable": true - }, - "eligibilityMode": { - "type": "string", - "nullable": true - }, - "raw": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "required": [ - "repo", - "emissionShare", - "issueDiscoveryShare", - "labelMultipliers", - "maintainerCut", - "raw" - ] - }, "RegistrySnapshot": { "type": "object", "properties": { @@ -260,6 +207,59 @@ "repositories" ] }, + "RegistryRepo": { + "type": "object", + "properties": { + "repo": { + "type": "string" + }, + "emissionShare": { + "type": "number" + }, + "issueDiscoveryShare": { + "type": "number" + }, + "labelMultipliers": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "trustedLabelPipeline": { + "type": "boolean", + "nullable": true + }, + "maintainerCut": { + "type": "number" + }, + "defaultLabelMultiplier": { + "type": "number", + "nullable": true + }, + "fixedBaseScore": { + "type": "number", + "nullable": true + }, + "eligibilityMode": { + "type": "string", + "nullable": true + }, + "raw": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "required": [ + "repo", + "emissionShare", + "issueDiscoveryShare", + "labelMultipliers", + "maintainerCut", + "raw" + ] + }, "Repository": { "type": "object", "properties": { @@ -313,40 +313,6 @@ "isPrivate" ] }, - "Finding": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "title": { - "type": "string" - }, - "severity": { - "type": "string", - "enum": [ - "info", - "warning", - "critical" - ] - }, - "detail": { - "type": "string" - }, - "action": { - "type": "string" - }, - "publicText": { - "type": "string" - } - }, - "required": [ - "code", - "title", - "severity", - "detail" - ] - }, "Advisory": { "type": "object", "properties": { @@ -421,178 +387,53 @@ "generatedAt" ] }, - "ActionPortfolioBucketName": { - "type": "string", - "enum": [ - "cleanup", - "wait", - "direct_pr", - "issue_discovery", - "avoid", - "maintainer_lane" - ] - }, - "DecisionActionKind": { - "type": "string", - "enum": [ - "cleanup_existing_prs", - "land_existing_prs", - "open_new_direct_pr", - "file_issue_discovery", - "maintainer_lane_improve_repo", - "maintainer_cut_readiness" - ] - }, - "DecisionRecommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "watch" - ] - }, - "ActionPortfolioItem": { + "Finding": { "type": "object", "properties": { - "bucket": { - "$ref": "#/components/schemas/ActionPortfolioBucketName" - }, - "repoFullName": { + "code": { "type": "string" }, - "actionKind": { - "$ref": "#/components/schemas/DecisionActionKind" - }, - "priorityScore": { - "type": "number" - }, - "recommendation": { - "$ref": "#/components/schemas/DecisionRecommendation" + "title": { + "type": "string" }, - "status": { + "severity": { "type": "string", "enum": [ - "recommended", - "blocked", - "watch" + "info", + "warning", + "critical" ] }, - "whyNow": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreabilityImpact": { - "type": "string" - }, - "riskImpact": { + "detail": { "type": "string" }, - "maintainerImpact": { + "action": { "type": "string" }, - "blockedBy": { - "type": "array", - "items": { - "type": "string" - } - }, - "rerunWhen": { + "publicText": { "type": "string" - }, - "publicSafeSummary": { + } + }, + "required": [ + "code", + "title", + "severity", + "detail" + ] + }, + "ActionPortfolio": { + "type": "object", + "properties": { + "generatedAt": { "type": "string" }, - "nextActions": { + "bucketOrder": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ActionPortfolioBucketName" } }, - "publicNextActions": { - "type": "array", - "items": { - "type": "string" - } - }, - "source": { - "type": "string", - "enum": [ - "decision_pack" - ] - }, - "scenarioProjection": { - "type": "object", - "properties": { - "source": { - "type": "string", - "enum": [ - "github_observed", - "user_supplied" - ] - }, - "pendingMergedPrCount": { - "type": "number" - }, - "pendingClosedPrCount": { - "type": "number" - }, - "approvedPrCount": { - "type": "number" - }, - "expectedOpenPrCountAfterMerge": { - "type": "number" - }, - "notes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "source", - "pendingMergedPrCount", - "pendingClosedPrCount", - "approvedPrCount", - "notes" - ] - } - }, - "required": [ - "bucket", - "repoFullName", - "priorityScore", - "recommendation", - "status", - "whyNow", - "scoreabilityImpact", - "riskImpact", - "maintainerImpact", - "blockedBy", - "rerunWhen", - "publicSafeSummary", - "nextActions", - "publicNextActions", - "source" - ] - }, - "ActionPortfolio": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string" - }, - "bucketOrder": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionPortfolioBucketName" - } - }, - "buckets": { + "buckets": { "type": "array", "items": { "type": "object", @@ -646,6 +487,165 @@ "summary" ] }, + "ActionPortfolioBucketName": { + "type": "string", + "enum": [ + "cleanup", + "wait", + "direct_pr", + "issue_discovery", + "avoid", + "maintainer_lane" + ] + }, + "ActionPortfolioItem": { + "type": "object", + "properties": { + "bucket": { + "$ref": "#/components/schemas/ActionPortfolioBucketName" + }, + "repoFullName": { + "type": "string" + }, + "actionKind": { + "$ref": "#/components/schemas/DecisionActionKind" + }, + "priorityScore": { + "type": "number" + }, + "recommendation": { + "$ref": "#/components/schemas/DecisionRecommendation" + }, + "status": { + "type": "string", + "enum": [ + "recommended", + "blocked", + "watch" + ] + }, + "whyNow": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreabilityImpact": { + "type": "string" + }, + "riskImpact": { + "type": "string" + }, + "maintainerImpact": { + "type": "string" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "string" + } + }, + "rerunWhen": { + "type": "string" + }, + "publicSafeSummary": { + "type": "string" + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicNextActions": { + "type": "array", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "enum": [ + "decision_pack" + ] + }, + "scenarioProjection": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "github_observed", + "user_supplied" + ] + }, + "pendingMergedPrCount": { + "type": "number" + }, + "pendingClosedPrCount": { + "type": "number" + }, + "approvedPrCount": { + "type": "number" + }, + "expectedOpenPrCountAfterMerge": { + "type": "number" + }, + "notes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "source", + "pendingMergedPrCount", + "pendingClosedPrCount", + "approvedPrCount", + "notes" + ] + } + }, + "required": [ + "bucket", + "repoFullName", + "priorityScore", + "recommendation", + "status", + "whyNow", + "scoreabilityImpact", + "riskImpact", + "maintainerImpact", + "blockedBy", + "rerunWhen", + "publicSafeSummary", + "nextActions", + "publicNextActions", + "source" + ] + }, + "DecisionActionKind": { + "type": "string", + "enum": [ + "cleanup_existing_prs", + "land_existing_prs", + "open_new_direct_pr", + "file_issue_discovery", + "maintainer_lane_improve_repo", + "maintainer_cut_readiness" + ] + }, + "DecisionRecommendation": { + "type": "string", + "enum": [ + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "watch" + ] + }, "WorkboardItem": { "type": "object", "properties": { @@ -785,75 +785,13 @@ "findings" ] }, - "CollisionItem": { + "CollisionReport": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "issue", - "pull_request" - ] - }, - "number": { - "type": "number" - }, - "title": { + "repoFullName": { "type": "string" }, - "authorLogin": { - "type": "string", - "nullable": true - }, - "htmlUrl": { - "type": "string", - "nullable": true - } - }, - "required": [ - "type", - "number", - "title" - ] - }, - "CollisionCluster": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "risk": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "reason": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CollisionItem" - } - } - }, - "required": [ - "id", - "risk", - "reason", - "items" - ] - }, - "CollisionReport": { - "type": "object", - "properties": { - "repoFullName": { - "type": "string" - }, - "generatedAt": { + "generatedAt": { "type": "string" }, "summary": { @@ -889,44 +827,66 @@ "clusters" ] }, - "LaneAdvice": { + "CollisionCluster": { "type": "object", "properties": { - "lane": { + "id": { + "type": "string" + }, + "risk": { "type": "string", "enum": [ - "direct_pr", - "issue_discovery", - "split", - "inactive", - "unknown" + "low", + "medium", + "high" ] }, - "repoFullName": { + "reason": { "type": "string" }, - "issueDiscoveryShare": { - "type": "number" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollisionItem" + } + } + }, + "required": [ + "id", + "risk", + "reason", + "items" + ] + }, + "CollisionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "issue", + "pull_request" + ] }, - "directPrShare": { + "number": { "type": "number" }, - "summary": { + "title": { "type": "string" }, - "contributorGuidance": { - "type": "string" + "authorLogin": { + "type": "string", + "nullable": true }, - "maintainerGuidance": { - "type": "string" + "htmlUrl": { + "type": "string", + "nullable": true } }, "required": [ - "lane", - "repoFullName", - "summary", - "contributorGuidance", - "maintainerGuidance" + "type", + "number", + "title" ] }, "ConfigQuality": { @@ -990,6 +950,46 @@ "findings" ] }, + "LaneAdvice": { + "type": "object", + "properties": { + "lane": { + "type": "string", + "enum": [ + "direct_pr", + "issue_discovery", + "split", + "inactive", + "unknown" + ] + }, + "repoFullName": { + "type": "string" + }, + "issueDiscoveryShare": { + "type": "number" + }, + "directPrShare": { + "type": "number" + }, + "summary": { + "type": "string" + }, + "contributorGuidance": { + "type": "string" + }, + "maintainerGuidance": { + "type": "string" + } + }, + "required": [ + "lane", + "repoFullName", + "summary", + "contributorGuidance", + "maintainerGuidance" + ] + }, "LabelAudit": { "type": "object", "properties": { @@ -2126,104 +2126,192 @@ "summary" ] }, - "DecisionPackFreshness": { - "type": "string", - "enum": [ - "fresh", - "stale", - "rebuilding", - "missing" - ] - }, - "AgentRecommendationOutcomeState": { - "type": "string", - "enum": [ - "accepted", - "ignored", - "stale", - "merged", - "closed", - "improved" - ] - }, - "AgentRecommendationOutcomeStateBucket": { + "ContributorDecisionPack": { "type": "object", "properties": { - "state": { - "$ref": "#/components/schemas/AgentRecommendationOutcomeState" + "status": { + "type": "string", + "enum": [ + "ready" + ] }, - "count": { - "type": "number" - } - }, - "required": [ - "state", - "count" - ] - }, - "AgentRecommendationOutcomeRepoSummary": { - "type": "object", - "properties": { - "repoFullName": { - "type": "string" + "source": { + "type": "string", + "enum": [ + "computed", + "snapshot" + ] }, - "total": { - "type": "number" + "login": { + "type": "string" }, - "accepted": { - "type": "number" + "generatedAt": { + "type": "string" }, - "ignored": { + "snapshotAgeSeconds": { "type": "number" }, "stale": { - "type": "number" + "type": "boolean" }, - "merged": { - "type": "number" + "freshness": { + "$ref": "#/components/schemas/DecisionPackFreshness" }, - "closed": { - "type": "number" + "rebuildEnqueued": { + "type": "boolean" }, - "improved": { - "type": "number" + "scoringModelSnapshotId": { + "type": "string" }, - "positive": { - "type": "number" + "profile": { + "type": "object", + "additionalProperties": { + "nullable": true + } }, - "negative": { - "type": "number" + "outcomeHistory": { + "$ref": "#/components/schemas/ContributorOutcomeHistory" }, - "maintainerLaneTotal": { - "type": "number" + "roleContexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleContext" + } }, - "latestOutcomeAt": { - "type": "string", - "nullable": true + "opportunities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorOpportunity" + } }, - "signal": { - "type": "string", - "enum": [ - "positive", - "negative", - "mixed", - "neutral" - ] - } - }, - "required": [ - "repoFullName", - "total", - "accepted", - "ignored", - "stale", - "merged", - "closed", - "improved", - "positive", - "negative", - "maintainerLaneTotal", - "signal" + "repoDecisions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "topActions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "actionPortfolio": { + "$ref": "#/components/schemas/ActionPortfolio" + }, + "cleanupFirst": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "pursueRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "avoidRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "maintainerLaneRepos": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "scoreBlockers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + } + }, + "recommendationOutcomeFeedback": { + "$ref": "#/components/schemas/AgentRecommendationOutcomeSummary" + }, + "evidenceGraph": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "dataQuality": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "summary": { + "type": "string" + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + }, + "openPrMonitor": { + "$ref": "#/components/schemas/ContributorOpenPrMonitor" + } + }, + "required": [ + "status", + "source", + "login", + "generatedAt", + "stale", + "freshness", + "rebuildEnqueued", + "scoringModelSnapshotId", + "profile", + "outcomeHistory", + "roleContexts", + "opportunities", + "repoDecisions", + "topActions", + "actionPortfolio", + "cleanupFirst", + "pursueRepos", + "avoidRepos", + "maintainerLaneRepos", + "scoreBlockers", + "recommendationOutcomeFeedback", + "dataQuality", + "summary", + "nextActions" + ] + }, + "DecisionPackFreshness": { + "type": "string", + "enum": [ + "fresh", + "stale", + "rebuilding", + "missing" ] }, "AgentRecommendationOutcomeSummary": { @@ -2330,58 +2418,95 @@ "privateSummary" ] }, - "ContributorOpenPrNextStepPacket": { + "AgentRecommendationOutcomeStateBucket": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/AgentRecommendationOutcomeState" + }, + "count": { + "type": "number" + } + }, + "required": [ + "state", + "count" + ] + }, + "AgentRecommendationOutcomeState": { + "type": "string", + "enum": [ + "accepted", + "ignored", + "stale", + "merged", + "closed", + "improved" + ] + }, + "AgentRecommendationOutcomeRepoSummary": { "type": "object", "properties": { "repoFullName": { "type": "string" }, - "number": { + "total": { "type": "number" }, - "title": { - "type": "string" + "accepted": { + "type": "number" }, - "classification": { - "type": "string", - "enum": [ - "approved", - "blocked", - "stale", - "needs_author", - "failing_checks", - "missing_tests", - "duplicate_prone", - "reviewable", - "should_close_or_withdraw", - "maintainer_lane", - "draft" - ] + "ignored": { + "type": "number" }, - "summary": { - "type": "string" + "stale": { + "type": "number" }, - "reasons": { - "type": "array", - "items": { - "type": "string" - } + "merged": { + "type": "number" }, - "nextSteps": { - "type": "array", - "items": { - "type": "string" - } + "closed": { + "type": "number" + }, + "improved": { + "type": "number" + }, + "positive": { + "type": "number" + }, + "negative": { + "type": "number" + }, + "maintainerLaneTotal": { + "type": "number" + }, + "latestOutcomeAt": { + "type": "string", + "nullable": true + }, + "signal": { + "type": "string", + "enum": [ + "positive", + "negative", + "mixed", + "neutral" + ] } }, "required": [ "repoFullName", - "number", - "title", - "classification", - "summary", - "reasons", - "nextSteps" + "total", + "accepted", + "ignored", + "stale", + "merged", + "closed", + "improved", + "positive", + "negative", + "maintainerLaneTotal", + "signal" ] }, "ContributorOpenPrMonitor": { @@ -2516,183 +2641,58 @@ "pullRequests" ] }, - "ContributorDecisionPack": { + "ContributorOpenPrNextStepPacket": { "type": "object", "properties": { - "status": { + "repoFullName": { + "type": "string" + }, + "number": { + "type": "number" + }, + "title": { + "type": "string" + }, + "classification": { "type": "string", "enum": [ - "ready" - ] - }, - "source": { - "type": "string", - "enum": [ - "computed", - "snapshot" + "approved", + "blocked", + "stale", + "needs_author", + "failing_checks", + "missing_tests", + "duplicate_prone", + "reviewable", + "should_close_or_withdraw", + "maintainer_lane", + "draft" ] }, - "login": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "snapshotAgeSeconds": { - "type": "number" - }, - "stale": { - "type": "boolean" - }, - "freshness": { - "$ref": "#/components/schemas/DecisionPackFreshness" - }, - "rebuildEnqueued": { - "type": "boolean" - }, - "scoringModelSnapshotId": { + "summary": { "type": "string" }, - "profile": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "outcomeHistory": { - "$ref": "#/components/schemas/ContributorOutcomeHistory" - }, - "roleContexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RoleContext" - } - }, - "opportunities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContributorOpportunity" - } - }, - "repoDecisions": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "topActions": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "actionPortfolio": { - "$ref": "#/components/schemas/ActionPortfolio" - }, - "cleanupFirst": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "pursueRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "avoidRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "maintainerLaneRepos": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "scoreBlockers": { + "reasons": { "type": "array", "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "recommendationOutcomeFeedback": { - "$ref": "#/components/schemas/AgentRecommendationOutcomeSummary" - }, - "evidenceGraph": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "dataQuality": { - "type": "object", - "additionalProperties": { - "nullable": true + "type": "string" } }, - "summary": { - "type": "string" - }, - "nextActions": { + "nextSteps": { "type": "array", "items": { "type": "string" } - }, - "openPrMonitor": { - "$ref": "#/components/schemas/ContributorOpenPrMonitor" } }, "required": [ - "status", - "source", - "login", - "generatedAt", - "stale", - "freshness", - "rebuildEnqueued", - "scoringModelSnapshotId", - "profile", - "outcomeHistory", - "roleContexts", - "opportunities", - "repoDecisions", - "topActions", - "actionPortfolio", - "cleanupFirst", - "pursueRepos", - "avoidRepos", - "maintainerLaneRepos", - "scoreBlockers", - "recommendationOutcomeFeedback", - "dataQuality", + "repoFullName", + "number", + "title", + "classification", "summary", - "nextActions" + "reasons", + "nextSteps" ] }, "DecisionPackRefreshNeeded": { @@ -2794,66 +2794,6 @@ "dataQuality" ] }, - "BurdenForecast": { - "type": "object", - "properties": { - "repoFullName": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "horizonDays": { - "anyOf": [ - { - "type": "number", - "enum": [ - 7 - ] - }, - { - "type": "number", - "enum": [ - 30 - ] - } - ] - }, - "level": { - "type": "string", - "enum": [ - "low", - "medium", - "high", - "critical" - ] - }, - "forecast": { - "type": "object", - "additionalProperties": { - "type": "number" - } - }, - "findings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Finding" - } - }, - "summary": { - "type": "string" - } - }, - "required": [ - "repoFullName", - "generatedAt", - "horizonDays", - "level", - "forecast", - "findings", - "summary" - ] - }, "RepoIntelligence": { "type": "object", "properties": { @@ -2988,52 +2928,64 @@ "dataQuality" ] }, - "RepoOutcomeEvidenceCompleteness": { + "BurdenForecast": { "type": "object", "properties": { - "pullRequestsAnalyzed": { - "type": "number" - }, - "withFileDetail": { - "type": "number" - }, - "withReviewDetail": { - "type": "number" - }, - "withCheckDetail": { - "type": "number" + "repoFullName": { + "type": "string" }, - "filesCompletenessRatio": { - "type": "number" + "generatedAt": { + "type": "string" }, - "reviewsCompletenessRatio": { - "type": "number" - }, - "checksCompletenessRatio": { - "type": "number" - }, - "fullyDecidedWithDetail": { - "type": "number" + "horizonDays": { + "anyOf": [ + { + "type": "number", + "enum": [ + 7 + ] + }, + { + "type": "number", + "enum": [ + 30 + ] + } + ] }, - "status": { + "level": { "type": "string", "enum": [ - "complete", - "partial", - "missing" + "low", + "medium", + "high", + "critical" ] + }, + "forecast": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "findings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Finding" + } + }, + "summary": { + "type": "string" } }, "required": [ - "pullRequestsAnalyzed", - "withFileDetail", - "withReviewDetail", - "withCheckDetail", - "filesCompletenessRatio", - "reviewsCompletenessRatio", - "checksCompletenessRatio", - "fullyDecidedWithDetail", - "status" + "repoFullName", + "generatedAt", + "horizonDays", + "level", + "forecast", + "findings", + "summary" ] }, "RepoOutcomePatterns": { @@ -3131,6 +3083,54 @@ "summary" ] }, + "RepoOutcomeEvidenceCompleteness": { + "type": "object", + "properties": { + "pullRequestsAnalyzed": { + "type": "number" + }, + "withFileDetail": { + "type": "number" + }, + "withReviewDetail": { + "type": "number" + }, + "withCheckDetail": { + "type": "number" + }, + "filesCompletenessRatio": { + "type": "number" + }, + "reviewsCompletenessRatio": { + "type": "number" + }, + "checksCompletenessRatio": { + "type": "number" + }, + "fullyDecidedWithDetail": { + "type": "number" + }, + "status": { + "type": "string", + "enum": [ + "complete", + "partial", + "missing" + ] + } + }, + "required": [ + "pullRequestsAnalyzed", + "withFileDetail", + "withReviewDetail", + "withCheckDetail", + "filesCompletenessRatio", + "reviewsCompletenessRatio", + "checksCompletenessRatio", + "fullyDecidedWithDetail", + "status" + ] + }, "RepoOutcomePatternsResponse": { "type": "object", "properties": { @@ -3887,1262 +3887,841 @@ } ] }, - "ScorePreviewResult": { + "LocalBranchAnalysis": { "type": "object", "properties": { + "login": { + "type": "string" + }, "repoFullName": { "type": "string" }, "generatedAt": { "type": "string" }, - "scoringModelSnapshotId": { + "baseRef": { "type": "string" }, - "activeModel": { - "type": "string", - "enum": [ - "current_density_model", - "pending_saturation_model", - "exponential_saturation_model", - "unknown" - ] - }, - "privateOnly": { - "type": "boolean", - "enum": [ - true - ] - }, - "laneMath": { - "type": "object", - "additionalProperties": { - "type": "number" - } + "headRef": { + "type": "string" }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] + "branchName": { + "type": "string" }, - "linkedIssueMultiplier": { + "baseFreshness": { "type": "object", "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, "status": { "type": "string", "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" + "fresh", + "stale", + "possibly_stale", + "unknown" ] }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] + "baseRef": { + "type": "string" }, - "eligible": { - "type": "boolean" + "baseSha": { + "type": "string" }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } + "headSha": { + "type": "string" }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } + "mergeBaseSha": { + "type": "string" }, - "baseMultiplier": { + "remoteTrackingSha": { + "type": "string" + }, + "changedFileCount": { "type": "number" }, - "appliedMultiplier": { + "testFileCount": { "type": "number" }, - "reason": { - "type": "string" + "passedValidationCount": { + "type": "number" }, "warnings": { "type": "array", "items": { "type": "string" } + }, + "recommendation": { + "type": "string" } }, "required": [ - "mode", "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } - }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "branchEligibility": { - "type": "object", - "properties": { - "required": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "eligible", - "ineligible", - "unknown", - "not_required" - ] - }, - "evidence": { - "type": "string", - "enum": [ - "provided", - "missing" - ] - }, - "source": { - "type": "string", - "enum": [ - "github_metadata", - "local_metadata", - "registry", - "user_supplied", - "missing" - ] - }, - "reason": { - "type": "string" - }, - "checkedAt": { - "type": "string" - }, - "stale": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "required", - "status", - "evidence", - "source", - "stale", + "changedFileCount", + "testFileCount", + "passedValidationCount", "warnings" ] }, - "effectiveEstimatedScore": { - "type": "number" + "lane": { + "$ref": "#/components/schemas/LaneAdvice" }, - "underlyingPotentialScore": { - "type": "number" + "roleContext": { + "$ref": "#/components/schemas/RoleContext" }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } + "preflight": { + "$ref": "#/components/schemas/LocalDiffPreflightResult" }, - "gateDeltas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "gate": { - "type": "string", - "enum": [ - "open_pr_threshold", - "credibility_floor", - "linked_issue_multiplier" - ] - }, - "current": { - "type": "string" - }, - "projected": { - "type": "string" - }, - "explanation": { - "type": "string" - } - }, - "required": [ - "gate", - "current", - "projected", - "explanation" - ] - } + "scorePreview": { + "$ref": "#/components/schemas/ScorePreviewResult" }, - "scenarioPreviews": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" + "scenarioScorePreview": { + "type": "object", + "properties": { + "current": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } }, - "credibilityFloor": { - "type": "number" + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } }, - "credibilityObserved": { - "type": "number" + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] } }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { + "linkedIssueMultiplier": { "type": "object", "properties": { - "code": { + "mode": { "type": "string", "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" + "none", + "standard", + "maintainer" ] }, - "severity": { + "status": { "type": "string", "enum": [ - "blocker", - "reducer", - "context" + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" ] }, - "detail": { + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "code", - "severity", - "detail" + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" ] + }, + "deltaExplanation": { + "type": "string" } }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + }, + "bestReasonableCase": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { "type": "number" } }, - "solvedByPullRequests": { - "type": "array", - "items": { + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { "type": "number" } }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] } }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { - "type": "string" - } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - } - }, - "scoreabilityStatus": { - "type": "string", - "enum": [ - "blocked", - "conditionally_scoreable", - "scoreable", - "hold" - ] - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendation": { - "type": "object", - "properties": { - "level": { - "type": "string", - "enum": [ - "strong_fit", - "reasonable_fit", - "needs_work", - "hold" - ] - }, - "actions": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "level", - "actions" - ] - } - }, - "required": [ - "repoFullName", - "generatedAt", - "scoringModelSnapshotId", - "activeModel", - "privateOnly", - "laneMath", - "scoreEstimate", - "linkedIssueMultiplier", - "gates", - "branchEligibility", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "gateDeltas", - "scenarioPreviews", - "scoreabilityStatus", - "warnings", - "assumptions", - "recommendation" - ] - }, - "RewardRiskAction": { - "type": "object", - "properties": { - "actionKind": { - "type": "string", - "enum": [ - "cleanup_existing_prs", - "land_existing_prs", - "close_or_withdraw_low_fit_prs", - "open_new_direct_pr", - "file_issue_discovery", - "maintainer_lane_improve_repo", - "maintainer_cut_readiness" - ] - }, - "repoFullName": { - "type": "string" - }, - "priorityScore": { - "type": "number" - }, - "laneValueScore": { - "type": "number" - }, - "scoreabilityScore": { - "type": "number" - }, - "personalFitScore": { - "type": "number" - }, - "riskPenalty": { - "type": "number" - }, - "maintainerFrictionPenalty": { - "type": "number" - }, - "actionLeverageScore": { - "type": "number" - }, - "whyThisHelps": { - "type": "array", - "items": { - "type": "string" - } - }, - "nextActions": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "actionKind", - "repoFullName", - "priorityScore", - "laneValueScore", - "scoreabilityScore", - "personalFitScore", - "riskPenalty", - "maintainerFrictionPenalty", - "actionLeverageScore", - "whyThisHelps", - "nextActions" - ] - }, - "RepoRewardRisk": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "repoFullName": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "roleContext": { - "$ref": "#/components/schemas/RoleContext" - }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" - }, - "recommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "unknown" - ] - }, - "rewardUpside": { - "type": "object", - "properties": { - "relevantLane": { - "type": "string", - "enum": [ - "direct_pr", - "issue_discovery", - "maintainer_lane", - "none" - ] - }, - "repoSlice": { - "type": "number" - }, - "directPrSlice": { - "type": "number" - }, - "issueDiscoverySlice": { - "type": "number" - }, - "maintainerCutSlice": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "estimatedScoreIfClean": { - "type": "number" - }, - "currentEstimatedScore": { - "type": "number" - } - }, - "required": [ - "relevantLane", - "repoSlice", - "directPrSlice", - "issueDiscoverySlice", - "maintainerCutSlice", - "labelMultiplier", - "issueMultiplier", - "estimatedScoreIfClean", - "currentEstimatedScore" - ] - }, - "scoreBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "riskBreakdown": { - "type": "object", - "properties": { - "queueBurden": { - "type": "string", - "enum": [ - "low", - "medium", - "high", - "critical" - ] - }, - "queueBurdenScore": { - "type": "number" - }, - "duplicateClusters": { - "type": "number" - }, - "highRiskDuplicateClusters": { - "type": "number" - }, - "closedPullRequestRate": { - "type": "number" - }, - "openPullRequests": { - "type": "number" - }, - "credibility": { - "type": "number" - }, - "reviewChurnRisk": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - } - }, - "required": [ - "queueBurden", - "queueBurdenScore", - "duplicateClusters", - "highRiskDuplicateClusters", - "closedPullRequestRate", - "openPullRequests", - "credibility", - "reviewChurnRisk" - ] - }, - "actionImpact": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "currentPreview": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "afterCleanupPreview": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RewardRiskAction" - } - }, - "whyThisHelps": { - "type": "array", - "items": { - "type": "string" - } - }, - "nextActions": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - } - }, - "required": [ - "login", - "repoFullName", - "generatedAt", - "roleContext", - "lane", - "recommendation", - "rewardUpside", - "scoreBlockers", - "riskBreakdown", - "actionImpact", - "currentPreview", - "afterCleanupPreview", - "actions", - "whyThisHelps", - "nextActions", - "summary" - ] - }, - "LocalWorkspaceIntelligence": { - "type": "object", - "properties": { - "version": { - "type": "number", - "enum": [ - 2 - ] - }, - "sourceUpload": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "enum": [ - false - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "enabled", - "detail" - ] - }, - "branch": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "baseRef": { - "type": "string" - }, - "headSha": { - "type": "string" - }, - "pendingCommitCount": { - "type": "number" - } - }, - "required": [ - "pendingCommitCount" - ] - }, - "changedFiles": { - "type": "object", - "properties": { - "total": { - "type": "number" - }, - "added": { - "type": "number" - }, - "modified": { - "type": "number" - }, - "deleted": { - "type": "number" - }, - "renamed": { - "type": "number" - }, - "binary": { - "type": "number" - }, - "paths": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "total", - "added", - "modified", - "deleted", - "renamed", - "binary", - "paths" - ] - }, - "testEvidence": { - "type": "object", - "properties": { - "level": { - "type": "string", - "enum": [ - "test_files", - "validation_commands", - "both", - "none" + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } + }, + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" ] }, - "testFileCount": { - "type": "number" - }, - "passedValidationCount": { - "type": "number" - }, - "commands": { - "type": "array", - "items": { - "type": "object", - "properties": { - "command": { + "afterPendingMerges": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { "type": "string" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } }, - "status": { - "type": "string", - "enum": [ - "passed", - "failed", - "not_run" + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" ] - }, - "summary": { - "type": "string" } }, - "required": [ - "command", - "status" - ] - } - } - }, - "required": [ - "level", - "testFileCount", - "passedValidationCount", - "commands" - ] - }, - "linkedIssues": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseFreshness": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "possibly_stale", - "unknown" - ] - }, - "baseRef": { - "type": "string" - }, - "baseSha": { - "type": "string" - }, - "headSha": { - "type": "string" - }, - "mergeBaseSha": { - "type": "string" - }, - "remoteTrackingSha": { - "type": "string" - }, - "changedFileCount": { - "type": "number" - }, - "testFileCount": { - "type": "number" - }, - "passedValidationCount": { - "type": "number" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendation": { - "type": "string" - } - }, - "required": [ - "status", - "changedFileCount", - "testFileCount", - "passedValidationCount", - "warnings" - ] - }, - "ciStatusHints": { - "type": "array", - "items": { - "type": "string" - } - }, - "localScorerDiagnostics": { - "type": "object", - "properties": { - "mode": { - "type": "string" - }, - "activeModel": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "metadataOnly": { - "type": "boolean" - } - }, - "required": [ - "mode", - "warnings", - "metadataOnly" - ] - }, - "blockers": { - "type": "object", - "properties": { - "branchQuality": { - "type": "array", - "items": { - "type": "string" - } - }, - "accountState": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "branchQuality", - "accountState" - ] - }, - "rerunWhen": { - "type": "string" - } - }, - "required": [ - "version", - "sourceUpload", - "branch", - "changedFiles", - "testEvidence", - "linkedIssues", - "baseFreshness", - "ciStatusHints", - "blockers", - "rerunWhen" - ] - }, - "LocalBranchAnalysis": { - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "repoFullName": { - "type": "string" - }, - "generatedAt": { - "type": "string" - }, - "baseRef": { - "type": "string" - }, - "headRef": { - "type": "string" - }, - "branchName": { - "type": "string" - }, - "baseFreshness": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "stale", - "possibly_stale", - "unknown" + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } + }, + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" ] }, - "baseRef": { - "type": "string" - }, - "baseSha": { - "type": "string" - }, - "headSha": { - "type": "string" - }, - "mergeBaseSha": { - "type": "string" - }, - "remoteTrackingSha": { - "type": "string" - }, - "changedFileCount": { - "type": "number" - }, - "testFileCount": { - "type": "number" - }, - "passedValidationCount": { - "type": "number" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendation": { - "type": "string" - } - }, - "required": [ - "status", - "changedFileCount", - "testFileCount", - "passedValidationCount", - "warnings" - ] - }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" - }, - "roleContext": { - "$ref": "#/components/schemas/RoleContext" - }, - "preflight": { - "$ref": "#/components/schemas/LocalDiffPreflightResult" - }, - "scorePreview": { - "$ref": "#/components/schemas/ScorePreviewResult" - }, - "scenarioScorePreview": { - "type": "object", - "properties": { - "current": { + "afterApprovedPrsMerge": { "type": "object", "properties": { "name": { @@ -5390,7 +4969,7 @@ "deltaExplanation" ] }, - "bestReasonableCase": { + "afterStalePrsClose": { "type": "object", "properties": { "name": { @@ -5638,1044 +5217,1542 @@ "deltaExplanation" ] }, - "afterPendingMerges": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { + "gateDeltas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gate": { + "type": "string", + "enum": [ + "open_pr_threshold", + "credibility_floor", + "linked_issue_multiplier" + ] + }, + "current": { + "type": "string" + }, + "projected": { + "type": "string" + }, + "explanation": { + "type": "string" + } + }, + "required": [ + "gate", + "current", + "projected", + "explanation" + ] + } + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + } + }, + "required": [ + "current", + "bestReasonableCase", + "gateDeltas", + "blockedBy" + ] + }, + "observedPullRequestScenarios": { + "type": "object", + "properties": { + "approvedOrMergeable": { + "type": "number" + }, + "stale": { + "type": "number" + }, + "closed": { + "type": "number" + }, + "draft": { + "type": "number" + }, + "blocked": { + "type": "number" + }, + "maintainerLane": { + "type": "number" + }, + "notes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "approvedOrMergeable", + "stale", + "closed", + "draft", + "blocked", + "maintainerLane", + "notes" + ] + }, + "githubBranchStatus": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "cached_github_data" + ] + }, + "status": { + "type": "string", + "enum": [ + "approved", + "failing_checks", + "needs_author", + "blocked", + "pending_review", + "no_pr", + "unknown" + ] + }, + "pullNumber": { + "type": "number" + }, + "title": { + "type": "string" + }, + "reviewDecision": { + "type": "string", + "nullable": true + }, + "mergeableState": { + "type": "string", + "nullable": true + }, + "notes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "source", + "status", + "notes" + ] + }, + "branchEligibility": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "eligible", + "ineligible", + "unknown", + "not_required" + ] + }, + "evidence": { + "type": "string", + "enum": [ + "provided", + "missing" + ] + }, + "source": { + "type": "string", + "enum": [ + "github_metadata", + "local_metadata", + "registry", + "user_supplied", + "missing" + ] + }, + "reason": { + "type": "string" + }, + "checkedAt": { + "type": "string" + }, + "stale": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "status", + "evidence", + "source", + "stale", + "warnings" + ] + }, + "rewardRisk": { + "$ref": "#/components/schemas/RepoRewardRisk" + }, + "scoreBlockers": { + "type": "array", + "items": { + "type": "string" + } + }, + "branchQualityBlockers": { + "type": "array", + "items": { + "type": "string" + } + }, + "accountStateBlockers": { + "type": "array", + "items": { + "type": "string" + } + }, + "recommendedRerunCondition": { + "type": "string" + }, + "localFindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Finding" + } + }, + "maintainerFit": { + "type": "object", + "properties": { + "recommendation": { + "type": "string", + "enum": [ + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "unknown" + ] + }, + "reviewBurden": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "role": { + "type": "string", + "enum": [ + "outside_contributor", + "repo_maintainer", + "org_member", + "collaborator", + "owner", + "unknown" + ] + }, + "maintainerLane": { + "type": "boolean" + }, + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "risks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "recommendation", + "reviewBurden", + "role", + "maintainerLane", + "reasons", + "risks" + ] + }, + "manifestGuidance": { + "type": "object", + "properties": { + "present": { + "type": "boolean" + }, + "source": { + "type": "string", + "enum": [ + "repo_file", + "api_record", + "none" + ] + }, + "linkedIssuePolicy": { + "type": "string", + "enum": [ + "required", + "preferred", + "optional" + ] + }, + "issueDiscoveryPolicy": { + "type": "string", + "enum": [ + "encouraged", + "neutral", + "discouraged" + ] + }, + "matchedWantedPaths": { + "type": "array", + "items": { + "type": "string" + } + }, + "matchedBlockedPaths": { + "type": "array", + "items": { + "type": "string" + } + }, + "preferredLabelHits": { + "type": "array", + "items": { + "type": "string" + } + }, + "findings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" + "severity": { + "type": "string", + "enum": [ + "info", + "warning", + "critical" ] + }, + "title": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "action": { + "type": "string" } }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { + "required": [ + "code", + "severity", + "title", + "detail" + ] + } + }, + "publicNextSteps": { + "type": "array", + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + } + }, + "required": [ + "present", + "source", + "linkedIssuePolicy", + "issueDiscoveryPolicy", + "matchedWantedPaths", + "matchedBlockedPaths", + "preferredLabelHits", + "findings", + "publicNextSteps", + "warnings", + "summary" + ] + }, + "prPacket": { + "type": "object", + "properties": { + "titleSuggestion": { + "type": "string" + }, + "markdown": { + "type": "string" + }, + "bodySections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "heading": { + "type": "string" + }, + "lines": { + "type": "array", + "items": { "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] + } }, - "deltaExplanation": { - "type": "string" - } - }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] + "required": [ + "heading", + "lines" + ] + } }, - "afterApprovedPrsMerge": { + "reviewerNotes": { + "type": "array", + "items": { + "type": "string" + } + }, + "validationSummary": { "type": "object", "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" - } - }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } - }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } - }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] + "passed": { + "type": "number" }, - "effectiveEstimatedScore": { + "failed": { "type": "number" }, - "underlyingPotentialScore": { + "notRun": { "type": "number" }, - "blockedBy": { + "commands": { "type": "array", "items": { "type": "object", "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] + "command": { + "type": "string" }, - "severity": { + "status": { "type": "string", "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } - }, - "linkedIssueMultiplier": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { - "type": "string", - "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" - ] - }, - "source": { - "type": "string", - "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { + "passed", + "failed", + "not_run", + "skipped", + "focused", + "unknown" + ] + }, + "summary": { + "type": "string" + }, + "durationMs": { "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { + }, + "exitCode": { "type": "number" } }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" - ] - }, - "deltaExplanation": { + "required": [ + "command", + "status" + ] + } + } + }, + "required": [ + "passed", + "failed", + "notRun", + "commands" + ] + }, + "publicSafeWarnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "titleSuggestion", + "markdown", + "bodySections", + "reviewerNotes", + "validationSummary", + "publicSafeWarnings" + ] + }, + "nextActions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RewardRiskAction" + } + }, + "workspaceIntelligence": { + "$ref": "#/components/schemas/LocalWorkspaceIntelligence" + }, + "summary": { + "type": "string" + } + }, + "required": [ + "login", + "repoFullName", + "generatedAt", + "baseFreshness", + "lane", + "roleContext", + "preflight", + "scorePreview", + "scenarioScorePreview", + "observedPullRequestScenarios", + "githubBranchStatus", + "branchEligibility", + "rewardRisk", + "scoreBlockers", + "branchQualityBlockers", + "accountStateBlockers", + "recommendedRerunCondition", + "localFindings", + "maintainerFit", + "manifestGuidance", + "prPacket", + "nextActions", + "workspaceIntelligence", + "summary" + ] + }, + "ScorePreviewResult": { + "type": "object", + "properties": { + "repoFullName": { + "type": "string" + }, + "generatedAt": { + "type": "string" + }, + "scoringModelSnapshotId": { + "type": "string" + }, + "activeModel": { + "type": "string", + "enum": [ + "current_density_model", + "pending_saturation_model", + "exponential_saturation_model", + "unknown" + ] + }, + "privateOnly": { + "type": "boolean", + "enum": [ + true + ] + }, + "laneMath": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" + } + }, + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" + }, + "openPrThreshold": { + "type": "number" + }, + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" + } + }, + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "branchEligibility": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "eligible", + "ineligible", + "unknown", + "not_required" + ] + }, + "evidence": { + "type": "string", + "enum": [ + "provided", + "missing" + ] + }, + "source": { + "type": "string", + "enum": [ + "github_metadata", + "local_metadata", + "registry", + "user_supplied", + "missing" + ] + }, + "reason": { + "type": "string" + }, + "checkedAt": { + "type": "string" + }, + "stale": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "required", + "status", + "evidence", + "source", + "stale", + "warnings" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" + ] + }, + "severity": { + "type": "string", + "enum": [ + "blocker", + "reducer", + "context" + ] + }, + "detail": { + "type": "string" + } + }, + "required": [ + "code", + "severity", + "detail" + ] + } + }, + "gateDeltas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gate": { + "type": "string", + "enum": [ + "open_pr_threshold", + "credibility_floor", + "linked_issue_multiplier" + ] + }, + "current": { + "type": "string" + }, + "projected": { + "type": "string" + }, + "explanation": { + "type": "string" + } + }, + "required": [ + "gate", + "current", + "projected", + "explanation" + ] + } + }, + "scenarioPreviews": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "current", + "cleanGates", + "afterPendingMerges", + "afterApprovedPrsMerge", + "afterStalePrsClose", + "linkedIssueFixed", + "bestReasonableCase" + ] + }, + "source": { + "type": "string", + "enum": [ + "current_data", + "user_supplied", + "github_observed", + "gittensory_projection" + ] + }, + "assumptions": { + "type": "array", + "items": { "type": "string" } }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" - ] - }, - "afterStalePrsClose": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "current", - "cleanGates", - "afterPendingMerges", - "afterApprovedPrsMerge", - "afterStalePrsClose", - "linkedIssueFixed", - "bestReasonableCase" - ] - }, - "source": { - "type": "string", - "enum": [ - "current_data", - "user_supplied", - "github_observed", - "gittensory_projection" - ] - }, - "assumptions": { - "type": "array", - "items": { - "type": "string" + "scoreEstimate": { + "type": "object", + "properties": { + "baseScore": { + "type": "number" + }, + "densityMultiplier": { + "type": "number" + }, + "contributionBonus": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "credibilityMultiplier": { + "type": "number" + }, + "reviewPenaltyMultiplier": { + "type": "number" + }, + "openPrMultiplier": { + "type": "number" + }, + "estimatedMergedScore": { + "type": "number" + }, + "pendingSaturationScore": { + "type": "number" } }, - "scoreEstimate": { - "type": "object", - "properties": { - "baseScore": { - "type": "number" - }, - "densityMultiplier": { - "type": "number" - }, - "contributionBonus": { - "type": "number" - }, - "labelMultiplier": { - "type": "number" - }, - "issueMultiplier": { - "type": "number" - }, - "credibilityMultiplier": { - "type": "number" - }, - "reviewPenaltyMultiplier": { - "type": "number" - }, - "openPrMultiplier": { - "type": "number" - }, - "estimatedMergedScore": { - "type": "number" - }, - "pendingSaturationScore": { - "type": "number" - } + "required": [ + "baseScore", + "densityMultiplier", + "contributionBonus", + "labelMultiplier", + "issueMultiplier", + "credibilityMultiplier", + "reviewPenaltyMultiplier", + "openPrMultiplier", + "estimatedMergedScore", + "pendingSaturationScore" + ] + }, + "gates": { + "type": "object", + "properties": { + "baseTokenGatePassed": { + "type": "boolean" }, - "required": [ - "baseScore", - "densityMultiplier", - "contributionBonus", - "labelMultiplier", - "issueMultiplier", - "credibilityMultiplier", - "reviewPenaltyMultiplier", - "openPrMultiplier", - "estimatedMergedScore", - "pendingSaturationScore" - ] - }, - "gates": { - "type": "object", - "properties": { - "baseTokenGatePassed": { - "type": "boolean" - }, - "openPrThreshold": { - "type": "number" - }, - "openPrCount": { - "type": "number" - }, - "collateralFraction": { - "type": "number" - }, - "credibilityFloor": { - "type": "number" - }, - "credibilityObserved": { - "type": "number" - } + "openPrThreshold": { + "type": "number" }, - "required": [ - "baseTokenGatePassed", - "openPrThreshold", - "openPrCount", - "collateralFraction", - "credibilityFloor", - "credibilityObserved" - ] - }, - "effectiveEstimatedScore": { - "type": "number" - }, - "underlyingPotentialScore": { - "type": "number" - }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] + "openPrCount": { + "type": "number" + }, + "collateralFraction": { + "type": "number" + }, + "credibilityFloor": { + "type": "number" + }, + "credibilityObserved": { + "type": "number" } }, - "linkedIssueMultiplier": { + "required": [ + "baseTokenGatePassed", + "openPrThreshold", + "openPrCount", + "collateralFraction", + "credibilityFloor", + "credibilityObserved" + ] + }, + "effectiveEstimatedScore": { + "type": "number" + }, + "underlyingPotentialScore": { + "type": "number" + }, + "blockedBy": { + "type": "array", + "items": { "type": "object", "properties": { - "mode": { - "type": "string", - "enum": [ - "none", - "standard", - "maintainer" - ] - }, - "status": { + "code": { "type": "string", "enum": [ - "not_required", - "raw", - "plausible", - "validated", - "invalid", - "unavailable" + "repo_not_registered", + "inactive_allocation", + "base_token_gate", + "open_pr_threshold", + "credibility_floor", + "review_penalty", + "metadata_only", + "linked_issue_invalid", + "linked_issue_unvalidated", + "branch_ineligible", + "branch_eligibility_missing" ] }, - "source": { + "severity": { "type": "string", "enum": [ - "none", - "user_supplied", - "official_mirror", - "github_cache", - "issue_quality", - "missing" - ] - }, - "eligible": { - "type": "boolean" - }, - "issueNumbers": { - "type": "array", - "items": { - "type": "number" - } - }, - "solvedByPullRequests": { - "type": "array", - "items": { - "type": "number" - } - }, - "baseMultiplier": { - "type": "number" - }, - "appliedMultiplier": { - "type": "number" + "blocker", + "reducer", + "context" + ] }, - "reason": { + "detail": { "type": "string" - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "mode", - "status", - "source", - "eligible", - "issueNumbers", - "solvedByPullRequests", - "baseMultiplier", - "appliedMultiplier", - "reason", - "warnings" + "code", + "severity", + "detail" ] - }, - "deltaExplanation": { - "type": "string" } }, - "required": [ - "name", - "source", - "assumptions", - "scoreEstimate", - "gates", - "effectiveEstimatedScore", - "underlyingPotentialScore", - "blockedBy", - "linkedIssueMultiplier", - "deltaExplanation" + "linkedIssueMultiplier": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "none", + "standard", + "maintainer" + ] + }, + "status": { + "type": "string", + "enum": [ + "not_required", + "raw", + "plausible", + "validated", + "invalid", + "unavailable" + ] + }, + "source": { + "type": "string", + "enum": [ + "none", + "user_supplied", + "official_mirror", + "github_cache", + "issue_quality", + "missing" + ] + }, + "eligible": { + "type": "boolean" + }, + "issueNumbers": { + "type": "array", + "items": { + "type": "number" + } + }, + "solvedByPullRequests": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseMultiplier": { + "type": "number" + }, + "appliedMultiplier": { + "type": "number" + }, + "reason": { + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mode", + "status", + "source", + "eligible", + "issueNumbers", + "solvedByPullRequests", + "baseMultiplier", + "appliedMultiplier", + "reason", + "warnings" + ] + }, + "deltaExplanation": { + "type": "string" + } + }, + "required": [ + "name", + "source", + "assumptions", + "scoreEstimate", + "gates", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "linkedIssueMultiplier", + "deltaExplanation" + ] + } + }, + "scoreabilityStatus": { + "type": "string", + "enum": [ + "blocked", + "conditionally_scoreable", + "scoreable", + "hold" + ] + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "assumptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "recommendation": { + "type": "object", + "properties": { + "level": { + "type": "string", + "enum": [ + "strong_fit", + "reasonable_fit", + "needs_work", + "hold" + ] + }, + "actions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "level", + "actions" + ] + } + }, + "required": [ + "repoFullName", + "generatedAt", + "scoringModelSnapshotId", + "activeModel", + "privateOnly", + "laneMath", + "scoreEstimate", + "linkedIssueMultiplier", + "gates", + "branchEligibility", + "effectiveEstimatedScore", + "underlyingPotentialScore", + "blockedBy", + "gateDeltas", + "scenarioPreviews", + "scoreabilityStatus", + "warnings", + "assumptions", + "recommendation" + ] + }, + "RepoRewardRisk": { + "type": "object", + "properties": { + "login": { + "type": "string" + }, + "repoFullName": { + "type": "string" + }, + "generatedAt": { + "type": "string" + }, + "roleContext": { + "$ref": "#/components/schemas/RoleContext" + }, + "lane": { + "$ref": "#/components/schemas/LaneAdvice" + }, + "recommendation": { + "type": "string", + "enum": [ + "pursue", + "cleanup_first", + "maintainer_lane", + "avoid_for_now", + "unknown" + ] + }, + "rewardUpside": { + "type": "object", + "properties": { + "relevantLane": { + "type": "string", + "enum": [ + "direct_pr", + "issue_discovery", + "maintainer_lane", + "none" ] }, - "gateDeltas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "gate": { - "type": "string", - "enum": [ - "open_pr_threshold", - "credibility_floor", - "linked_issue_multiplier" - ] - }, - "current": { - "type": "string" - }, - "projected": { - "type": "string" - }, - "explanation": { - "type": "string" - } - }, - "required": [ - "gate", - "current", - "projected", - "explanation" - ] - } + "repoSlice": { + "type": "number" + }, + "directPrSlice": { + "type": "number" + }, + "issueDiscoverySlice": { + "type": "number" + }, + "maintainerCutSlice": { + "type": "number" + }, + "labelMultiplier": { + "type": "number" + }, + "issueMultiplier": { + "type": "number" + }, + "estimatedScoreIfClean": { + "type": "number" }, - "blockedBy": { - "type": "array", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "enum": [ - "repo_not_registered", - "inactive_allocation", - "base_token_gate", - "open_pr_threshold", - "credibility_floor", - "review_penalty", - "metadata_only", - "linked_issue_invalid", - "linked_issue_unvalidated", - "branch_ineligible", - "branch_eligibility_missing" - ] - }, - "severity": { - "type": "string", - "enum": [ - "blocker", - "reducer", - "context" - ] - }, - "detail": { - "type": "string" - } - }, - "required": [ - "code", - "severity", - "detail" - ] - } + "currentEstimatedScore": { + "type": "number" } }, "required": [ - "current", - "bestReasonableCase", - "gateDeltas", - "blockedBy" + "relevantLane", + "repoSlice", + "directPrSlice", + "issueDiscoverySlice", + "maintainerCutSlice", + "labelMultiplier", + "issueMultiplier", + "estimatedScoreIfClean", + "currentEstimatedScore" ] }, - "observedPullRequestScenarios": { + "scoreBlockers": { + "type": "array", + "items": { + "type": "string" + } + }, + "riskBreakdown": { "type": "object", "properties": { - "approvedOrMergeable": { + "queueBurden": { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "critical" + ] + }, + "queueBurdenScore": { "type": "number" }, - "stale": { + "duplicateClusters": { "type": "number" }, - "closed": { + "highRiskDuplicateClusters": { "type": "number" }, - "draft": { + "closedPullRequestRate": { "type": "number" }, - "blocked": { + "openPullRequests": { "type": "number" }, - "maintainerLane": { + "credibility": { "type": "number" }, - "notes": { - "type": "array", - "items": { - "type": "string" - } + "reviewChurnRisk": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] } }, "required": [ - "approvedOrMergeable", - "stale", - "closed", - "draft", - "blocked", - "maintainerLane", - "notes" + "queueBurden", + "queueBurdenScore", + "duplicateClusters", + "highRiskDuplicateClusters", + "closedPullRequestRate", + "openPullRequests", + "credibility", + "reviewChurnRisk" + ] + }, + "actionImpact": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "currentPreview": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "afterCleanupPreview": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RewardRiskAction" + } + }, + "whyThisHelps": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + } + }, + "required": [ + "login", + "repoFullName", + "generatedAt", + "roleContext", + "lane", + "recommendation", + "rewardUpside", + "scoreBlockers", + "riskBreakdown", + "actionImpact", + "currentPreview", + "afterCleanupPreview", + "actions", + "whyThisHelps", + "nextActions", + "summary" + ] + }, + "RewardRiskAction": { + "type": "object", + "properties": { + "actionKind": { + "type": "string", + "enum": [ + "cleanup_existing_prs", + "land_existing_prs", + "close_or_withdraw_low_fit_prs", + "open_new_direct_pr", + "file_issue_discovery", + "maintainer_lane_improve_repo", + "maintainer_cut_readiness" + ] + }, + "repoFullName": { + "type": "string" + }, + "priorityScore": { + "type": "number" + }, + "laneValueScore": { + "type": "number" + }, + "scoreabilityScore": { + "type": "number" + }, + "personalFitScore": { + "type": "number" + }, + "riskPenalty": { + "type": "number" + }, + "maintainerFrictionPenalty": { + "type": "number" + }, + "actionLeverageScore": { + "type": "number" + }, + "whyThisHelps": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextActions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "actionKind", + "repoFullName", + "priorityScore", + "laneValueScore", + "scoreabilityScore", + "personalFitScore", + "riskPenalty", + "maintainerFrictionPenalty", + "actionLeverageScore", + "whyThisHelps", + "nextActions" + ] + }, + "LocalWorkspaceIntelligence": { + "type": "object", + "properties": { + "version": { + "type": "number", + "enum": [ + 2 ] }, - "githubBranchStatus": { + "sourceUpload": { "type": "object", "properties": { - "source": { - "type": "string", - "enum": [ - "cached_github_data" - ] - }, - "status": { - "type": "string", + "enabled": { + "type": "boolean", "enum": [ - "approved", - "failing_checks", - "needs_author", - "blocked", - "pending_review", - "no_pr", - "unknown" + false ] }, - "pullNumber": { - "type": "number" - }, - "title": { + "detail": { "type": "string" - }, - "reviewDecision": { - "type": "string", - "nullable": true - }, - "mergeableState": { - "type": "string", - "nullable": true - }, - "notes": { - "type": "array", - "items": { - "type": "string" - } } }, "required": [ - "source", - "status", - "notes" + "enabled", + "detail" ] }, - "branchEligibility": { + "branch": { "type": "object", "properties": { - "required": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "eligible", - "ineligible", - "unknown", - "not_required" - ] - }, - "evidence": { - "type": "string", - "enum": [ - "provided", - "missing" - ] - }, - "source": { - "type": "string", - "enum": [ - "github_metadata", - "local_metadata", - "registry", - "user_supplied", - "missing" - ] - }, - "reason": { + "name": { "type": "string" }, - "checkedAt": { + "baseRef": { "type": "string" }, - "stale": { - "type": "boolean" + "headSha": { + "type": "string" }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } + "pendingCommitCount": { + "type": "number" } }, "required": [ - "required", - "status", - "evidence", - "source", - "stale", - "warnings" + "pendingCommitCount" ] }, - "rewardRisk": { - "$ref": "#/components/schemas/RepoRewardRisk" - }, - "scoreBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "branchQualityBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "accountStateBlockers": { - "type": "array", - "items": { - "type": "string" - } - }, - "recommendedRerunCondition": { - "type": "string" - }, - "localFindings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Finding" - } - }, - "maintainerFit": { + "changedFiles": { "type": "object", "properties": { - "recommendation": { - "type": "string", - "enum": [ - "pursue", - "cleanup_first", - "maintainer_lane", - "avoid_for_now", - "unknown" - ] + "total": { + "type": "number" }, - "reviewBurden": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] + "added": { + "type": "number" }, - "role": { - "type": "string", - "enum": [ - "outside_contributor", - "repo_maintainer", - "org_member", - "collaborator", - "owner", - "unknown" - ] + "modified": { + "type": "number" }, - "maintainerLane": { - "type": "boolean" + "deleted": { + "type": "number" }, - "reasons": { - "type": "array", - "items": { - "type": "string" - } + "renamed": { + "type": "number" }, - "risks": { + "binary": { + "type": "number" + }, + "paths": { "type": "array", "items": { "type": "string" @@ -6683,101 +6760,108 @@ } }, "required": [ - "recommendation", - "reviewBurden", - "role", - "maintainerLane", - "reasons", - "risks" + "total", + "added", + "modified", + "deleted", + "renamed", + "binary", + "paths" ] }, - "manifestGuidance": { + "testEvidence": { "type": "object", "properties": { - "present": { - "type": "boolean" - }, - "source": { + "level": { "type": "string", "enum": [ - "repo_file", - "api_record", + "test_files", + "validation_commands", + "both", "none" ] }, - "linkedIssuePolicy": { - "type": "string", - "enum": [ - "required", - "preferred", - "optional" - ] - }, - "issueDiscoveryPolicy": { - "type": "string", - "enum": [ - "encouraged", - "neutral", - "discouraged" - ] - }, - "matchedWantedPaths": { - "type": "array", - "items": { - "type": "string" - } - }, - "matchedBlockedPaths": { - "type": "array", - "items": { - "type": "string" - } - }, - "preferredLabelHits": { - "type": "array", - "items": { - "type": "string" - } + "testFileCount": { + "type": "number" }, - "findings": { + "passedValidationCount": { + "type": "number" + }, + "commands": { "type": "array", "items": { "type": "object", "properties": { - "code": { + "command": { "type": "string" }, - "severity": { + "status": { "type": "string", "enum": [ - "info", - "warning", - "critical" + "passed", + "failed", + "not_run" ] }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - }, - "action": { + "summary": { "type": "string" } }, "required": [ - "code", - "severity", - "title", - "detail" + "command", + "status" ] } + } + }, + "required": [ + "level", + "testFileCount", + "passedValidationCount", + "commands" + ] + }, + "linkedIssues": { + "type": "array", + "items": { + "type": "number" + } + }, + "baseFreshness": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "fresh", + "stale", + "possibly_stale", + "unknown" + ] }, - "publicNextSteps": { - "type": "array", - "items": { - "type": "string" - } + "baseRef": { + "type": "string" + }, + "baseSha": { + "type": "string" + }, + "headSha": { + "type": "string" + }, + "mergeBaseSha": { + "type": "string" + }, + "remoteTrackingSha": { + "type": "string" + }, + "changedFileCount": { + "type": "number" + }, + "testFileCount": { + "type": "number" + }, + "passedValidationCount": { + "type": "number" }, "warnings": { "type": "array", @@ -6785,116 +6869,59 @@ "type": "string" } }, - "summary": { + "recommendation": { "type": "string" } }, "required": [ - "present", - "source", - "linkedIssuePolicy", - "issueDiscoveryPolicy", - "matchedWantedPaths", - "matchedBlockedPaths", - "preferredLabelHits", - "findings", - "publicNextSteps", - "warnings", - "summary" + "status", + "changedFileCount", + "testFileCount", + "passedValidationCount", + "warnings" ] }, - "prPacket": { + "ciStatusHints": { + "type": "array", + "items": { + "type": "string" + } + }, + "localScorerDiagnostics": { "type": "object", "properties": { - "titleSuggestion": { + "mode": { "type": "string" }, - "markdown": { + "activeModel": { "type": "string" }, - "bodySections": { + "warnings": { "type": "array", "items": { - "type": "object", - "properties": { - "heading": { - "type": "string" - }, - "lines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "heading", - "lines" - ] + "type": "string" } }, - "reviewerNotes": { + "metadataOnly": { + "type": "boolean" + } + }, + "required": [ + "mode", + "warnings", + "metadataOnly" + ] + }, + "blockers": { + "type": "object", + "properties": { + "branchQuality": { "type": "array", "items": { "type": "string" } }, - "validationSummary": { - "type": "object", - "properties": { - "passed": { - "type": "number" - }, - "failed": { - "type": "number" - }, - "notRun": { - "type": "number" - }, - "commands": { - "type": "array", - "items": { - "type": "object", - "properties": { - "command": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "passed", - "failed", - "not_run", - "skipped", - "focused", - "unknown" - ] - }, - "summary": { - "type": "string" - }, - "durationMs": { - "type": "number" - }, - "exitCode": { - "type": "number" - } - }, - "required": [ - "command", - "status" - ] - } - } - }, - "required": [ - "passed", - "failed", - "notRun", - "commands" - ] - }, - "publicSafeWarnings": { + "accountState": { "type": "array", "items": { "type": "string" @@ -6902,52 +6929,25 @@ } }, "required": [ - "titleSuggestion", - "markdown", - "bodySections", - "reviewerNotes", - "validationSummary", - "publicSafeWarnings" + "branchQuality", + "accountState" ] }, - "nextActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RewardRiskAction" - } - }, - "workspaceIntelligence": { - "$ref": "#/components/schemas/LocalWorkspaceIntelligence" - }, - "summary": { + "rerunWhen": { "type": "string" } }, "required": [ - "login", - "repoFullName", - "generatedAt", + "version", + "sourceUpload", + "branch", + "changedFiles", + "testEvidence", + "linkedIssues", "baseFreshness", - "lane", - "roleContext", - "preflight", - "scorePreview", - "scenarioScorePreview", - "observedPullRequestScenarios", - "githubBranchStatus", - "branchEligibility", - "rewardRisk", - "scoreBlockers", - "branchQualityBlockers", - "accountStateBlockers", - "recommendedRerunCondition", - "localFindings", - "maintainerFit", - "manifestGuidance", - "prPacket", - "nextActions", - "workspaceIntelligence", - "summary" + "ciStatusHints", + "blockers", + "rerunWhen" ] }, "MaintainerPacket": { @@ -7023,7 +7023,7 @@ "suggestedActions" ] }, - "ContributorIntakeHealth": { + "MaintainerLaneReport": { "type": "object", "properties": { "repoFullName": { @@ -7032,38 +7032,23 @@ "generatedAt": { "type": "string" }, - "level": { - "type": "string", - "enum": [ - "healthy", - "watch", - "strained", - "blocked" - ] + "lane": { + "$ref": "#/components/schemas/LaneAdvice" }, - "score": { + "maintainerCut": { "type": "number" }, - "queueHealth": { - "type": "object", - "additionalProperties": { - "nullable": true - } + "maintainerCutConfigured": { + "type": "boolean" }, - "configLevel": { - "type": "string", - "enum": [ - "excellent", - "good", - "needs_attention", - "fragile" - ] + "queueHealth": { + "$ref": "#/components/schemas/QueueHealth" }, - "duplicateClusters": { - "type": "number" + "configQuality": { + "$ref": "#/components/schemas/ConfigQuality" }, - "reviewablePullRequests": { - "type": "number" + "contributorIntakeHealth": { + "$ref": "#/components/schemas/ContributorIntakeHealth" }, "summary": { "type": "string" @@ -7078,17 +7063,17 @@ "required": [ "repoFullName", "generatedAt", - "level", - "score", + "lane", + "maintainerCut", + "maintainerCutConfigured", "queueHealth", - "configLevel", - "duplicateClusters", - "reviewablePullRequests", + "configQuality", + "contributorIntakeHealth", "summary", "findings" ] }, - "MaintainerLaneReport": { + "ContributorIntakeHealth": { "type": "object", "properties": { "repoFullName": { @@ -7097,23 +7082,38 @@ "generatedAt": { "type": "string" }, - "lane": { - "$ref": "#/components/schemas/LaneAdvice" + "level": { + "type": "string", + "enum": [ + "healthy", + "watch", + "strained", + "blocked" + ] }, - "maintainerCut": { + "score": { "type": "number" }, - "maintainerCutConfigured": { - "type": "boolean" - }, "queueHealth": { - "$ref": "#/components/schemas/QueueHealth" + "type": "object", + "additionalProperties": { + "nullable": true + } }, - "configQuality": { - "$ref": "#/components/schemas/ConfigQuality" + "configLevel": { + "type": "string", + "enum": [ + "excellent", + "good", + "needs_attention", + "fragile" + ] }, - "contributorIntakeHealth": { - "$ref": "#/components/schemas/ContributorIntakeHealth" + "duplicateClusters": { + "type": "number" + }, + "reviewablePullRequests": { + "type": "number" }, "summary": { "type": "string" @@ -7128,12 +7128,12 @@ "required": [ "repoFullName", "generatedAt", - "lane", - "maintainerCut", - "maintainerCutConfigured", + "level", + "score", "queueHealth", - "configQuality", - "contributorIntakeHealth", + "configLevel", + "duplicateClusters", + "reviewablePullRequests", "summary", "findings" ] @@ -7585,204 +7585,56 @@ "autoLabelEnabled": { "type": "boolean" }, - "gittensorLabel": { - "type": "string" - }, - "createMissingLabel": { - "type": "boolean" - }, - "publicSurface": { - "type": "string", - "enum": [ - "off", - "comment_and_label", - "comment_only", - "label_only" - ] - }, - "includeMaintainerAuthors": { - "type": "boolean" - }, - "requireLinkedIssue": { - "type": "boolean" - }, - "backfillEnabled": { - "type": "boolean" - }, - "privateTrustEnabled": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "nullable": true - }, - "updatedAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "repoFullName", - "commentMode", - "publicSignalLevel", - "checkRunMode", - "checkRunDetailLevel", - "autoLabelEnabled", - "gittensorLabel", - "createMissingLabel", - "publicSurface", - "includeMaintainerAuthors", - "requireLinkedIssue", - "backfillEnabled", - "privateTrustEnabled" - ] - }, - "InstallationHealth": { - "type": "object", - "properties": { - "installationId": { - "type": "number" - }, - "accountLogin": { - "type": "string" - }, - "repositorySelection": { - "type": "string", - "nullable": true - }, - "installedReposCount": { - "type": "number" - }, - "registeredInstalledCount": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "healthy", - "needs_attention", - "broken" - ] - }, - "missingPermissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "missingEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "permissions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "events": { - "type": "array", - "items": { - "type": "string" - } - }, - "checkedAt": { - "type": "string" - }, - "errorSummary": { - "type": "string", - "nullable": true - }, - "requiredPermissions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "requiredEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "optionalVisibleEvents": { - "type": "array", - "items": { - "type": "string" - } - }, - "permissionRemediation": { - "type": "array", - "items": { - "type": "object", - "properties": { - "permission": { - "type": "string" - }, - "requiredAccess": { - "type": "string" - }, - "currentAccess": { - "type": "string" - }, - "ok": { - "type": "boolean" - }, - "action": { - "type": "string" - } - }, - "required": [ - "permission", - "requiredAccess", - "currentAccess", - "ok", - "action" - ] - } - }, - "eventRemediation": { - "type": "array", - "items": { - "type": "object", - "properties": { - "event": { - "type": "string" - }, - "ok": { - "type": "boolean" - }, - "action": { - "type": "string" - } - }, - "required": [ - "event", - "ok", - "action" - ] - } + "gittensorLabel": { + "type": "string" }, - "repairSteps": { - "type": "array", - "items": { - "type": "string" - } + "createMissingLabel": { + "type": "boolean" + }, + "publicSurface": { + "type": "string", + "enum": [ + "off", + "comment_and_label", + "comment_only", + "label_only" + ] + }, + "includeMaintainerAuthors": { + "type": "boolean" + }, + "requireLinkedIssue": { + "type": "boolean" + }, + "backfillEnabled": { + "type": "boolean" + }, + "privateTrustEnabled": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "updatedAt": { + "type": "string", + "nullable": true } }, "required": [ - "installationId", - "accountLogin", - "installedReposCount", - "registeredInstalledCount", - "status", - "missingPermissions", - "missingEvents", - "permissions", - "events", - "checkedAt" + "repoFullName", + "commentMode", + "publicSignalLevel", + "checkRunMode", + "checkRunDetailLevel", + "autoLabelEnabled", + "gittensorLabel", + "createMissingLabel", + "publicSurface", + "includeMaintainerAuthors", + "requireLinkedIssue", + "backfillEnabled", + "privateTrustEnabled" ] }, "InstallationRepair": { @@ -7920,24 +7772,206 @@ ] } }, - "summary": { + "summary": { + "type": "string" + }, + "action": { + "type": "string" + } + }, + "required": [ + "mode", + "enabled", + "affectedRepoCount", + "requiredPermissions", + "summary", + "action" + ] + } + }, + "eventDiagnostics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "missing": { + "type": "boolean" + }, + "optional": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "action": { + "type": "string" + } + }, + "required": [ + "event", + "missing", + "optional", + "summary", + "action" + ] + } + }, + "repairSteps": { + "type": "array", + "items": { + "type": "string" + } + }, + "refresh": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "POST" + ] + }, + "path": { + "type": "string" + }, + "lastCheckedAt": { + "type": "string" + } + }, + "required": [ + "method", + "path", + "lastCheckedAt" + ] + }, + "refreshed": { + "type": "boolean" + } + }, + "required": [ + "generatedAt", + "installation", + "installedRepos", + "requiredPermissions", + "optionalPermissions", + "requiredEvents", + "optionalEvents", + "modeImpacts", + "eventDiagnostics", + "repairSteps", + "refresh" + ] + }, + "InstallationHealth": { + "type": "object", + "properties": { + "installationId": { + "type": "number" + }, + "accountLogin": { + "type": "string" + }, + "repositorySelection": { + "type": "string", + "nullable": true + }, + "installedReposCount": { + "type": "number" + }, + "registeredInstalledCount": { + "type": "number" + }, + "status": { + "type": "string", + "enum": [ + "healthy", + "needs_attention", + "broken" + ] + }, + "missingPermissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "missingEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "checkedAt": { + "type": "string" + }, + "errorSummary": { + "type": "string", + "nullable": true + }, + "requiredPermissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "requiredEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "optionalVisibleEvents": { + "type": "array", + "items": { + "type": "string" + } + }, + "permissionRemediation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string" + }, + "requiredAccess": { + "type": "string" + }, + "currentAccess": { "type": "string" }, + "ok": { + "type": "boolean" + }, "action": { "type": "string" } }, "required": [ - "mode", - "enabled", - "affectedRepoCount", - "requiredPermissions", - "summary", + "permission", + "requiredAccess", + "currentAccess", + "ok", "action" ] } }, - "eventDiagnostics": { + "eventRemediation": { "type": "array", "items": { "type": "object", @@ -7945,24 +7979,16 @@ "event": { "type": "string" }, - "missing": { - "type": "boolean" - }, - "optional": { + "ok": { "type": "boolean" }, - "summary": { - "type": "string" - }, "action": { "type": "string" } }, "required": [ "event", - "missing", - "optional", - "summary", + "ok", "action" ] } @@ -7972,45 +7998,19 @@ "items": { "type": "string" } - }, - "refresh": { - "type": "object", - "properties": { - "method": { - "type": "string", - "enum": [ - "POST" - ] - }, - "path": { - "type": "string" - }, - "lastCheckedAt": { - "type": "string" - } - }, - "required": [ - "method", - "path", - "lastCheckedAt" - ] - }, - "refreshed": { - "type": "boolean" } }, "required": [ - "generatedAt", - "installation", - "installedRepos", - "requiredPermissions", - "optionalPermissions", - "requiredEvents", - "optionalEvents", - "modeImpacts", - "eventDiagnostics", - "repairSteps", - "refresh" + "installationId", + "accountLogin", + "installedReposCount", + "registeredInstalledCount", + "status", + "missingPermissions", + "missingEvents", + "permissions", + "events", + "checkedAt" ] }, "RepoSettingsPreview": { @@ -8229,7 +8229,8 @@ "bot_author", "maintainer_author", "miner_detection_unavailable", - "not_official_gittensor_miner" + "not_official_gittensor_miner", + null ] }, "actions": { @@ -8654,92 +8655,6 @@ "payload" ] }, - "AgentActionExplanationCard": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "whyNow": { - "type": "string" - }, - "scoreabilityBlocker": { - "type": "string" - }, - "risk": { - "type": "string" - }, - "maintainerFriction": { - "type": "string" - }, - "expectedImpact": { - "type": "string" - }, - "blockerGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "enum": [ - "branch", - "account", - "queue", - "scoreability", - "risk", - "maintainer", - "unknown" - ] - }, - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "category", - "items" - ] - } - }, - "rerunWhen": { - "type": "string" - }, - "publicSafe": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "whyNow": { - "type": "string" - }, - "rerunWhen": { - "type": "string" - } - }, - "required": [ - "summary", - "whyNow", - "rerunWhen" - ] - } - }, - "required": [ - "summary", - "whyNow", - "scoreabilityBlocker", - "risk", - "maintainerFriction", - "expectedImpact", - "blockerGroups", - "rerunWhen", - "publicSafe" - ] - }, "AgentAction": { "type": "object", "properties": { @@ -8812,50 +8727,136 @@ } }, "rerunWhen": { - "type": "string", - "nullable": true - }, - "publicSafeSummary": { + "type": "string", + "nullable": true + }, + "publicSafeSummary": { + "type": "string" + }, + "explanationCard": { + "$ref": "#/components/schemas/AgentActionExplanationCard" + }, + "approvalRequired": { + "type": "boolean" + }, + "safetyClass": { + "type": "string", + "enum": [ + "private", + "public_safe", + "approval_required" + ] + }, + "payload": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "createdAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "runId", + "actionType", + "status", + "recommendation", + "why", + "blockedBy", + "publicSafeSummary", + "explanationCard", + "approvalRequired", + "safetyClass", + "payload" + ] + }, + "AgentActionExplanationCard": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "whyNow": { + "type": "string" + }, + "scoreabilityBlocker": { + "type": "string" + }, + "risk": { + "type": "string" + }, + "maintainerFriction": { + "type": "string" + }, + "expectedImpact": { + "type": "string" + }, + "blockerGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "category": { + "type": "string", + "enum": [ + "branch", + "account", + "queue", + "scoreability", + "risk", + "maintainer", + "unknown" + ] + }, + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "category", + "items" + ] + } + }, + "rerunWhen": { "type": "string" }, - "explanationCard": { - "$ref": "#/components/schemas/AgentActionExplanationCard" - }, - "approvalRequired": { - "type": "boolean" - }, - "safetyClass": { - "type": "string", - "enum": [ - "private", - "public_safe", - "approval_required" - ] - }, - "payload": { + "publicSafe": { "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "createdAt": { - "type": "string", - "nullable": true + "properties": { + "summary": { + "type": "string" + }, + "whyNow": { + "type": "string" + }, + "rerunWhen": { + "type": "string" + } + }, + "required": [ + "summary", + "whyNow", + "rerunWhen" + ] } }, "required": [ - "id", - "runId", - "actionType", - "status", - "recommendation", - "why", - "blockedBy", - "publicSafeSummary", - "explanationCard", - "approvalRequired", - "safetyClass", - "payload" + "summary", + "whyNow", + "scoreabilityBlocker", + "risk", + "maintainerFriction", + "expectedImpact", + "blockerGroups", + "rerunWhen", + "publicSafe" ] }, "AgentContextSnapshot": { @@ -9227,45 +9228,233 @@ "blockedRepos": { "type": "number" }, - "partialRepos": { + "partialRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "cappedRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "staleRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "rateLimitedRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "nextRecoverableAt": { + "type": "string", + "nullable": true + } + }, + "required": [ + "status", + "repoCount", + "completeRepos", + "degradedRepos", + "blockedRepos", + "partialRepos", + "cappedRepos", + "staleRepos", + "rateLimitedRepos" + ] + }, + "SyncStatus": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string" + }, + "signalFidelity": { + "$ref": "#/components/schemas/SignalFidelity" + }, + "freshnessSlo": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "fresh", + "degraded", + "blocked" + ] + }, + "generatedAt": { + "type": "string" + }, + "staleCount": { + "type": "number" + }, + "degradedCount": { + "type": "number" + }, + "blockedCount": { + "type": "number" + }, + "missingCount": { + "type": "number" + }, + "launchBlockingCount": { + "type": "number" + }, + "repairRecommended": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "area": { + "type": "string" + }, + "targetKey": { + "type": "string" + }, + "status": { + "type": "string" + }, + "launchBlocking": { + "type": "boolean" + }, + "ageSeconds": { + "type": "number" + }, + "sloSeconds": { + "type": "number" + }, + "breachSeconds": { + "type": "number" + }, + "observedAt": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string" + } + }, + "required": [ + "area", + "targetKey", + "status", + "launchBlocking", + "sloSeconds", + "summary" + ] + } + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "status", + "generatedAt", + "staleCount", + "degradedCount", + "blockedCount", + "missingCount", + "launchBlockingCount", + "repairRecommended", + "items", + "warnings" + ] + }, + "coreSignalFidelity": { + "$ref": "#/components/schemas/CoreSignalFidelity" + }, + "upstreamDrift": { + "$ref": "#/components/schemas/UpstreamStatus" + }, + "historyCoverage": { + "type": "string", + "enum": [ + "sampled", + "counts_only", + "full" + ] + }, + "refreshingRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "waitingForRateLimitRepos": { + "type": "array", + "items": { + "type": "string" + } + }, + "repositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoSyncState" + } + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepoSyncSegment" + } + }, + "githubTotals": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RepoGithubTotalsSnapshot" } }, - "cappedRepos": { + "pullRequestDetailSync": { "type": "array", "items": { - "type": "string" + "type": "object", + "additionalProperties": { + "nullable": true + } } }, - "staleRepos": { + "installations": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/InstallationHealth" } }, - "rateLimitedRepos": { + "rateLimits": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/GitHubRateLimitObservation" } - }, - "nextRecoverableAt": { - "type": "string", - "nullable": true } }, "required": [ - "status", - "repoCount", - "completeRepos", - "degradedRepos", - "blockedRepos", - "partialRepos", - "cappedRepos", - "staleRepos", - "rateLimitedRepos" + "generatedAt", + "signalFidelity", + "freshnessSlo", + "coreSignalFidelity", + "upstreamDrift", + "historyCoverage", + "refreshingRepos", + "waitingForRateLimitRepos", + "repositories", + "segments", + "githubTotals", + "pullRequestDetailSync", + "installations", + "rateLimits" ] }, "CoreSignalFidelity": { @@ -9331,6 +9520,91 @@ "historyCoverage" ] }, + "UpstreamStatus": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "current", + "drift_detected", + "stale", + "unavailable" + ] + }, + "latestCommitSha": { + "type": "string", + "nullable": true + }, + "latestRulesetId": { + "type": "string", + "nullable": true + }, + "latestRulesetGeneratedAt": { + "type": "string", + "nullable": true + }, + "activeModel": { + "type": "string", + "nullable": true, + "enum": [ + "current_density_model", + "pending_saturation_model", + "exponential_saturation_model", + "unknown", + null + ] + }, + "highestSeverity": { + "type": "string", + "nullable": true, + "enum": [ + "low", + "medium", + "high", + "blocking", + null + ] + }, + "affectedAreas": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "registry", + "scoring_model", + "issue_discovery", + "mirror_linkage", + "language_weights", + "source" + ] + } + }, + "registryHyperparameterDrift": { + "$ref": "#/components/schemas/RegistryHyperparameterDriftSummary" + }, + "openReportCount": { + "type": "number" + }, + "reports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpstreamDriftReport" + } + } + }, + "required": [ + "generatedAt", + "status", + "affectedAreas", + "registryHyperparameterDrift", + "openReportCount", + "reports" + ] + }, "RegistryHyperparameterDriftSummary": { "type": "object", "properties": { @@ -9415,135 +9689,7 @@ ] }, "summary": { - "type": "string" - }, - "affectedAreas": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "registry", - "scoring_model", - "issue_discovery", - "mirror_linkage", - "language_weights", - "source" - ] - } - }, - "source": { - "type": "object", - "properties": { - "repo": { - "type": "string", - "nullable": true - }, - "ref": { - "type": "string", - "nullable": true - }, - "commitSha": { - "type": "string", - "nullable": true - } - }, - "required": [ - "repo", - "ref" - ] - }, - "recommendedFollowUp": { - "type": "array", - "items": { - "type": "string" - } - }, - "previousRulesetId": { - "type": "string", - "nullable": true - }, - "currentRulesetId": { - "type": "string", - "nullable": true - }, - "issueNumber": { - "type": "number", - "nullable": true - }, - "issueUrl": { - "type": "string", - "nullable": true - }, - "payload": { - "type": "object", - "additionalProperties": { - "nullable": true - } - }, - "generatedAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "id", - "fingerprint", - "severity", - "status", - "summary", - "affectedAreas", - "generatedAt", - "updatedAt" - ] - }, - "UpstreamStatus": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "current", - "drift_detected", - "stale", - "unavailable" - ] - }, - "latestCommitSha": { - "type": "string", - "nullable": true - }, - "latestRulesetId": { - "type": "string", - "nullable": true - }, - "latestRulesetGeneratedAt": { - "type": "string", - "nullable": true - }, - "activeModel": { - "type": "string", - "nullable": true, - "enum": [ - "current_density_model", - "pending_saturation_model", - "exponential_saturation_model", - "unknown" - ] - }, - "highestSeverity": { - "type": "string", - "nullable": true, - "enum": [ - "low", - "medium", - "high", - "blocking" - ] + "type": "string" }, "affectedAreas": { "type": "array", @@ -9559,26 +9705,71 @@ ] } }, - "registryHyperparameterDrift": { - "$ref": "#/components/schemas/RegistryHyperparameterDriftSummary" - }, - "openReportCount": { - "type": "number" + "source": { + "type": "object", + "properties": { + "repo": { + "type": "string", + "nullable": true + }, + "ref": { + "type": "string", + "nullable": true + }, + "commitSha": { + "type": "string", + "nullable": true + } + }, + "required": [ + "repo", + "ref" + ] }, - "reports": { + "recommendedFollowUp": { "type": "array", "items": { - "$ref": "#/components/schemas/UpstreamDriftReport" + "type": "string" + } + }, + "previousRulesetId": { + "type": "string", + "nullable": true + }, + "currentRulesetId": { + "type": "string", + "nullable": true + }, + "issueNumber": { + "type": "number", + "nullable": true + }, + "issueUrl": { + "type": "string", + "nullable": true + }, + "payload": { + "type": "object", + "additionalProperties": { + "nullable": true } + }, + "generatedAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" } }, "required": [ - "generatedAt", + "id", + "fingerprint", + "severity", "status", + "summary", "affectedAreas", - "registryHyperparameterDrift", - "openReportCount", - "reports" + "generatedAt", + "updatedAt" ] }, "RepoGithubTotalsSnapshot": { @@ -9643,194 +9834,6 @@ "fetchedAt" ] }, - "SyncStatus": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string" - }, - "signalFidelity": { - "$ref": "#/components/schemas/SignalFidelity" - }, - "freshnessSlo": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "fresh", - "degraded", - "blocked" - ] - }, - "generatedAt": { - "type": "string" - }, - "staleCount": { - "type": "number" - }, - "degradedCount": { - "type": "number" - }, - "blockedCount": { - "type": "number" - }, - "missingCount": { - "type": "number" - }, - "launchBlockingCount": { - "type": "number" - }, - "repairRecommended": { - "type": "boolean" - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "area": { - "type": "string" - }, - "targetKey": { - "type": "string" - }, - "status": { - "type": "string" - }, - "launchBlocking": { - "type": "boolean" - }, - "ageSeconds": { - "type": "number" - }, - "sloSeconds": { - "type": "number" - }, - "breachSeconds": { - "type": "number" - }, - "observedAt": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "string" - } - }, - "required": [ - "area", - "targetKey", - "status", - "launchBlocking", - "sloSeconds", - "summary" - ] - } - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "status", - "generatedAt", - "staleCount", - "degradedCount", - "blockedCount", - "missingCount", - "launchBlockingCount", - "repairRecommended", - "items", - "warnings" - ] - }, - "coreSignalFidelity": { - "$ref": "#/components/schemas/CoreSignalFidelity" - }, - "upstreamDrift": { - "$ref": "#/components/schemas/UpstreamStatus" - }, - "historyCoverage": { - "type": "string", - "enum": [ - "sampled", - "counts_only", - "full" - ] - }, - "refreshingRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "waitingForRateLimitRepos": { - "type": "array", - "items": { - "type": "string" - } - }, - "repositories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoSyncState" - } - }, - "segments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoSyncSegment" - } - }, - "githubTotals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepoGithubTotalsSnapshot" - } - }, - "pullRequestDetailSync": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "nullable": true - } - } - }, - "installations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstallationHealth" - } - }, - "rateLimits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GitHubRateLimitObservation" - } - } - }, - "required": [ - "generatedAt", - "signalFidelity", - "freshnessSlo", - "coreSignalFidelity", - "upstreamDrift", - "historyCoverage", - "refreshingRepos", - "waitingForRateLimitRepos", - "repositories", - "segments", - "githubTotals", - "pullRequestDetailSync", - "installations", - "rateLimits" - ] - }, "Readiness": { "type": "object", "properties": { From edc9e558c11cd16be59be3bd80d814eee4830af2 Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Wed, 3 Jun 2026 19:00:34 -0400 Subject: [PATCH 6/6] fix(signals): include recent merged PRs in outcome patterns --- .../public/downloads/gittensory-extension.zip | Bin 20928 -> 0 bytes src/signals/engine.ts | 74 ++---------------- 2 files changed, 8 insertions(+), 66 deletions(-) delete mode 100644 apps/gittensory-ui/public/downloads/gittensory-extension.zip diff --git a/apps/gittensory-ui/public/downloads/gittensory-extension.zip b/apps/gittensory-ui/public/downloads/gittensory-extension.zip deleted file mode 100644 index 86d1bc0c32b98d2eab630c8d7d3a9c950d58a4fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20928 zcmcIs&2J;gb(b9{4kihZg98LG64drC)|4$ar5Vi^S09+2)$UGqK9r#rupy5*EwV`U zs>!Cio6^WyA%8)R`B##Qj{$-l^B3fnV{XaS`Mvk5s;iq#O5=5AS2JSQtE%_?UcFb% z!>|762Y1%w&j)Ki(trI||Ni5(HTwA>9!B%xH2fyl?`COMs6jf-3-#H-=TE+Ve$;<* z_^kix^|LRYy;Qp@I4z1<-tBb8aZ%`Lo@STrXcmW&E>3l(qa+;a^Wc*^m6Z;Desu7% z_w3cne(#{i|Gqx>`>&t9KKQKv0uP>iaX>5gbfKcD((h>9IGw6o=lpMxp6RKIr|Jv0 zrw5hJ3IONf&6^(l{II^~!NO)hJkIn`rJ2g~Id&d~>L~~-w2IUy)A^~lcLQdGN0s{C z(W}=WvH#VW)(2*sCla$J4F~-0#5#MhwkIL^1~bkN)@pW0^lGN*MRZhkKsN zCT1P}=#TdX=}hP4BJ!Cbk|-~pKrQsNhzB5l$eT4h1@tv&7NvRq>gki`PRxenV-V(Z zA@s>2s+$HKJ<9-?m}P@P$iip?`WtuNIPAZ8cJ$@fpZ1SleRc4%fB5>~^JhQrA3ixc zI(SXG-}zN*d^-Dfe465Cj-MPq*|)HS)A>n%78UFLPW*{s1ePMDfA#tojvM|;<09`L zNA1yO`|+Er2iw;l(M+p1qxp0|N?mGNuSm0KtXqTAES>1*@tFob<0L(alB3f&59Rqf zD_1;Htq)4T{V8l6XR5}hPE4Awt^M6dCa>0+Ku)s^CXyQ;*=q9hn?DB8JkoCXxM>w1wl(=?kz zN&FlA#2QoUJWA$TC=hMTq6_e;xSZ*9qA?!wjNMHWxTf%^Dkc^cyLq_wX0s~@`! zK9GnjvPLjhv2d29MLI|m^#N@z9+Wqy!P7J^rqM*p zAhU`dEg9ds`!L+Ze_Mf-l;iWFzb0Ho6b^`XOxg9YloTv`aB7G#@@ih^x=98}nx5sP zjquE0&QA_?mZ#Gwc`_Klb+ZriWn$J}VPs*U^P<&b>BvmAzpsK|-3SPLZO{Y=HXg!5 zIcMIJz_EaUD1|ufUA250VhvjngRUmR*6yjsVcO4BqTV-;W`z#U64VXIqTjVBlq!B0DkK4xcTZrN` zD&R;WBpnxUql(<3hn3M7-q#m>#D2lK$s~=2ZgV62mUU0NrOUEjblvw6$Fx?jfc|WV zqvGG+z@VdxC@$0?JZ_xpFiMivF&mUwIi!iCn2`-Lo-+A5_qlwYusUS%dScSG<7}d>1CU5S*NdLI-CR!E;xl z8jhXvF_A3J#IZ#xITNa2iAc5#j2LPZ&?J8qrkWj_lE20M8`7y2Xf#2W*a*$TF7gSH z{;=iPz>KP-0W}YhN9U#cFB1aCX`~opZO|EQbN-%5s*F1j1G84i#+}2suhbIre$yys zx8=IJu7s;P#@M_>+1N3gXv@gsHaJ%!+Uh`Pmfa7X3 zNF$sG4sL*8CF^p#I$_o|#6W}&z-D8mZZvMjTHmk{Tg$Rdc<`1Rh;zUWRWIWxV&{;H zLr}0dONcywf2X1pxs@jNHdqeOqJ;A^#H|+6qx4ztl}Tup717 zU*~j$`8_bN1X|dV;I%3*Vg7U0<RG2= z`Zt4(6U(iH%_NCftH-;bbH3Ga+jVB3pba=8A%M#kA$l>M@Ssyy4x1R99!6O-$=M2n z^kS+r%n`yv{>a-lgJ*h{meBNR1u&uYay~iX4UA(j`;_7n@d|m`#G@B(<-$S{n^9_XVCIJShp;qu49_*^OpF)FC0s835(&!U^{Z;}O z>J9SC^?Jy~g%;{6NT}!2p&rFkJ!G9DUvXQ1Wc2e&rDw=0vbi<|p_&V4<~Z#t^;dEh zs|kNNui}JpOEp93c!oMP74C#`x4;rG~) z0A8Rf#}=G2Po>!90CSw5=Q$@`+nZZdVx%nIxMZp#e~$9tJk#|V8_Mi$a`4-0#dnEP z9CjV<>DgkmHOZ?%F4R;5t*4aLLDsE8qPo) zI8;(KlQO;#zqSm^m>8EkuiL8YC`xi&inxeTVKkFxQI>1(a79qY$RuRoK>c| zv~}`pJbwp8&h%mt(*`*U14{9->mgK)rcfnxd-L8Rx(1Qs;6w_}edA>MCTb7iB?B-~ zqJ85is$28XC?3RUUGzB_r#Yxm8-J#U!J9Ci4wCs$=eF8t#ISE}#eriydBdgP(qXRG68T%Cxrdc*-~Hns{CM;GYisoL7wGn# zM1!+&mSP83cs${rA64m_;`0Vnqn@g%YjncWi3-9F@f3>$)I#CjM3~LdFq-HvoxVVX zN7EvVhQsGE3XaHjTCIsZ+)xl5LPACf#&r1FI7ep274(s{+Q4$h;y6H`g`|#-W4D%c z`9mg@dIC19gk;mO8Jq6Z>?6w0U>`oL*t@r@S(o#!9lFUYbp2kBYeEC^O zowZiWsGTT*#|V@iY`Akqgo1+e#q5!m&0^c%Pz=+Rf6zXKB!=O)=mecn_q8W!bv*34ECNQ&q3=? z&9e9$ft1SEbaKOC#x3=h*zM#;({P%b!8V_s#>ued#K!iFPv~(NVjvJV8p3I2mpz^6 z0Zyc?AY7DdA2Cgsz)P7A`{XYV&Y>;NX$AwN=w}FGl1fvqR-$3gkCK(Ke^~<16wH=@ za^w=)hym|S7&DuxVn-1~GE<4~Pl^3gsy+tGC1drU8C^@FYe9!%$qR`vuys;K z9C1p{*8>N{E@sTNS`&3_#A1>X zh7Q@4P|6S-5}wRV18oSPosAc4THquajx{fk#OLtU5Qgsud2Z=;crAF~#QI5j@X=MP zS~V8rD5oV^l%JUWwuUTom11_c04!W4UEA9k7FBF99G)?rqA&$OhKnHQ9>{RdDAvM; z-=y)hg+@DRnEeA-k1B9ML~IE)2Yy*9vJz<5&TVy*Fqs4Md&5UFmUIIC` zi?N=$c-J{h7Geq>G7uu{C(%H+I>#UH>;*r0(;34<4o;(txh962qpge!4(72ugAGME zhX)@AT}Q3iAow_%%syd`EZ&OCVDzXm!9s>Z2JCOd=mb? zG5;|-^qv_|AGfQ>mPxtXF26@2#H&>OiS;B;gl1^Dcow4>oGb0Q^QP|#T*7d30%jN* z81uv0?AnEGX7FV?r2MZW?=}g9UAPRj-fF&tMyOv<&H%v+gu+39WNITE$yi4ALmW}~ zniTrOm;KrN1ldPFk473&7@TRjnq(>@b_%78L*&+#B8gqw1}&2#F3*ll-pJID{mExO zxlxK>hDi(j(P|#?6iDMNKuEUw?s87e1K=P~?*GZ)@CvQ{D=qdZ}8CBTb#3dT~$;0VWRRM1U9wM1>@aw~a3 zGp{$)*7oM6hun4LRv5vQl4#)d2&KIW&NhZfiIHY|N?FOJMWAkL(*1Z!2ThtJ%QWfb zd8{w`CWG&vpig*)>Na1PtHxZboEF3t8LdJNH5?YFQ7+%Fo!1P6_$$InY$%^kAXUnX zmrXPf6$;2H|FVPMb*&8Y+u}d|^$OKB`k@NjB$~z}^f$SJPL>+jCw-jh z=~jEtRrjb-5>PP&AA<5^tzMvtU?Qn0TyR$=K)G^|#eCnLW?0qnW>WP6sTLRPIF!I% z6|!=G;C^N(%aj-dxJVjq%2Ql0#634cEyv==xFgF~jsw1s5YUy>ejUVn7XUY)!$CUf z{FF+q-g8s2TYN_Vkg{@FjKsFYD)0msjnAQe{fjh%X%np_6jd9g!xT^qqQOZzoF_WK zTyAXyz3Or?t+0JQQ@r$q64!s}eDG%tYDNo7-EVxGqwPw@u`3%Vn zidyg}cW3X^U2l%vLJq}Oj{aesG)SDaIWo5;px2*)2SFoO=v>w;C8H8Hz`sD3f8xqY9>mbYIPGN!W)EwSIUqDABbl z2*tctQO!AS*n_<@9M^GUwVXiowJ&r$K81=t-1Km$k_ZK{ldK4ZL?oE7&>~Jro*Xmb2}aDjCaV}S;q@cVx8d5>6Y&|kqAi3 z6f?IR%xv!vH+}JHoA<7fy~8B8J*Cr!W|d!*hvy4bPcHD-tNftll3vm?eOtMIY_HvJ z$cqXZsRzI8qlb7h9h$sk)yoZ;{sv_yyx6eQnK`tP!cJ5?+(n{L;KVS_z4G7=`#K9s zwvQJW@j4&9Zs!ymM|SaCw1~U18z>1{-UD*9$ZO!}3q-SYG;*PdR^I8#j7e? zn=$b()L3My&nQCg1~c@FkQ)urJ^AkV(ff{gk)&9O(t&;9u!ffRoQrX%X#!Wi8@%Ey z6>pp2UMgQ6fO<@3?~m`yh?x`9o}9Xac(d`|BuxX#$pC7;q2TCt(UWxdK1=^$By z)%P94Fusoys4PV~g;bty=Xh+}=}^ugb9N+4R(Upnf}59Vk=+^^O>PaA3mi=XM(lIo zN;p@nW|_bH_#gi5(VwlY(GRtR%Qfv)11z!lk{RXnjh9ntfZ9~fl8ob#=S_`x8fktb zfJbn!S-9gX*Bb9MUu@vA8T%aXyk9HNedt^fLLnk4&gI6tubLx*aWkCb@ekMajT{gi zvdvE7ikXO2Q!BotKHHh{Emm-_3pf}Xy~P^VnjIcuZmVV*gLE@Wi&{0Sgd%M3aEsJ5 zTYDycv}k}N+|YbA9s>c3F5ajXg4h&gQ`~8!xXqvNhA02~nH276HNRpgwZdkNY&mg; z+}5z~CZK_}Xd}F?EyD1fKG5w8wX%jJFH}Hd(6Sn9@L6gH)H<_2Ja!P8;M<^%$}M-2J`~HwyC&fv=s(3oYkpz<#0i~ z?0T&4HyUs66*t975lPL}u1+8S?T#e+M6i%$Z)) zfc~-WL4Iw8jOSdd6O^3J;C|GZ)-#18ADtb=9kGGSd4=8+Zr~$(t-wRJ=B<2uoNFVB zg^We*!F7JaARm3&z|$kohL^*W8*U!8e%b6`!eXsr9=uE&=%pGhjz&!JwZc6Q%@-#f z(n6zq18DUQMj(sYi7$9C3*pd5GO}NUA`u9kMP`O^Bb4>vTOf!>2BjiZEX`3~P4R^?qxhW^O>i8hN|7z;ous(EHz_~=rj4$ne%DoZx3(W{Kf3o|o9m-o zt?epQDO&faG`WGmnhaW7o15nsuwW`b$~Ck}^v=~W2$~C-9`tDin(jG{P|xYQy5^F? z)7ISwV9UKNv@9PzqN2+7eGbC40-`C?_@zUy$ZKnBWqJ1`eb>%UBeYpjK4PAzZLA@s zOSHhu|8_T12foL3;O*~J2*%Bq2BFy-n=HJALKVL4VmxhA8w|D50lcHs0sR7%;fIsz zO~u%|%tcozq(Z3LGNr;wW%0p%R2G*ZO?~bv%JCFMaox5hHlsdw&C0IOWj-$<>>GTG zL_E5bm+YtlU(#HYyQxoCinhC&6ov8pPdIVf-A%2O%mL+fg z4Rvp+0^W>xt#Z0pGqu%FuN2Jm{&H8Y!mr--XR6U^N|gL6J$r+d>+y}Cs^(giy{%57$c=8+i7qa*o)Y7I zb2QjkbG$7=bn9>xgBQJFlQVq$7`+X`$m)M-5x%~d-bX10=!>x@y0Oq^eWVj|SIu!7 zI-{#`%j`uB6VFoMQ&$1fwQUMg3x00F?wfhMN=wyHdQ*nF>n#2j32=ll- zNvA3AxS@KVzrcs~YdxMP5#Bd=p{EI6IB*cl$&>bl$e;P(#L$e(W0v6m11kN#oU(}1 zRuM*{lkMmcA%FPQ_rCulP9~5~tSx>$AU!Srz~|9BKlMrVw~WdO|BY`MES+-0)cRW_ z<%UV{-?Dz~qMUcwsa?XTPp$XD%c=jnRn{!2zFD7HuWyz!f4Ni6T;xwZZ!72h c_6t9YJN)X8|AfYVi2wfaduwZdb4Z{54+NVq8~^|S diff --git a/src/signals/engine.ts b/src/signals/engine.ts index 59e4a750e7..014e0702b0 100644 --- a/src/signals/engine.ts +++ b/src/signals/engine.ts @@ -1808,12 +1808,17 @@ function normalizeRecentMergedOutcome( const association = typeof record.payload.author_association === "string" ? (record.payload.author_association as string) : undefined; const fileRecords = filesByNumber.get(record.number) ?? []; const reviewRecords = reviewsByNumber.get(record.number) ?? []; + // Conservative fallback: when author_association is absent or unrecognised, treat as maintainer + // lane so the record is excluded from outside-contributor statistics rather than silently + // inflating the outside-contributor merge rate with unclassifiable data. + const knownOutsider = association === "NONE" || association === "CONTRIBUTOR" || association === "FIRST_TIME_CONTRIBUTOR" || association === "FIRST_TIMER"; + const maintainerLane = isMaintainerAssociation(association) || !knownOutsider; return { number: record.number, bucket: "merged", decided: true, merged: true, - maintainerLane: isMaintainerAssociation(association), + maintainerLane, linked: record.linkedIssues.length > 0, labels: [...new Set(record.labels)].sort(), filePaths: [...new Set([...fileRecords.map((file) => file.path), ...record.changedFiles])].sort(), @@ -1857,69 +1862,6 @@ export function buildRepoOutcomePatterns(args: { const lane = buildLaneAdvice(args.repo, args.repoFullName).lane; const primaryLanguage = args.syncState?.primaryLanguage ?? null; - const knownPrNumbers = new Set( - args.pullRequests.filter((pr) => pr.repoFullName.toLowerCase() === repoKey).map((pr) => pr.number), - ); - const analyzed: RepoOutcomePullRequest[] = [ - ...args.pullRequests - .filter((pr) => pr.repoFullName.toLowerCase() === repoKey) - .map((pr): RepoOutcomePullRequest => { - const mergedDetail = mergedDetailByNumber.get(pr.number); - // Reconcile: a "closed" PR that has a merged record with a timestamp was actually merged and mislabelled. - const merged = Boolean(pr.mergedAt) || pr.state === "merged" || Boolean(mergedDetail?.mergedAt); - const closedUnmerged = !merged && pr.state === "closed"; - const open = !merged && !closedUnmerged; - const stale = open && daysSince(pr.updatedAt ?? pr.createdAt) >= REPO_OUTCOME_STALE_OPEN_DAYS; - const bucket: RepoOutcomeBucket = merged ? "merged" : closedUnmerged ? "closed_unmerged" : stale ? "open_stale" : "open_active"; - const fileRecords = filesByNumber.get(pr.number) ?? []; - const filePaths = [...new Set([...fileRecords.map((file) => file.path), ...(mergedDetail?.changedFiles ?? [])])].sort(); - const reviewRecords = reviewsByNumber.get(pr.number) ?? []; - return { - number: pr.number, - bucket, - decided: merged || closedUnmerged, - merged, - maintainerLane: isMaintainerAssociation(pr.authorAssociation), - linked: pr.linkedIssues.length > 0 || (mergedDetail?.linkedIssues.length ?? 0) > 0, - labels: [...new Set([...pr.labels, ...(mergedDetail?.labels ?? [])])].sort(), - filePaths, - changedLineCount: fileRecords.reduce((sum, file) => sum + file.additions + file.deletions, 0), - authorRole: pr.authorAssociation === "CONTRIBUTOR" ? "returning_contributor" : "first_time_or_external", - hasReview: reviewRecords.length > 0, - changesRequested: reviewRecords.some((review) => review.state === "CHANGES_REQUESTED"), - }; - }), - // Include merged PRs that exist only in recent_merged_pull_requests (absent from pull_requests). - // Derive maintainer lane and author role from payload.author_association when present so that - // owner/member/collaborator merges are not counted in the outside-contributor merge rate. - // Conservative fallback: when author_association is absent or unrecognised, treat as maintainer - // lane so the record is excluded from outside-contributor statistics rather than silently - // inflating the outside-contributor merge rate with unclassifiable data. - ...(args.recentMergedPullRequests ?? []) - .filter((record) => record.repoFullName.toLowerCase() === repoKey && !knownPrNumbers.has(record.number)) - .map((record): RepoOutcomePullRequest => { - const payloadAssociation = typeof record.payload["author_association"] === "string" ? record.payload["author_association"] : undefined; - const knownOutsider = payloadAssociation === "NONE" || payloadAssociation === "CONTRIBUTOR" || payloadAssociation === "FIRST_TIME_CONTRIBUTOR" || payloadAssociation === "FIRST_TIMER"; - const isMaintainer = isMaintainerAssociation(payloadAssociation); - // When association is unknown we cannot safely classify the lane — conservative fallback - // keeps the record out of the outside-contributor decided set. - const maintainerLane = isMaintainer || !knownOutsider; - return { - number: record.number, - bucket: "merged", - decided: true, - merged: true, - maintainerLane, - linked: record.linkedIssues.length > 0, - labels: [...record.labels].sort(), - filePaths: [...record.changedFiles].sort(), - changedLineCount: 0, - authorRole: payloadAssociation === "CONTRIBUTOR" ? "returning_contributor" : "first_time_or_external", - hasReview: false, - changesRequested: false, - }; - }), - ]; const seenNumbers = new Set(); const analyzedFromPullRequests: RepoOutcomePullRequest[] = args.pullRequests .filter((pr) => pr.repoFullName.toLowerCase() === repoKey) @@ -2092,12 +2034,12 @@ export function buildRepoOutcomePatterns(args: { } // evidenceCompleteness tracks detail-sync progress for pull_requests records only — merged-only records from // recent_merged_pull_requests are never eligible for detail sync and must not dilute the denominator. - const syncEligible = analyzed.filter((pr) => knownPrNumbers.has(pr.number)); + const syncEligible = analyzed.filter((pr) => seenNumbers.has(pr.number)); const withFileDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.filesSyncedAt)).length; const withReviewDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.reviewsSyncedAt)).length; const withCheckDetail = syncEligible.filter((pr) => Boolean(detailByNumber.get(pr.number)?.checksSyncedAt)).length; const fullyDecidedWithDetail = decided.filter((pr) => { - if (!knownPrNumbers.has(pr.number)) return false; + if (!seenNumbers.has(pr.number)) return false; const state = detailByNumber.get(pr.number); return Boolean(state?.filesSyncedAt && state?.reviewsSyncedAt && state?.checksSyncedAt); }).length;