Skip to content

openapi: 5 repo maintainer-report routes missing from spec (maintainer-noise, ams-miner-cohort, gate-precision, outcome-calibration, activation-preview) - #9427

Closed
phamngocquy wants to merge 1 commit into
JSONbored:mainfrom
phamngocquy:miner/issue-9302
Closed

Conversation

@phamngocquy

Copy link
Copy Markdown
Contributor

Summary

Re-opened after #9422 was closed for base-branch conflicts (rebased onto main after #9421 merged).

Five GET /v1/repos/:owner/:repo/* maintainer-report routes are live and MCP-mirrored but were missing from the OpenAPI spec. This PR adds:

Scope

Validation

  • npm run ui:openapi + npm run ui:openapi:check
  • npx vitest run test/unit/openapi.test.ts (6 tests)

UI Evidence

N/A — schema/doc-only change; no visible UI change. Regenerated openapi.json is the OpenAPI artifact, not a UI screenshot.

Fixes #9302

Made with Cursor

…r-noise, ams-miner-cohort, gate-precision, outcome-calibration, activation-preview)

Fixes JSONbored#9302
@phamngocquy
phamngocquy requested a review from JSONbored as a code owner July 27, 2026 18:14
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-27 18:24:00 UTC

5 files · 1 AI reviewer · no blockers · CI green · dirty

⏸️ Suggested Action - Manual Review

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
  • src/openapi/schemas.ts: the three new response schemas use `z.unknown()`/`z.array(z.unknown())` for structured sub-fields (perGateType, overall, slop, recommendations, findingCodeCounts, samples), which keeps the OpenAPI doc largely opaque for API consumers — consider inlining shapes if the underlying report builders' shapes are stable enough.
  • The magic HTTP status codes (200/401/403) flagged by the external brief are standard OpenAPI response keys, not unexplained literals — no action needed there.
  • Consider whether the gate-precision/outcome-calibration query param (windowDays) should also be documented with a description/example, matching the style used elsewhere in spec.ts for query params.
  • If perGateType/overall/slop/recommendations shapes are stable (buildGatePrecisionReport et al. are called out as 'single source of truth' in server.ts), a follow-up PR could replace z.unknown() with real nested schemas for stronger API-consumer value.
  • Diff looks like trivial or whitespace-only churn — Reduce whitespace-only or formatting-only churn and keep the diff focused on substantive changes.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9302
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 18 registered-repo PR(s), 9 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor phamngocquy; Gittensor profile; 18 PR(s), 0 issue(s).
Improvement ✅ Minor risk: low · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff adds registerPath entries for all five routes, defines and registers the three new response schemas with field parity to the MCP output shapes, regenerates openapi.json, and adds a regression test asserting all five paths and schema key parity in buildOpenApiSpec's output.

Review context
  • Author: phamngocquy
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 18 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.10%. Comparing base (4b761fa) to head (ba03094).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9427      +/-   ##
==========================================
+ Coverage   75.51%   76.10%   +0.59%     
==========================================
  Files         275      278       +3     
  Lines       58032    59624    +1592     
  Branches     6209     6456     +247     
==========================================
+ Hits        43820    45376    +1556     
- Misses      13942    13955      +13     
- Partials      270      293      +23     
Flag Coverage Δ
backend 97.73% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/mcp/server.ts 97.13% <100.00%> (ø)
src/openapi/schemas.ts 100.00% <100.00%> (ø)
src/openapi/spec.ts 99.55% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openapi: 5 repo maintainer-report routes missing from spec (maintainer-noise, ams-miner-cohort, gate-precision, outcome-calibration, activation-preview)

1 participant