Buckets:

download
raw
3.1 kB
{
"role_mappings": [
{
"role": "Entity",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Callers are outside the repo; the entity id is derived from X-Entity-Id / X-API-Key / client IP by resolve_entity (src/application/mothership/middleware/admission_gate.py:409, called at :957). frontend/ is listed in git but absent from the working tree, and no in-repo client targeting the admission gate was found (tests excluded)."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "dispatch",
"file": "src/application/mothership/middleware/admission_gate.py",
"lines": "943",
"notes": "dispatch of AdmissionGateMiddleware, registered via app.add_middleware at src/application/mothership/main.py:853 (admission_gate_enabled defaults True, added last so it runs first). It resolves the entity id (:957), asks the budget tracker at :1009 and returns 429 ADMISSION_BUDGET_EXCEEDED via _reject, otherwise forwards with call_next at :1118."
},
{
"role": "Limiter",
"status": "present",
"symbol": "allow",
"file": "src/application/mothership/middleware/admission_gate.py",
"lines": "316",
"notes": "Reached from dispatch at admission_gate.py:1009. allow of _BudgetTracker prunes the entity's timestamps outside the sliding window, returns False when the count reaches the (penalty-adjusted) budget, otherwise records the request and returns True."
},
{
"role": "HistoryProvider",
"status": "present",
"symbol": "_ledger",
"file": "src/application/mothership/middleware/admission_gate.py",
"lines": "314",
"notes": "The per-entity list of request timestamps in _BudgetTracker, read and updated inside allow (admission_gate.py:316-325, called from dispatch :1009); no dedicated history method exists, so the field is cited. Rejections are additionally recorded as violations via _reject -> record_violation (:893 -> :473), which feed future budgets."
},
{
"role": "PolicyProvider",
"status": "present",
"symbol": "effective_budget",
"file": "src/application/mothership/middleware/admission_gate.py",
"lines": "623",
"notes": "Called by dispatch at admission_gate.py:1008 before the Limiter; EntityAttributionEngine.effective_budget derives the per-entity budget from the base budget (settings.security.admission_call_budget, default 60, passed at main.py:855; window DEFAULT_WINDOW_SECONDS=60 at :52), reducing it for penalties/drift and to 0 for bannered entities."
},
{
"role": "System",
"status": "present",
"symbol": "process_intelligence",
"file": "src/application/mothership/routers/intelligence.py",
"lines": "24",
"notes": "Reached after the gate admits the request via call_next at admission_gate.py:1118; POST /intelligence/process (router registered in routers/__init__.py:131) runs the IntelligenceApplication pipeline, which the gate explicitly protects (structure check for /intelligence/ paths)."
}
]
}

Xet Storage Details

Size:
3.1 kB
·
Xet hash:
b7e316515103de8598524fd107fbdc913736292248a9034a040275172ab2d5ff

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