Buckets:

download
raw
2.61 kB
{
"role_mappings": [
{
"role": "Entity",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The requesting client is outside the repo; RunApi is a framework library with no in-repo client calling the app (only tests, which do not count)."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "dispatch",
"file": "runapi/middleware.py",
"lines": "76",
"notes": "dispatch in RateLimitMiddleware (Starlette BaseHTTPMiddleware) intercepts every request, derives the id via _default_key_func (middleware.py:69, X-Forwarded-For or client IP), returns 429 JSONResponse when over limit, else call_next. Registered via app.add_middleware in RunApiApp._setup_default_middleware (runapi/core.py:85), only when RATE_LIMIT_ENABLED=true (config.py:39 default False, opt-in)."
},
{
"role": "Limiter",
"status": "present",
"symbol": "dispatch",
"file": "runapi/middleware.py",
"lines": "76",
"notes": "Decision logic is inline in the Enforcer's dispatch (same method as Enforcer): fixed-window counter compares count >= self.calls within self.period (middleware.py:89-96) and blocks; no separate helper method exists."
},
{
"role": "HistoryProvider",
"status": "present",
"symbol": "requests",
"file": "runapi/middleware.py",
"lines": "66",
"notes": "Reached from Limiter dispatch (middleware.py:81-108), which reads and updates self.requests, an in-memory dict {key: [count, window_start]} guarded by an asyncio.Lock. No accessor method exists, so the field is cited; state is per-process and not persisted."
},
{
"role": "PolicyProvider",
"status": "present",
"symbol": "rate_limit_calls",
"file": "runapi/config.py",
"lines": "40",
"notes": "Policy (calls per period) comes from RunApiConfig fields rate_limit_calls (config.py:40, env RATE_LIMIT_CALLS default 100) and rate_limit_period (config.py:41, default 60s), passed into RateLimitMiddleware at core.py:87-88 and held as self.calls/self.period (middleware.py:62-63). No get_policy method; the config field is cited."
},
{
"role": "System",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "RunApi is a framework; protected handlers are user-project routes loaded from a routes/ folder at runtime (core.py _load_routes). The CLI only writes template route strings into new projects (cli.py:249,268), so no in-repo handler is reached (rule 6.1.7)."
}
]
}

Xet Storage Details

Size:
2.61 kB
·
Xet hash:
deadacf60778c53b7bee50ee477d1238f3e1d2126eaf6261257b53754b7a8c62

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.