What problem does it solve?
SGLang's process-global runtime state is organized into strict tiers (published ServerArgs seed, namespace config bags, runtime flags, resources, per-forward state), and reading or mutating the wrong tier causes subtle bugs that tests often miss. This Skill explains the architecture, the CI guardrails that enforce it, and the correct idioms so changes to server_args, model overrides, or module-level state don't break the design.
Core Features & Use Cases
- Config read/write rules: Explains when to read namespace bags via get_exec()/get_schedule()/get_model(), when get_server_args() is a ratchet failure, and how get_context().override() is the only post-publish mutation path.
- Guardrail catalog: Documents the CI ratchets (read ratchet, exposure ratchet, publish-order tests, role namespace enforcement) so new code passes them on the first try.
- Testing idioms: Shows how test doubles publish via override_server_args instead of injecting SimpleNamespace config stubs.
- Use Case: Before adding a new ServerArgs field or moving load-time logic into resolution, load this Skill to pick the correct tier, declaration mechanism, and accessor pattern.
Quick Start
Load the sglang-runtime-context skill before modifying server_args, model overrides, or any module-level runtime state in the sglang repository.