You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ 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 — applied
uniformly across all eight routes below.
Context
src/api/routes.ts groups eight deterministic, source-free advisory-check POST routes under /v1/lint/* and /v1/validate/focus-manifest, each backed by an MCP tool with its own Zod output
shape already defined in src/mcp/server.ts:
Route
MCP tool
Output shape
POST /v1/lint/pr-text
loopover_lint_pr_text
lintPrTextOutputSchema
POST /v1/lint/slop-risk
loopover_check_slop_risk
checkSlopRiskOutputSchema
POST /v1/lint/improvement-potential
loopover_check_improvement_potential
checkImprovementPotentialOutputSchema
POST /v1/lint/open-pr-pressure
loopover_simulate_open_pr_pressure
simulateOpenPrPressureOutputSchema
POST /v1/lint/boundary-tests
loopover_suggest_boundary_tests
suggestBoundaryTestsOutputSchema
POST /v1/lint/test-evidence
loopover_check_test_evidence
checkTestEvidenceOutputSchema
POST /v1/lint/issue-slop
loopover_check_issue_slop
checkIssueSlopOutputSchema
POST /v1/validate/focus-manifest
loopover_validate_config
validateConfigOutputSchema
None of the eight appears in src/openapi/spec.ts — grep for /v1/lint/ and /v1/validate/focus-manifest in that file returns nothing, even though every one of them is a real,
tested, publicly-callable route with an MCP-tool-validated response shape.
Requirements
In src/openapi/schemas.ts, define one z.object({...}) response schema per route (8 total,
e.g. LintPrTextResponseSchema, CheckSlopRiskResponseSchema, CheckImprovementPotentialResponseSchema, SimulateOpenPrPressureResponseSchema, SuggestBoundaryTestsResponseSchema, CheckTestEvidenceResponseSchema, CheckIssueSlopResponseSchema, ValidateFocusManifestResponseSchema), using each route's
existing MCP outputSchema constant (table above) as the field-level source of truth. Also add
request-body schemas mirroring each tool's corresponding inputSchema/shape constant in src/mcp/server.ts.
In src/openapi/spec.ts, registry.register all eight response schemas as components, then add a registerPath entry for each of the eight routes.
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
Eight new response schemas (plus matching request-body schemas) added to src/openapi/schemas.ts, one per route in the table above.
All eight routes registered as OpenAPI paths in src/openapi/spec.ts.
apps/loopover-ui/public/openapi.json regenerated via npm run ui:openapi and committed.
npm run ui:openapi:check passes in CI.
All eight routes are required in this one PR — there is no follow-up issue. Do not ship a partial
subset of the family.
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 all eight paths appear in buildOpenApiSpec()'s output
with response schemas whose keys match each route's MCP tool output shape from the table above.
Expected Outcome
The entire /v1/lint/* + /v1/validate/focus-manifest advisory-check family is documented in GET /openapi.json / apps/loopover-ui/public/openapi.json, matching what each route's MCP tool
already validates.
Links & Resources
src/api/routes.ts: the eight routes in the table above (contiguous block starting at app.post("/v1/lint/pr-text", ...))
src/mcp/server.ts: the eight output-shape constants in the table above (contiguous block of register("loopover_lint_pr_text"...) through register("loopover_check_issue_slop"...) / register("loopover_validate_config"...))
src/openapi/spec.ts: /v1/repos/{owner}/{repo}/gate-config/effective registration (pattern to
mirror)
Context
src/api/routes.tsgroups eight deterministic, source-free advisory-check POST routes under/v1/lint/*and/v1/validate/focus-manifest, each backed by an MCP tool with its own Zod outputshape already defined in
src/mcp/server.ts:POST /v1/lint/pr-textloopover_lint_pr_textlintPrTextOutputSchemaPOST /v1/lint/slop-riskloopover_check_slop_riskcheckSlopRiskOutputSchemaPOST /v1/lint/improvement-potentialloopover_check_improvement_potentialcheckImprovementPotentialOutputSchemaPOST /v1/lint/open-pr-pressureloopover_simulate_open_pr_pressuresimulateOpenPrPressureOutputSchemaPOST /v1/lint/boundary-testsloopover_suggest_boundary_testssuggestBoundaryTestsOutputSchemaPOST /v1/lint/test-evidenceloopover_check_test_evidencecheckTestEvidenceOutputSchemaPOST /v1/lint/issue-sloploopover_check_issue_slopcheckIssueSlopOutputSchemaPOST /v1/validate/focus-manifestloopover_validate_configvalidateConfigOutputSchemaNone of the eight appears in
src/openapi/spec.ts— grep for/v1/lint/and/v1/validate/focus-manifestin that file returns nothing, even though every one of them is a real,tested, publicly-callable route with an MCP-tool-validated response shape.
Requirements
src/openapi/schemas.ts, define onez.object({...})response schema per route (8 total,e.g.
LintPrTextResponseSchema,CheckSlopRiskResponseSchema,CheckImprovementPotentialResponseSchema,SimulateOpenPrPressureResponseSchema,SuggestBoundaryTestsResponseSchema,CheckTestEvidenceResponseSchema,CheckIssueSlopResponseSchema,ValidateFocusManifestResponseSchema), using each route'sexisting MCP
outputSchemaconstant (table above) as the field-level source of truth. Also addrequest-body schemas mirroring each tool's corresponding
inputSchema/shape constant insrc/mcp/server.ts.src/openapi/spec.ts,registry.registerall eight response schemas as components, then add aregisterPathentry for each of the eight routes.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
src/openapi/schemas.ts, one per route in the table above.src/openapi/spec.ts.apps/loopover-ui/public/openapi.jsonregenerated vianpm run ui:openapiand committed.npm run ui:openapi:checkpasses in CI.All eight routes are required in this one PR — there is no follow-up issue. Do not ship a partial
subset of the family.
Test Coverage Requirements
99%+ Codecov patch target (
codecov/patch, unsharded vianpm run test:coverage) on any new schemahelper code. Add a regression test asserting all eight paths appear in
buildOpenApiSpec()'s outputwith response schemas whose keys match each route's MCP tool output shape from the table above.
Expected Outcome
The entire
/v1/lint/*+/v1/validate/focus-manifestadvisory-check family is documented inGET /openapi.json/apps/loopover-ui/public/openapi.json, matching what each route's MCP toolalready validates.
Links & Resources
src/api/routes.ts: the eight routes in the table above (contiguous block starting atapp.post("/v1/lint/pr-text", ...))src/mcp/server.ts: the eight output-shape constants in the table above (contiguous block ofregister("loopover_lint_pr_text"...)throughregister("loopover_check_issue_slop"...)/register("loopover_validate_config"...))src/openapi/spec.ts:/v1/repos/{owner}/{repo}/gate-config/effectiveregistration (pattern tomirror)