Repository navigation
v0.21.0
Security
Seven security hardening fixes across three severity tiers, guided by a formal security review of the 0.20.x codebase.
Critical — fixed:
-
Resilient budget gate is now fail-closed —
BUDGETin MIXED mode previously returnedTrueon any DB exception. Budget operations now fail closed (raise). Opt out viacategory_overrides={OperationCategory.BUDGET: ResilienceMode.FAIL_OPEN}. -
McpGatewayConfig.auto_create_sessionsdefaults toFalse— previouslyTrue, silently creating sessions withmax_cost=10000/max_action_count=100. Callers must now supplysession_idexplicitly. -
increment_budget(sync backend) is now a single atomic UPDATE — eliminates the check/increment TOCTOU race viaUPDATE … WHERE used_cost + cost ≤ max_cost ….
High — fixed:
-
EventConfig.unknown_event_policydefaults toRAISE—ControlPlaneSetuppreviously passedIGNORE, silently dropping unmapped app events. -
UnknownAppEventErroris never swallowed by resilient wrappers — re-raised before the TELEMETRY fail-open handler in both sync and async. -
TokenUsage.estimated_cost_usdrejects negative values —@model_validatorraisesValidationErrorfor negative costs.
Medium — fixed:
-
Agent-abort kill switch events are now state-bearing —
KillSwitch._abort_agentnow emitsKILL_SWITCH_TRIGGEREDwithstate_bearing=True. -
Evaluator plugins cannot override built-in names —
EvaluatorRegistry._discoverwarns and skips any plugin whose name collides with an already-registered evaluator.
Breaking (pre-1.0)
McpGatewayConfig.auto_create_sessions:True→False. Supplysession_idexplicitly or passMcpGatewayConfig(auto_create_sessions=True)to restore.EventConfig.unknown_event_policy:IGNORE→RAISE. Add all event names toevent_map, or passEventConfig(unknown_event_policy=UnknownAppEventPolicy.IGNORE)to restore.- MIXED resilience mode
BUDGET:FAIL_OPEN→FAIL_CLOSED. Passcategory_overrides={OperationCategory.BUDGET: ResilienceMode.FAIL_OPEN}to restore.