Module

_introspect

Built-in/_pounce/infointrospection endpoint (Sprint 5).

Disabled by default. WhenServerConfig.introspection_enabledis True, the worker dispatches GET requests atintrospection_pathto build_introspect_response() before the request reaches the ASGI application.

The response body is a JSON object with three sections:

  • runtime: Pounce and operator build identity, Python build and GIL state, configured worker mode, resolved worker model, and server uptime.
  • worker: per-worker identity (worker_id) and live counters (active_connections).
  • config: theredacted_config_view() of the activeServerConfig— fail-closed via INFO_ALLOWLIST.

Seedocs/troubleshooting.md#POUNCE_CONFIG_INTROSPECTION_PUBLICfor the warning emitted when the endpoint is bound non-loopback.

Functions

_python_build_identity 0 dict[str, str | bool]
Return non-sensitive fields that identify the running Python build.
def _python_build_identity() -> dict[str, str | bool]
Returns
dict[str, str | bool]
_operator_build_id 0 str | None
Return the explicitly public operator identity, or ``None`` when unset.
def _operator_build_id() -> str | None
Returns
str | None
build_introspect_response 3 tuple[int, list[tuple[by…
Build the ``/_pounce/info`` JSON response.
def build_introspect_response(*, config: ServerConfig, worker_id: int, active_connections: int) -> tuple[int, list[tuple[bytes, bytes]], bytes]
Parameters
Name Type Description
config ServerConfig
worker_id int
active_connections int
Returns
tuple[int, list[tuple[bytes, bytes]], bytes]