Repository navigation
Conversation
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (1 should fix, 4 advisory)
This repository runs Tessl Reviewer in advisory mode, so the review doesn't block merging.
The change adds GitHub connection guidance and repository discovery for the browser and MCP, including private-consent filtering. Verified concerns remain around silently incomplete results, discovery deadlines and request admission, credential-specific 404 guidance, and misleading MCP text for truncated searches.
| Severity | Should fix | Advisory |
|---|---|---|
| Major | 1 | 0 |
| Minor | 0 | 4 |
Should fix (1)
- Major · Should fix · Failed installation reads are reported as complete repository lists
cloudflare_app.py:368
Advisory (4)
- Minor · Advisory in Standard mode · Sequential discovery can exceed the browser deadline even when GitHub requests succeed
cloudflare_app.py:353 - Minor · Advisory in Standard mode · Repository discovery has no admission bound on repeated upstream enumeration
cloudflare_app.py:475 - Minor · Advisory in Standard mode · Authenticated 404 guidance incorrectly assumes a GitHub App credential
cloudflare_app.py:291 - Minor · Advisory in Standard mode · MCP text presents truncated search misses as missing repository access
mcp_server.py:200
Reviews are incremental. The first review shows every valid finding. A later round checks the latest changes and earlier findings, and adds a fresh finding when it still applies. It never repeats one you refuted or declined. Ask for a full review to inspect the whole change and show earlier findings again.
Mention @tessl-reviewer to run another review.
| ) | ||
| except (TimeoutError, httpx.HTTPError) as exc: | ||
| raise HTTPException(502, "GitHub could not be reached. Please try again.") from exc | ||
| if r_status == 200 and isinstance(r_payload, dict) and isinstance(r_payload.get("repositories"), list): |
There was a problem hiding this comment.
Major · Should fix · Failed installation reads are reported as complete repository lists
In cloudflare_app.py:368, a per-installation response is collected only when its status and payload shape match expectations; all other responses are silently skipped without marking the result incomplete. With one installation returning 403 or 5xx, discovery succeeds with an empty list and truncated=false. The browser then reports “0 repositories granted to GitHub App,” and MCP reports no accessible repositories despite discovery having failed. Partial failures must remain distinguishable from genuinely empty access in both consumers.
Correctness And Data Integrity · Maintainability And Code Quality · Scale And Resilience
| installation_count = len(installations) | ||
| if installation_count > 10: | ||
| truncated = True | ||
| for inst in installations[:10]: |
There was a problem hiding this comment.
Minor · Advisory in Standard mode · Sequential discovery can exceed the browser deadline even when GitHub requests succeed
The listing performs the installation lookup and up to ten repository lookups sequentially, each with its own ten-second timeout, after authentication has already performed an identity lookup. The browser aborts the entire request after twelve seconds. For an identity with ten installations, successful upstream calls taking roughly 1.1 seconds each are enough to lose the entire discovery result. The catch is silent and there is no automatic retry, so autocomplete and the repository count remain unavailable, although manual entry still works. End-to-end discovery latency must be compatible with the consumer deadline rather than bounded only per upstream request.
Scale And Resilience
| @app.get("/api/github/repos") | ||
| async def github_repos(request: Request): | ||
| identity = await caller_github(request) | ||
| if not identity: |
There was a problem hiding this comment.
Minor · Advisory in Standard mode · Repository discovery has no admission bound on repeated upstream enumeration
Neither GET /api/github/repos nor the MCP listing branch applies an enumeration limiter or reuses previous discovery results. Authentication and MCP grant validation do not impose one either. An identity with ten installations generates twelve GitHub requests per invocation, including identity verification, and changing an MCP query repeats the entire fan-out because filtering happens afterward. Repeated or concurrent discovery therefore consumes the credential's GitHub quota without the admission controls used for analysis; sufficiently repeated calls can also leave subsequent analysis and identity verification rate-limited. Admitted discovery load needs a bound covering both entry points, not merely the number of installations within one invocation.
Scale And Resilience
| if github_login: | ||
| detail = ( | ||
| f"Repository not found or the GitHub App is not installed on this repository for @{github_login}. " | ||
| "Grant repository access in GitHub App settings and try again." |
There was a problem hiding this comment.
Minor · Advisory in Standard mode · Authenticated 404 guidance incorrectly assumes a GitHub App credential
public_repo_exists selects GitHub App installation advice solely from the presence of github_login. However, browser authentication supports OAuth credentials with configurable scopes, and bearer authentication also accepts PATs. A valid token lacking access to a private repository can therefore receive a 404 and be told to grant access in GitHub App settings, which does not change that token's permissions. The new guidance sends these supported users to the wrong recovery path. The explanation must remain valid for the actual credential type, or avoid assuming that App installation controls its access.
Maintainability And Code Quality
| extra = f' (+{len(names) - 25} more)' if len(names) > 25 else '' | ||
| text = f'@{data["login"]} can access {len(names)} repositories: {preview}{extra}.' | ||
| else: | ||
| text = f'No accessible repositories found for @{data["login"]}.' |
There was a problem hiding this comment.
Minor · Advisory in Standard mode · MCP text presents truncated search misses as missing repository access
The MCP listing branch preserves truncated in structuredContent but never mentions it in the text result. Repository enumeration is capped before query filtering: for example, a repository beyond an installation's first 100 entries is not searched. Querying that repository produces “No accessible repositories found” and potentially App-installation advice, even though the repository may already be accessible. Clients presenting the text result receive misleading access guidance despite the structured flag being correct. The text must distinguish a bounded-search miss from a complete discovery result.
Maintainability And Code Quality
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-github-app-access-ux-github-flow-analytics.yuval-yeret.workers.dev (commit c2fa234)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Fixes misleading 404 errors when analyzing private repositories, shows GitHub connection state and the GitHub App installation/configuration link in the web UI, and adds accessible repository listing via
GET /api/github/repos(web autocomplete + count) andlist_accessible_repositories(MCP tool, respectingprivate_consent).