fix(deploy): studio static mount order + CI route-check for FastAPI _IncludedRouter#214
Merged
Merged
Conversation
… FastAPI _IncludedRouter FastAPI 0.100+ wraps include_router registrations in _IncludedRouter objects that don't expose .path at app.routes level — the CI check's flat walk found 0 studio routes even though they were correctly registered. Fix: use app.openapi() paths (built from the real route tree) as the source of truth, with a flat-walk fallback. Also reorders graqle/studio/app.py to mount /studio/static AFTER all include_router() calls — Starlette Mounts are path-greedy and were shadowing the API routes (though this was masked by the _IncludedRouter issue above). Fixes: deploy-lambda.yml CI failing since 2026-06-18. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🛡️ GraQle PR Guardian💥 Blast Radius: 2 modules affected
Total blast radius: 2 🏛️ Governance Verdict
|
| Metric | Value |
|---|---|
| Blast Radius | 2 |
| Files Analyzed | 2 |
| Blocked | 0 |
| SHACL Violations | 0 |
| Verdict | WARN |
🔬 Powered by GraQle PR Guardian v0.1.0 · Scan completed 2026-06-23T16:02:19.087641+00:00
harishquantamix
approved these changes
Jun 23, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
include_routerregistrations in_IncludedRouterobjects that don't expose.pathat the topapp.routeslevel. The CI step was walkingapp.routesdirectly → found 0 studio routes → exited 1 on every run.graqle/studio/app.py): Moveapp.mount("/studio/static", ...)to after allinclude_router()calls. Starlette resolves Mounts before APIRouters in route lookup, so mounting static first was shadowing/studio/api/*routes..github/workflows/deploy-lambda.yml): Replace flatapp.routeswalk withapp.openapi()['paths']which correctly traverses the full route tree including nested_IncludedRouterobjects. Fallback flat-walk retained for Mount entries. Exception is now logged before falling back (sentinel MINOR fix). Locally verified: 90 total routes, 75 studio routes, all 4 required routes OK.Test plan
graqle-checkjob passes (Verify Studio routes register step exits 0)deployjob runs and updatescognigraph-apiLambdaGET /studio/api/healthreturns 200 after deploy🤖 Generated with Claude Code