docs(api): add operation-level summaries to all OpenAPI routes - #6111
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 10:04:48 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6111 +/- ##
==========================================
+ Coverage 95.24% 95.31% +0.06%
==========================================
Files 595 595
Lines 47069 47097 +28
Branches 15020 15030 +10
==========================================
+ Hits 44831 44890 +59
+ Misses 1493 1476 -17
+ Partials 745 731 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
src/openapi/spec.tsset response-leveldescriptionon all 78registry.registerPath({...})calls but never the operation-levelsummary— so every operation in the generatedopenapi.jsonand the rendered API browser showed a bareGET /healthwith no title.grep -c "summary:" src/openapi/spec.ts→0.summaryto every one of the 102 operations the spec builds, and a regression test that fails loudly when a future route lands without one.apps/loopover-ui/public/openapi.jsonis regenerated vianpm run ui:openapiand committed.102 operations, not 78 — worth flagging, because it changes what "all routes" means here. The issue counts the 78
registerPathcall sites, but 5 of them sit insidefor (const path of [...])loops that each register several paths (4 + 5 + 9 + 2 + 9 = 29 paths from 5 calls). So 73 literal calls + 29 looped paths = 102 operations. A single hardcodedsummaryinside a loop would have stamped the same title onto all 9 of its paths, which is exactly the "duplicating a description verbatim" outcome the issue asks to avoid. Instead each loop now iterates[path, summary]tuples:Each summary describes the operation's purpose rather than restating a response description — e.g.
GET /health→"Service liveness probe"(not the existing200description"Service health"), andDELETE /v1/app/selfhost/queue/dead→"Purge all dead-letter queue jobs". All 102 summaries are unique; no response-leveldescription, schema, security, or route behavior is touched.Closes #5810
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:cichain (every box above exceptnpm audit, run separately) passed end-to-end, andnpm audit --audit-level=moderate→found 0 vulnerabilities.src/openapi/spec.tsis insidecoverage.include, so this diff is Codecov-gated. Scoped run → 100% statements, 100% lines, 100% functions on the file; the single uncovered branch the report shows is line 1217 (...(document.components ?? {})), a pre-existing nullish fallback that is not in this diff (confirmed by intersecting the report againstgit diff -U0's new-side hunks). The changed lines add no branches at all — they are static string properties plus a tuple destructure — and the new test builds the whole spec, so every changed line is executed by construction. Patch = 100% lines and branches.upstream/main'ssrc/openapi/spec.tsit fails withGET /health is missing an operation-level summary: expected 'undefined' to be 'string'; against this branch all 3 tests in the file pass. Both directions were run.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Unchecked boxes above, and why — all N/A rather than skipped:
securityblocks and theisProtectedPathlogic are untouched, and the existingopenapi.test.tsassertions that pin each route'ssecurityshape still pass unchanged.apps/loopover-ui/public/openapi.jsonchanges only because it is the generated artifactnpm run ui:openapiwrites (Phase 4 requires committing it, andui:openapi:checkfails if it drifts). The API browser that renders it will now show a title per operation, but there is no frontend code change to screenshot, and review-only screenshots are not committed.Notes
src/openapi/spec.ts(+summaries, 5 loops converted to[path, summary]tuples),test/unit/openapi.test.ts(+1 regression test),apps/loopover-ui/public/openapi.json(regenerated, not hand-edited).summary:lines inspec.tswould have missed the 29 looped paths entirely;buildOpenApiSpec().paths→ every method is the only shape that actually covers all 102. It mirrors the siblingin: pathparameter test directly above it, including the per-operation failure label so a future miss names the exact route.summary, and all 102 are distinct — checked by building the spec and diffing the summary set, so no route silently inherited a neighbor's title.