Skip to content

fix(openapi): document /v1/opportunities/find + /v1/issue-rag/retrieve (#9310) - #9448

Closed
andriypolanski wants to merge 5 commits into
JSONbored:mainfrom
andriypolanski:fix/9310-openapi-opportunities-issue-rag
Closed

fix(openapi): document /v1/opportunities/find + /v1/issue-rag/retrieve (#9310)#9448
andriypolanski wants to merge 5 commits into
JSONbored:mainfrom
andriypolanski:fix/9310-openapi-opportunities-issue-rag

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Closes #9310

Summary

  • Adds FindOpportunitiesRequest/FindOpportunitiesResponse and IssueRagRetrieveRequest/IssueRagRetrieveResponse schemas mirroring the MCP tool Zod shapes (reusing the same MAX_FIND_OPPORTUNITIES_* / MAX_ISSUE_RAG_* / PREFLIGHT_LIMITS constants).
  • Registers both POST paths in src/openapi/spec.ts (same registration pattern as #6611 / gate-config/effective).
  • Regenerates and commits apps/loopover-ui/public/openapi.json.
  • Extends openapi.test.ts with path/schema presence + field regression guards (aiPolicyAllowed, retrievedPathCount).

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 — 5 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.

Notes for reviewers / gate

  • No production route behavior change — documentation parity only.
  • Fresh PR required: closed PRs are not reopened after conflict auto-close.

andriy-polanski and others added 4 commits July 27, 2026 18:13
JSONbored#9310)

Both discovery routes were live (and MCP-backed) but absent from OpenAPI.
Add request/response schemas mirroring the MCP tool shapes, register the
POST paths, regenerate openapi.json, and add regression assertions.
Replaces conflict-closed JSONbored#9423 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#9310 opportunities/issue-rag paths and main coexist.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot closed this Jul 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included.

@loopover-orb loopover-orb Bot added the review-evasion Gittensor contributor context 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

@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.69%. Comparing base (2e4388d) to head (09c6aa6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9448      +/-   ##
==========================================
+ Coverage   75.51%   75.69%   +0.18%     
==========================================
  Files         275      277       +2     
  Lines       58032    58470     +438     
  Branches     6209     6216       +7     
==========================================
+ Hits        43820    44257     +437     
  Misses      13942    13942              
- Partials      270      271       +1     
Flag Coverage Δ
backend 99.77% <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.62% <100.00%> (ø)

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

Labels

review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openapi: /v1/opportunities/find + /v1/issue-rag/retrieve missing from spec (MCP tools + schemas already exist)

2 participants