Skip to content

fix(openapi): document selftune override audit and clear routes (#9303) - #9442

Merged
JSONbored merged 3 commits into
JSONbored:mainfrom
andriypolanski:fix/9303-openapi-selftune-overrides
Jul 27, 2026
Merged

fix(openapi): document selftune override audit and clear routes (#9303)#9442
JSONbored merged 3 commits into
JSONbored:mainfrom
andriypolanski:fix/9303-openapi-selftune-overrides

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

  • Closes openapi: selftune/overrides (audit + clear) missing from spec (MCP tools + schemas already exist) #9303
  • Adds SelftuneOverrideAuditResponse and ClearSelftuneOverrideResponse schemas mirroring selftuneOverrideAuditOutputSchema / clearSelftuneOverrideOutputSchema.
  • Registers GET /v1/repos/{owner}/{repo}/selftune/overrides/audit (optional limit query) and DELETE /v1/repos/{owner}/{repo}/selftune/overrides (confirm:true body) next to gate-config/effective.
  • Regenerates and commits apps/loopover-ui/public/openapi.json.
  • Adds an OpenAPI regression test for both paths/methods and response schema key parity.

Why #9411 closed

PR #9411 was closed after a dirty/conflicting base (and a mistaken screenshot-table close heuristic on a docs-only change). This is a fresh reimplementation on current upstream/main.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run ui:openapi + npm run ui:openapi:check
  • npx vitest run test/unit/openapi.test.ts — 7 passed
  • npm run test:ci (full gate; run before push)
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

OpenAPI documentation + regeneration + targeted contract test complete. Full test:ci left for the opener.

Safety

  • No secrets, wallets, hotkeys, trust scores, or reward values.
  • Does not touch site/, CNAME, **/lovable/**, or root CHANGELOG.md.

UI Evidence

N/A — OpenAPI contract / generated openapi.json only; no product UI change. Do not treat as a visual PR.

Notes for reviewers / gate

  • No production route behavior change — documentation parity only.
  • Response fields are .optional() to match the MCP outputSchema shapes field-for-field.

andriy-polanski and others added 3 commits July 27, 2026 18:29
…bored#9303)

GET .../selftune/overrides/audit and DELETE .../selftune/overrides were live
(and MCP-backed) but absent from OpenAPI. Add response schemas mirroring the
MCP output shapes, register both paths (optional limit query + confirm body),
regenerate openapi.json, and add a parity regression test. Replaces closed
PR 9411 on current main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the openapi.json conflict by regenerating from the merged
schemas/spec sources so JSONbored#9303 selftune override routes and main coexist.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 75.68%. Comparing base (fb8e2eb) to head (9876c50).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9442      +/-   ##
==========================================
+ Coverage   75.51%   75.68%   +0.17%     
==========================================
  Files         275      277       +2     
  Lines       58032    58462     +430     
  Branches     6209     6216       +7     
==========================================
+ Hits        43820    44249     +429     
  Misses      13942    13942              
- Partials      270      271       +1     
Flag Coverage Δ
backend 99.76% <100.00%> (?)

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

Files with missing lines Coverage Δ
src/openapi/schemas.ts 100.00% <100.00%> (ø)
src/openapi/spec.ts 99.61% <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

Important

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏳ LoopOver is waiting…

LoopOver has seen this pull request and is waiting on CI checks to finish before reviewing it. This comment will update once the review runs.

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

@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.

@JSONbored
JSONbored merged commit 2e4388d into JSONbored:main Jul 27, 2026
10 checks passed
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: selftune/overrides (audit + clear) missing from spec (MCP tools + schemas already exist)

3 participants