Assesses whether branch or PR changes are high-risk for externally hosted or embedded Streamlit usage and recommends whether external e2e coverage with `@pytest.mark.external_test` is needed. Use during code review, PR triage, or test planning when changes touch routing, auth, websocket/session behavior, embedding, assets, cross-origin behavior, SiS/Snowflake runtime, storage, or security headers.
Use this skill to decide whether a branch or PR should include external e2e coverage using @pytest.mark.external_test.
This helps protect deployments that commonly involve proxies, embedded iframe contexts, CSP constraints, and other browser security boundaries.
This skill is for risk assessment and recommendation. It does not auto-mark tests unless explicitly requested.
Use an any-hit policy:
Evaluate all categories. A single hit is enough to recommend external coverage.
Routing and URL behavior
server.baseUrlPath, catch-alls, request methods, URL resolution, redirects, or status codes.Auth, cookies, CSRF, and identity binding
_streamlit_user, _streamlit_xsrf, CSRF/XSRF handling, server.trustedUserHeaders, or session-to-identity binding.Websocket handshake and session transport
Embedding and iframe boundary
postMessage), iframe sizing or resize behavior, iframe sandbox or allow attributes, or permissions policy behavior in embedded contexts.Static and component asset serving
server.customComponentBaseUrlPath), or proxying rules for static/component assets.Service worker, uploads, and downloads
Cross-origin behavior and external networking
crossOrigin usage, external-origin fetches or external networks behavior, or backend URL discovery via window.__streamlit.*.Cross-origin theming and resource discovery
SiS and Snowflake runtime dependencies
running_in_sis(), get_active_session(), Snowflake connection/session semantics, or SiS-specific environment flags.Client storage behavior
localStorage, or sessionStorage usage that may differ in embedded or third-party contexts.Security headers and browser policies
Use this exact structure:
## External test recommendation
- Recommend external_test: [Yes/No]
- Triggered categories: [List category numbers and names, or "None"]
- Evidence:
- `<path>`: [short reason from diff]
- `<path>`: [short reason from diff]
- Suggested external_test focus areas:
- [Concrete scenario to validate externally]
- [Concrete scenario to validate externally]
- Confidence: [High/Medium/Low]
- Assumptions and gaps: [Unknowns, missing context, or why confidence is reduced]
Diff includes:
lib/streamlit/web/server/starlette/starlette_routes.py route changesallow attributesExpected output:
Recommend external_test: YesDiff includes:
Expected output:
Recommend external_test: NoNone