Skip to content

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

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
phamngocquy:miner/issue-9302-v3
Jul 27, 2026

Conversation

@phamngocquy

Copy link
Copy Markdown
Contributor

Summary

Re-opened after prior PRs (#9422, #9427, #9429) were closed — conflicts with main and/or one-shot review policy (no post-open pushes).

Rebased onto current main (includes #9421, #9426, #9415, #9419).

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

  • registerPath entries for all five routes in src/openapi/spec.ts
  • Three new response schemas in src/openapi/schemas.ts (gate-precision, outcome-calibration, activation-preview)
  • Wires existing MaintainerNoiseReport / AmsMinerCohortComparison components to their paths
  • Regenerated apps/loopover-ui/public/openapi.json via npm run ui:openapi
  • Regression tests in test/unit/openapi.test.ts (tool-parity for all five routes; scoring-route and pending-actions tests from merged PRs retained)

Scope

Validation

  • npm run ui:openapi + npm run ui:openapi:check
  • npx vitest run test/unit/openapi.test.ts

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:36
@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 (bc666b6) to head (642942b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9436      +/-   ##
==========================================
+ Coverage   75.51%   76.10%   +0.59%     
==========================================
  Files         275      278       +3     
  Lines       58032    59636    +1604     
  Branches     6209     6456     +247     
==========================================
+ Hits        43820    45388    +1568     
- Misses      13942    13955      +13     
- Partials      270      293      +23     
Flag Coverage Δ
backend 97.75% <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.57% <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

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-27 18:46:14 UTC

5 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

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 — 6 non-blocking
  • src/openapi/schemas.ts uses z.unknown()/z.array(z.unknown()) for several nested fields (perGateType, overall, slop, recommendations, samples) — this documents the shape only loosely; consider tightening if the underlying report builders' shapes stabilize.
  • The magic HTTP status literals (200/401/403) repeated across all five new registerPath blocks mirror the existing file's convention, so this is a style nit only, not a new pattern introduced by this diff.
  • test/unit/openapi.test.ts's new parity test only checks top-level property key sets equal, not types/nesting, so a field renamed to a different type on either side would still pass.
  • Consider whether perGateType/overall could be typed more precisely from buildGatePrecisionReport's return shape rather than z.unknown(), to catch drift at the OpenAPI layer too.
  • Double check the regenerated openapi.json diff (not fully visible here) doesn't include unrelated churn beyond the five new paths/schemas.
  • 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 maintainer-report routes, defines the three new response schemas (GatePrecisionResponse, OutcomeCalibrationResponse, ActivationPreviewResponse) with field parity to their MCP output shapes, wires the two already-existing schemas to their paths, regenerates openapi.json, and adds a regression test asserting all five paths and schema key parity.

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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit fb8e2eb into JSONbored:main Jul 27, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 28, 2026
12 tasks
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