Skip to content

docs(openapi): document validate-linked-issue + check-before-start routes (#9304) - #9440

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-openapi-prework-routes-9304
Closed

docs(openapi): document validate-linked-issue + check-before-start routes (#9304)#9440
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-openapi-prework-routes-9304

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Problem

Closes #9304.

Two live POST /v1/repos/:owner/:repo/* pre-work-check routes in src/api/routes.ts each already have an MCP tool with its own Zod shapes in src/mcp/server.ts, but neither appears in src/openapi/spec.ts:

  • POST …/validate-linked-issueloopover_validate_linked_issue (validateLinkedIssueOutputSchema)
  • POST …/check-before-startloopover_check_before_start (checkBeforeStartOutputSchema)

Fix

Mirrors the #6611 pattern for gate-config/effective (and the evaluate-escalation POST mirror):

  1. src/openapi/schemas.ts: added ValidateLinkedIssueRequestSchema/ValidateLinkedIssueResponseSchema and CheckBeforeStartRequestSchema/CheckBeforeStartResponseSchema — field-level parity with the MCP tools' inputSchema/outputSchema (following the repo convention of representing shapes with basic Zod types, without the internal PREFLIGHT_LIMITS max constraints).
  2. src/openapi/spec.ts: registry.register all four as components and registerPath both routes (params + request body + response, with 400/401/403).
  3. Regenerated apps/loopover-ui/public/openapi.json — committed here; npm run ui:openapi:check enforces it in CI.

Verification

test/unit/openapi.test.ts passes; buildOpenApiSpec() includes both new paths; regeneration is byte-stable (100% patch coverage on the new schemas.ts/spec.ts lines via the openapi test).

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 27, 2026 18:46
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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

@RealDiligent
RealDiligent force-pushed the fix/critical-issue-openapi-prework-routes-9304 branch from faea18e to 75bbffd Compare July 27, 2026 18:57
@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
…utes

Two live POST /v1/repos/:owner/:repo pre-work-check routes
(validate-linked-issue, check-before-start) each already back an MCP tool with
its own Zod shapes but were absent from the OpenAPI spec. Add
ValidateLinkedIssue/CheckBeforeStart request+response schemas in schemas.ts
(field-level parity with the MCP inputSchema/outputSchema), register both as
components and registerPath entries in spec.ts (mirroring the
gate-config/effective + evaluate-escalation patterns), and regenerate the
committed apps/loopover-ui/public/openapi.json.
@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 (fb8e2eb) to head (75bbffd).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9440       +/-   ##
===========================================
- Coverage   89.54%   75.69%   -13.86%     
===========================================
  Files         843      277      -566     
  Lines      110011    58466    -51545     
  Branches    26184     6216    -19968     
===========================================
- Hits        98511    44253    -54258     
- Misses      10238    13942     +3704     
+ Partials     1262      271      -991     
Flag Coverage Δ
backend 99.76% <100.00%> (+4.50%) ⬆️

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%> (+<0.01%) ⬆️

... and 704 files with indirect coverage changes

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. review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openapi: validate-linked-issue + check-before-start missing from spec (MCP tools + schemas already exist)

1 participant