⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
⚠️ Required pattern: mirror how GET /v1/repos/{owner}/{repo}/gate-config/effective is documented
in src/openapi/spec.ts — issue #6611 fixed the exact same class of gap for that route.
Context
Two POST /v1/repos/:owner/:repo/* pre-work-check routes in src/api/routes.ts are live and each
already has an MCP tool with its own Zod output shape in src/mcp/server.ts:
POST /v1/repos/:owner/:repo/validate-linked-issue → loopover_validate_linked_issue
(outputSchema: validateLinkedIssueOutputSchema)
POST /v1/repos/:owner/:repo/check-before-start → loopover_check_before_start
(outputSchema: checkBeforeStartOutputSchema)
Neither route appears in src/openapi/spec.ts — grep for validate-linked-issue and
check-before-start in that file returns nothing.
Requirements
- In
src/openapi/schemas.ts, define ValidateLinkedIssueResponseSchema and
CheckBeforeStartResponseSchema as z.object({...}) schemas, using validateLinkedIssueOutputSchema
and checkBeforeStartOutputSchema (the raw Zod shapes already validated in src/mcp/server.ts) as
the field-level source of truth.
- In
src/openapi/spec.ts, registry.register both schemas as components, then add registerPath
entries for both routes, including their request-body schemas (mirror the MCP tools'
validateLinkedIssueShape/equivalent check-before-start input shape for the request body).
- Schema is the contract — regenerate and commit. Run
npm run ui:openapi after the edits and
commit the regenerated apps/loopover-ui/public/openapi.json in this same PR. CI enforces this via
npm run ui:openapi:check (part of npm run test:ci).
Deliverables
All deliverables are required in this one PR — there is no follow-up issue.
Test Coverage Requirements
99%+ Codecov patch target (codecov/patch, unsharded via npm run test:coverage) on any new schema
helper code. Add a regression test asserting both paths appear in buildOpenApiSpec()'s output with
the correct method and request/response schemas whose keys match each route's MCP tool shapes.
Expected Outcome
Both pre-work-check routes are documented in GET /openapi.json /
apps/loopover-ui/public/openapi.json, matching what their MCP tools already validate.
Links & Resources
Context
Two
POST /v1/repos/:owner/:repo/*pre-work-check routes insrc/api/routes.tsare live and eachalready has an MCP tool with its own Zod output shape in
src/mcp/server.ts:POST /v1/repos/:owner/:repo/validate-linked-issue→loopover_validate_linked_issue(
outputSchema: validateLinkedIssueOutputSchema)POST /v1/repos/:owner/:repo/check-before-start→loopover_check_before_start(
outputSchema: checkBeforeStartOutputSchema)Neither route appears in
src/openapi/spec.ts— grep forvalidate-linked-issueandcheck-before-startin that file returns nothing.Requirements
src/openapi/schemas.ts, defineValidateLinkedIssueResponseSchemaandCheckBeforeStartResponseSchemaasz.object({...})schemas, usingvalidateLinkedIssueOutputSchemaand
checkBeforeStartOutputSchema(the raw Zod shapes already validated insrc/mcp/server.ts) asthe field-level source of truth.
src/openapi/spec.ts,registry.registerboth schemas as components, then addregisterPathentries for both routes, including their request-body schemas (mirror the MCP tools'
validateLinkedIssueShape/equivalentcheck-before-startinput shape for the request body).npm run ui:openapiafter the edits andcommit the regenerated
apps/loopover-ui/public/openapi.jsonin this same PR. CI enforces this vianpm run ui:openapi:check(part ofnpm run test:ci).Deliverables
ValidateLinkedIssueResponseSchemaandCheckBeforeStartResponseSchemaadded tosrc/openapi/schemas.ts.src/openapi/spec.ts.apps/loopover-ui/public/openapi.jsonregenerated vianpm run ui:openapiand committed.npm run ui:openapi:checkpasses in CI.All deliverables are required in this one PR — there is no follow-up issue.
Test Coverage Requirements
99%+ Codecov patch target (
codecov/patch, unsharded vianpm run test:coverage) on any new schemahelper code. Add a regression test asserting both paths appear in
buildOpenApiSpec()'s output withthe correct method and request/response schemas whose keys match each route's MCP tool shapes.
Expected Outcome
Both pre-work-check routes are documented in
GET /openapi.json/apps/loopover-ui/public/openapi.json, matching what their MCP tools already validate.Links & Resources
src/api/routes.ts:POST .../validate-linked-issue,POST .../check-before-startsrc/mcp/server.ts:validateLinkedIssueOutputSchema,checkBeforeStartOutputSchema,validateLinkedIssueShapesrc/openapi/spec.ts:/v1/repos/{owner}/{repo}/gate-config/effectiveregistration (pattern tomirror)