Skip to content

Fixed #157 -- Made generated docs fail on unresolved response annotations. - #184

Open
DevilsAutumn wants to merge 1 commit into
mainfrom
issue_157
Open

Fixed #157 -- Made generated docs fail on unresolved response annotations.#184
DevilsAutumn wants to merge 1 commit into
mainfrom
issue_157

Conversation

@DevilsAutumn

Copy link
Copy Markdown
Owner

Summary

Fixed generated OpenAPI and MCP docs so unresolved response annotations fail with a clear route binding error instead of silently emitting generic object schemas.

Linked Issue

Fixes #157

Contributor Checklist

  • The linked issue was marked accepted before I started.
  • Nobody else was assigned or already working on the issue before I started.
  • My branch is named issue_{issue_number}.
  • The PR is focused on one issue with no unrelated changes.
  • Tests are added or updated when behavior changes.
  • Docs are updated when user-facing behavior changes.
  • Changelog is updated when the change is release-visible.
  • I listed the checks I ran below.

Checks Run

pytest passed: 1252 tests
ruff check . passed
ruff format --check . passed
mypy passed
git diff --check clean

@codecov-commenter

codecov-commenter commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.91%. Comparing base (509ee5b) to head (ec3252e).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
+ Coverage   92.82%   92.91%   +0.08%     
==========================================
  Files          66       67       +1     
  Lines        6565     6587      +22     
  Branches     1116     1119       +3     
==========================================
+ Hits         6094     6120      +26     
+ Misses        286      282       -4     
  Partials      185      185              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

This change centralizes response-annotation resolution for generated OpenAPI and MCP documentation. Runtime checks confirmed that postponed annotations on a wrapped handler still produce concrete response schemas in both /openapi.json and /mcp/docs, while unresolved annotations now return a RouteBindingError instead of silently emitting generic documentation.

Confidence Score: 5/5

T-Rex T-Rex Logs

What T-Rex did

  • Ran the response annotation contract probe against the parent commit to establish baseline behavior, observing that unresolved response annotations returned HTTP 200 without a RouteBindingError on /openapi.json and /mcp/docs.
  • Ran the probe against the changed commit and confirmed the change produced concrete results: VALID_OPENAPI_STATUS 200 and VALID_MCP_STATUS 200 with concrete fields for a postponed annotation on a functools.wraps-decorated handler, and HTTP 500 with RouteBindingError for an unresolved annotation on both documentation endpoints.
  • Uploaded the exact probe source for the before/after comparison and noted the reference outputs referenced below.
  • Compared the before/after outputs and confirmed that after the changes, valid wrapped annotations continue to render with 200 statuses and concrete fields, while unresolved annotations now produce 500 and RouteBindingError on both surfaces.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (4): Last reviewed commit: "Fixed #157 -- Made generated docs fail o..." | Re-trigger Greptile

Comment thread src/quater/docs/annotations.py Outdated
Comment thread src/quater/docs/annotations.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated docs should fail when response annotations cannot be resolved

2 participants