PtcRunner.Kernel.ProviderApplicationGate (PtcRunner v0.14.0)

Copy Markdown View Source

Admits selected optional provider applications after the active lifecycle begins.

A host-owned application must already be running. A command-owned VM rejects an inherited target, disables dotenv loading for both :req_llm and :llm_db, configures ReqLLM's default HTTP/1 Finch pool as one shard sized from the installed live_provider_tasks ceiling, and starts the selected target without stopping it at session close. A manifest-narrowed effective limit does not resize that VM-lifetime pool. Explicit ReqLLM Finch pools or a non-HTTP/1 protocol configuration retain their dependency-defined precedence. The command VM owns the resulting application processes until VM shutdown. Once selected applications are admitted, adapter-owned VM-global metadata is warmed before the run clock begins, so its one-time load does not consume a bounded provider worker's heap.

OTP application startup is deliberately synchronous here: Application.ensure_all_started/1 is not cancellable and offers no timeout. A stuck application callback can therefore require terminating the command VM. This gate does not wrap startup in a worker and claim a false bound.

Availability rejections that contact nothing report no provider activity. Once a command-owned VM attempts OTP application startup, a startup failure reports activity even when the target application never reaches the running set.

Summary

Functions