Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Engine reference — generated from the canonical engineering source. Do not edit this page by hand.

Configuration Reference

Canonical scope. This file is the canonical, source-verified configuration reference for the two ZERG config surfaces that share a namespace:

  • Sol (orchestrator) — the sol application environment (server/config/sys.config, server/config/sys.prod.config, the optional config file, and SOL_* environment variables). Every key below is the exact atom passed to sol_config:get_env/2 / application:get_env(sol, Key).
  • Luna (worker agent) — client/core/config.lua (DEFAULT_CONFIG merge), LUNA_* environment variables, and CLI arguments.

Out of scope (separate namespaces, not documented here — see §Related configuration surfaces): Mango’s own service config (mango/conf.py), the Limon console’s build env, and zerg-cli’s own config file.

The portal page docs-site/reference/configuration.md is a projection of this file — keep fixes here and update the portal page alongside.

Configuration Hierarchy

Configuration is resolved in priority order (highest wins):

Sol Server

  1. Environment variables (SOL_*) — applied last by sol_app:apply_env_overrides/0, so they override everything
  2. Config file (optional) — loaded by sol_config_file:load/0 and applied AFTER the release profile has loaded, so it overrides sys.prod.config/sys.config ( corrects the previously documented inverse order). The boot log names every release-profile key the file overrides.: the search order is SOL_CONFIG_FILE (must be an ABSOLUTE path) → /etc/sol/sol.conf — the old CWD-relative sol.conf fallback is GONE. The file must be owner-readable with no group-write and no other bits (0600/0640; 0644 is refused); unknown keys refuse the load loudly; load/1 applies the same permission contract. Application is all-or-nothing — every value is normalized/validated first (list-typed keys use the SOL_CLUSTER_NODES grammar), so a bad value applies NO keys.
  3. Production config (config/sys.prod.config) — production overrides
  4. Development config (config/sys.config) — defaults
  5. VM args (config/vm.args, config/vm.prod.args) — Erlang node settings (not application config; listed for completeness)

Defaults quoted below are the shipped sys.config values; where the code fallback (what you get with the key absent) differs, both are stated. The shipped profiles carry 165 top-level keys in sys.config and 174 top-level keys in sys.prod.config (the completeness test’s own {key, regex; server/test/sol_prod_config_completeness_tests.erl — ).

Luna Agent

  1. CLI arguments (--model, --permission-mode, --theme, etc.)
  2. Environment variables (LUNA_MODEL, LUNA_LOG_LEVEL, …)
  3. Config files — merged lowest→highest by client/core/config.lua discover_config_files/1 plus the profile file (config.lua:347 merges core/paths.lua profile_config_path last, wins):

~/.luna.json < ~/.luna/settings.json < <cwd>/.luna.json < <cwd>/.luna/settings.json < <cwd>/.luna/settings.local.json < profile

Security-relevant keys from the project-local files additionally require the repo-config consent gate (below).

Managed-settings precedence

The four config planes resolve highest-wins:

PriorityPlaneWhere it lives / who applies it
1 (highest)Managed settings (admin PUT; fleet push)Sol managed_settings ETS + <data_dir>/managed_settings.json; pushed to workers via the managed_settings_update PUB and applied by client/core/managed_config.lua
2Repo-config (project-local security families).luna.json / .luna/settings.json — consent-gated by a user-owned ~/.luna/approvals/trust-<sha256>.json record
3Local config (user files + LUNA_* env)client/core/config.lua merge order (~/.luna.json → … → profile)
4 (lowest)Built-in defaultsLuna DEFAULT_CONFIG, Sol shipped sys.config

Only the schema keys (below) are applied; every out-of-schema managed key is skipped LOUDLY and counted, never silently applied. Sol’s own managed_settings store does NOT feed sol_config:get_env (application env only) — the store is a fleet-push plane, not a fifth Sol env layer.

Sol Server Configuration

The Restart column classifies when a changed value takes effect: boot keys are read while the boot ladder / listener construction / child specs run, so a change requires a node restart; per-call keys are read at request/tick/spawn time and are hot-effective. The classification authority is contract/config-restart.yaml (pinned boot keys plus a reviewed per-call default); ci/config_restart_docs_lint.py gates this column against it two-directionally.

HTTP Server

Source: server/config/sys.config, sol_http.erl, sol_app.erl.

KeyRestartTypeDefaultEnv VarDescription
http_portbootinteger21434SOL_HTTP_PORTCowboy HTTP listener port. Range 0–65535 (0 = OS-assigned, test posture; production refuses 0). Required
http_ipbootstring"127.0.0.1"SOL_HTTP_IPCowboy bind address. 0.0.0.0 for all interfaces. Non-loopback + auth_enabled=false refuses boot (sol_app:validate_auth_boundary/0)
hostper-callstring"0.0.0.0"—Default inference host (llama.cpp bind address)
base_urlper-callstring— (unset)SOL_BASE_URLExternal base URL override for generated links
max_sse_connectionsper-callinteger500 (shipped sys.config; code fallback 500 — sol_http_sse.erl; sys.prod.config OMITS the key, so prod runs 500)—Concurrent SSE stream cap. Range 10–10000 (sol_config.erl optional battery). corrected the pre-fix doc/dev 100 (a dev-only override that silently diverged from prod)
conversation_max_per_userper-callinteger100—(HTTP-03): per-principal conversation quota. At the quota the caller’s OWN oldest conversation is evicted; the per-user eviction never selects another principal’s row.
conversation_max_totalper-callinteger500—(HTTP-03): global conversation-store memory backstop (reachable through aggregate multi-principal activity). When it trips, the globally oldest conversation is evicted regardless of principal — it is a process-memory bound, not a per-principal isolation guarantee.
hook_deadline_total_msper-callinteger2000—: total wall-clock budget for the sync-event hook fan-out (capped at 10000); the hook path cannot outlive the caller timeout.
projection_debt_retry_msper-callinteger5000—: projection-debt retry cadence; a crashed projector’s owed rows retry until the view converges.
projection_debt_per_aggregate_capper-callinteger64 (clamped 1–10000)—: per-aggregate durable-debt row cap. At the cap the aggregate is quarantined: later debt rows are dropped and counted (projection_debt_quarantined_total) and the debt gate stops blocking new events, keeping debt rows bounded and lane depth O(queue).
sync_event_caller_window_msper-callinteger44500 (code fallback ?CALL_TIMEOUT - 500 = 44500 — sol_sync_event.erl; capped at that value; minimum 1000)—review: absolute per-admission caller window. A queued admission never commits after this window; an expired queued item is answered with the typed unknown verdict (sync_event_append_deadline_killed_total).
worker_usage_max_tokens_per_attemptper-callinteger100000000—: plausibility cap on a worker-reported usage total. An implausible frame is refused (settlement degrades to undefined, counted + logged) instead of exhausting the task owner’s ledger; the real terminal frame still settles.
worker_cancel_drain_msper-callinteger10000—(XSV-02): drain bound for the worker cancel line before the turn is force-abandoned.
mnesia_create_bound_msper-callinteger5000—(SOLOTP-03): bounded mnesia:create_table wait; a wedged schema lock yields a typed boot refusal instead of a hang.
max_sse_connections_per_principalper-callintegermax(1, max_sse_connections div 4)—(HTTP-20): per-principal SSE sub-budget — one principal cannot consume the whole admission pool. Refusals bump sse_principal_limit_refusals_total.
sse_headroom_reservationper-callintegermin(50, max_sse_connections div 10)—(HTTP-20): slots reserved for the internal/system principal so the server’s own streams can still open under a hostile per-IP fleet. Ordinary principals are refused at max_sse_connections - sse_headroom_reservation.
stream_relay_high_watermarkper-callinteger128—: relay mailbox high-water mark — at or above it the provider pipeline is suspended (gun flow closes, upstream pauses). Minimum 8.
stream_relay_low_watermarkper-callinteger32—: relay mailbox low-water mark — at or below it the suspended pipeline resumes. Always < the high watermark.
stream_flow_suspend_max_msper-callinteger30000—: maximum time a flow-controlled provider pipeline may stay suspended before the per-stream controller resumes it (min 1000 ms). A relay death at the pause instant resumes first; the bound closes the indefinite-wedge class.
limon_originper-callstring"*" in dev sys.config; empty in sys.prod.config (prod must set SOL_LIMON_ORIGIN; empty omits ACAO entirely)SOL_LIMON_ORIGINCORS/WS-Origin anchor for the Limon bridge; code fallback is <<>>. (There is no cors_origin key — this is the only CORS knob.)
share_max_viewsper-callinteger100—Session-share view cap: read N+1 after the cap is the gone-dialect 404; clamp lever.
enable_pprofper-callboolean— (unset → false)SOL_ENABLE_PPROFExpose /debug/pprof/*. Opt-in
deployment_modebootatom— (unset → dev)SOL_DEPLOYMENT_MODEdev | prod. In prod, auth_enabled, mango_auth_enabled, rate_limit_enabled and worker_path become hard-required (sol_app:validate_production_config/0), and placeholder secrets refuse the boot. The container entrypoint renders it explicitly and refuses to render prod unless SOL_MANGO_AUTH_ENABLED is set

Native TLS

Sol’s Cowboy listener can terminate TLS natively (no reverse proxy required). Source: sol_http.erl (TransOpts) + the tls key section of sol_config_file.erl; env mappings in sol_app.erl.

KeyRestartTypeDefaultEnv VarDescription
tls_enabledbootbooleanfalseSOL_TLS_ENABLEDEnable the TLS listener ({tls, Opts} vs {clear, Opts})
tls_cert_filebootstring"/etc/sol/tls/server.crt"SOL_TLS_CERT_FILEPEM certificate file
tls_key_filebootstring"/etc/sol/tls/server.key"SOL_TLS_KEY_FILEPEM private key file
tls_ca_filebootstring"/etc/sol/tls/ca.crt" (shipped; the listener adds cacertfile ONLY when the file exists)SOL_TLS_CA_FILECA bundle
tls_plaintext_ackbootbooleanfalseSOL_TLS_PLAINTEXT_ACK: explicit acknowledgement for serving PLAIN HTTP when tls_enabled=true but the cert/key is missing/unreadable. Non-dev modes refuse boot without it; dev falls back CRITICAL-logged. The ZMQ zmq_transport_plaintext_ack posture is the precedent
http_transport_plaintext_ackbootbooleanfalseSOL_HTTP_TRANSPORT_PLAINTEXT_ACK: explicit acknowledgement for a PLAINTEXT HTTP listener when tls_enabled=false on a NON-LOOPBACK http_ip in deployment_mode=prod — without it (or http_transport_tunnel) the boot REFUSES with {refuse_boot, http_plaintext_external_bind}. Loopback binds and dev keep the open posture; other non-dev modes CRITICAL-banner
http_transport_tunnelbootstring""SOL_HTTP_TRANSPORT_TUNNEL: declares an encrypted upstream terminator/tunnel (http-terminator/wireguard/mtls-sidecar) that satisfies the HTTP plaintext boundary for a non-loopback prod bind

In the config file the same keys are written under the tls section: {tls, [{enabled, true}, {cert_file, "/etc/sol/tls/server.crt"}, {key_file, "/etc/sol/tls/server.key"}, {ca_file, "/etc/sol/tls/ca.crt"}]}. When tls_enabled=true but the cert or key file is missing/unreadable: deployment_mode=prod (and any non-dev mode) refuses to boot with the typed {invalid_config, {refuse_boot, {tls_cert_missing, Cert, Key}}} — serving plaintext silently is no longer possible. dev keeps the fallback but logs CRITICAL; any mode can explicitly acknowledge plaintext with tls_plaintext_ack=true (CRITICAL-bannered).. Prefer the OpenResty reverse-proxy termination on production hosts (wild blueprint); native TLS is for standalone deployments.

Inference

KeyRestartTypeDefaultEnv VarDescription
llama_server_pathper-callstring"/usr/src/llama.cpp/llama-server"SOL_LLAMA_SERVER_PATHPath to llama.cpp server binary (the legacy/no-root engine resolution)
inference_engine_rootper-callstring | undefinedundefined (dev) / "/opt/llama" (prod)—: engine install root. Unset → the legacy llama_server_path; set → <root>/<engine.build>/bin/llama-server, or <root>/current/bin/llama-server when the engine’s build is absent/unbuilt. A resolved path that is not an executable refuses the start with {engine_binary_missing, Path}
inference_loading_interval_msper-callinteger500—: the loading-state health probe interval (ms). Typed; a non-positive-integer value falls back to 500. The slow-load tests shrink it instead of waiting out 90s
inference_loading_probesper-callinteger60—: the GLOBAL loading probe budget (failures before the crash-class stop + bounded restart). Precedence: lane loading_probes → this key → 60. The ATX/UD lanes carry loading_probes => 600 (300s at 500ms)
base_portper-callinteger18001 (shipped sys.config; code fallback 8001 — sol_registry.erl ?DEFAULT_BASE_PORT)SOL_BASE_PORTFirst port of the lane allocation window [base_port, base_port+inference_port_range) with wraparound.: 18001-18010 is the range wild publishes on every node (8001-8010 was crowded; 18080 + k0s 31000-32767 excluded) — an allocation outside it is unreachable cross-node.: rendered by the container entrypoint (validated integer; base_port + inference_port_range must stay inside the TCP port space); sol_inference_port_base/_range/_used/_free expose the live window
inference_port_rangeper-callpositive integer10SOL_INFERENCE_PORT_RANGE: width of the port window the registry wraps within starting at base_port (next_port/2 wraps wrap_cursor(Base, Range, Port + 1)); a non-positive-integer value falls back to 10 with a warning. Keep base_port + inference_port_range inside the node’s published range.: rendered by the entrypoint (validated integer 1..1000) and exposed as sol_inference_port_range
inference_tool_result_max_bytesper-callpositive integer262144 (256 KiB)—: per-tool-result size cap in bytes; larger content is truncated at the boundary with a marker (the model never receives an unbounded tool payload). A non-positive-integer value falls back to 262144
hostper-callstring"0.0.0.0" (code fallback; shipped sys.prod.config pins "127.0.0.1")SOL_LLAMA_BIND_HOSTllama.cpp bind host. The effective bind is 127.0.0.1 unless llama_bind_nonloopback=true; also settable via [inference] host in sol.conf. The grant endpoint host is derived separately (advertise-host rule below) and never advertises 0.0.0.0 — a wildcard bind advertises node_host (SOL_NODE_HOST).
llama_bind_nonloopbackper-callbooleanfalse everywhereSOL_LLAMA_BIND_NONLOOPBACK: the non-loopback bind opt-in for cross-node lane traffic. With it TRUE the configured host is used (fallback "0.0.0.0" when no host is pinned) and a loud once-per-VM warning is logged — llama.cpp’s HTTP API has no auth, so the exposure must be restricted to a trusted network. Also settable via [inference] bind_nonloopback in sol.conf. Off in every committed config; use the env twin per GPU host
data_dirbootstring"/tmp/sol"—Sol scratch/data directory. (LIFE-19): under a non-dev deployment_mode a missing/relative value is a typed PRE-SUP refusal ({invalid_data_dir,...} → invalid_config), no longer an unclassified maintenance-child crash.: the anchored <data_dir>/backups default follows the same absolute-path rule

Grant advertise-host rule. sol_registry:advertise_host/1 derives the lane-grant endpoint host from the FINAL llama bind host: a wildcard bind (0.0.0.0 / ::) advertises the operator-configured node_host (SOL_NODE_HOST), loopback aliases (127.0.0.1 / ::1 / localhost) collapse to 127.0.0.1, and a concrete non-loopback host is advertised as-is. A grant endpoint is a dial target, not a bind directive — it is never 0.0.0.0. For worker grants, sol_lane_orchestrator grants a bind_mode=loopback lane only when the worker’s READY hostname matches the target node’s machine hostname (case-insensitive first label, inet:gethostname/0); a worker that sent no hostname keeps the legacy same-Sol-node grace. A bind_mode=nonloopback lane relies on the advertised routable endpoint. Otherwise the grant refuses typed {lane_not_reachable, Lane, Node}. Cross-node traffic additionally needs the bind opt-in + port publish — see the runbook’s cluster section (the port publish is wild-owned).

Model parameter keys

temp, top_p, min_p, batch_size, ubatch_size are not standalone app-env atoms — they are per-model inference parameters accepted in the config-file inference section and in model_templates values (sol_config_file.erl section map; consumed by the model gen_statem). The defaults below are the shipped model_templates values (config/sys.config):

Parameterdefault templateAlso set in
temp1.0coding 0.3, chat 0.7, reasoning 0.6
top_p0.95coding 0.95, chat 0.9, reasoning 0.95
min_p0.01—
batch_size2048coding 2048, chat 2048
ubatch_size—per-model config
top_k—reasoning 40
KeyRestartTypeDefaultDescription
model_templatesper-callmapsee table abovePer-template sampler defaults, selectable via --template

Autoscaling

KeyRestartTypeDefaultEnv VarDescription
autoscaling_enabledper-callbooleanfalse—Model-instance autoscaler (sol_autoscaler_handler)
autoscaling_interval_msper-callinteger10000—Autoscaler poll interval. Range 1000–3600000
autoscaling_min_modelsper-callinteger1—Legacy floor; used only when the live policy map omits min_instances. Range 0–100
autoscaling_max_modelsper-callinteger4 (shipped sys.config; code fallback 8 — sol_autoscaler_action.erl)—Legacy ceiling; used only when the live policy map omits max_instances. Range 1–100. Hard-capped by the license GPU cap: scale-up consults sol_license:check(gpus, N+1) and fails closed
autoscaling_policyper-callmapderived defaults (scale_up_tps=100, scale_down_tps=10, min_instances=1, max_instances=8, cooldown_ms=30000)—Validated policy map (autoscaling_policy env or the validated set_policy/1 map; idle is the legacy disabled/unset sentinel). min_instances/max_instances drive the action layer and override the flat env fallback; scale_up_tps, scale_down_tps, cooldown_ms drive evaluation

Inference Lanes

Adds the declarative lane/engine/host-policy registry (sol_lane_registry.erl) — the sole lane truth: Sol alone picks the lane/engine/profile; workers never self-select. The values are nested Erlang maps, so this surface is sys.config-only: it cannot be expressed in sol.conf (the scalar parser has no map syntax — the model_templates precedent) and the keys are deliberately not in the plugin-bridge allowlist (lane pins and model paths leak topology; removed the same class). sol_config:validate_optional/0 validates the whole registry at boot and refuses with the accumulated typed violations:

{invalid_inference_lane, LaneId, Reason}
{invalid_inference_engine, EngineId, Reason}
{invalid_node_class, LabelOrClass, Reason}
{invalid_host_policy, Class, Reason}
{invalid_lane_config, Key, Reason}
KeyRestartTypeShipped defaultEnv VarDescription
inference_lanesper-callmap10 production lanes + llama_agentic_staged (test: fixture_sse)—Lane rows. kind => local | remote | staged (default local). Local/staged require engine + files + pin + ctx + caps + modes_allowed; remote (the api_tier) carries caps only. Local lanes also carry the grantable surface wire_format (openai default) / http_auth (none default) / bind_mode (loopback default). modes_allowed ⊆ [on_demand, cron, duration, attended]
inference_enginesper-callmapcuda_sm86_main (b11011), cpu_epyc, fork_turboquant, llama_agentic_staged—Engine rows. kind => cuda | cpu | experimental | fixture; production => true requires a full 40-hex ref (an optional repo@ prefix is accepted) and a non-empty build. A production lane bound to a production => false engine refuses unless the lane sets engine_ack => true (loud WARNING)
node_classesper-callmap#{blue => cpu_host, red => gpu_3090_full, green => gpu_3090_64g}—This deployment’s node label → class map (test => test_host in sys.test.config). An unknown label refuses boot
lane_host_policyper-callmapclass-keyed #{kind, vram_mib, ram_mib, max_sessions, lanes, ctx_overrides, host_env}—Per-class facts + lane policy. lanes => all_gpu is the sentinel (every GPU-capable local lane); explicit lists are validated lane-by-lane and must never name a staged lane (remote is allowed). host_env is enforced by (validated + merged into the spawn env; host_env_ack gates LD_LIBRARY_PATH); ctx_overrides enforcement rides
node_labelper-callatomblue (test in sys.test.config)SOL_NODE_LABELThis node’s label; must resolve through node_classes into lane_host_policy. The env override carries the label as a string and is normalized to the config atom
lane_model_rootper-callstring"/fun/models"—The serving-weights root the local/staged files.model paths must live under (absolute). This is not model_source_dir (the staging root) — the serving weights live on the GPU hosts
lane_path_ackper-callbooleanfalse (true in sys.test.config for the relative _build scratch root)—Acknowledges lane model paths outside lane_model_root (or relative); CRITICAL-adjacent loud posture, never silent

Pin rules: pin.repo / pin.file are non-empty binaries; pin.sha256 is a full lowercase 64-hex digest or the literal <<"unhashed">> with lane pin_ack => true (ghost carries a full on-host hash only for qwen38_atx); pin.license is non-empty, or <<"unknown">> with license_ack => true (qwen38_flashnext); <<"none">> is allowed only for a fixture-engine lane. The frozen per-lane ghost provenance (file:line, measured refs, license sources) lives in plan/fixtures/ghost-p7-standard-b0454f2.md, checked bidirectionally by ci/lane_registry_export_lint.py.

- lane keys (validated at boot by sol_lane_registry:validate/0 + sol_lane_profile:validate_profile/1; violations are typed {invalid_inference_profile, LaneId, Reason}):

Lane keyTypeMeaning
loading_probespositive integerPer-lane loading budget (probe count at inference_loading_interval_ms). ATX + UD seed 600 (the 60-90s load class)
kv_fastpath_ackbooleanAcknowledges a KV quant outside the fast-path set {f16, bf16, q4_0, q8_0} (the q4_1/q5 PP-collapse lesson). Without it, a non-fast-path KV refuses
fallbackatom (lane id)Fallback lane when the primary’s pin cannot be verified (must exist, be kind => local, and not be the lane itself). Selection is receipt-first: a verified lane-model-receipt.json beside the weights is accepted without hashing; missing/stale refuses as primary_pin_unverified (never a 15.6 GB start-path hash). The fallback reason is recorded (inference_lane_fallback event + sol_inference_lane_fallback_total{reason})
flash_attnon | off (optional)Lane-level FA override. The effective FA is this value or the engine’s require.fa; quantized KV REQUIRES effective on (argv truth is re-checked at the run_llama/1 gate)
rope#{scaling, orig_ctx, context_length?, rope_scale?}YaRN pairing: when the context exceeds orig_ctx, rope_scale MUST equal ctx/orig_ctx and an explicit context_length MUST equal ctx (the n_ctx_train clamp law). scaling ∈ {yarn, linear, none}; orig_ctx is a positive integer

Other laws enforced at the same gates: threads =< physical cores (erlang:system_info(cpu_topology), with an optional host-policy physical_cores override; threads => auto resolves to the count at start), the per-model draft_mtp law (a spec.type => draft_mtp lane needs caps.mtp => true or a files.draft), and parallel == limits.slots_max when both are present. Engine rows gained NO per-engine flag list (recorded decision; owns certification constraints).

** lane keys** (validated at boot by sol_lane_registry:validate/0):

Lane keyTypeMeaning
priorityinteger (optional, default 0)Deterministic-order preference. After cap specificity (fewest unrequested true caps), higher priority wins; remaining ties prefer production => true and finally the lexical lane id
engine_requirements#{Cap => #{pr => pos_integer}} (optional)Blocks a capability flip until the bound ENGINE’s ref carries the recorded pr<N> marker. Keys must be caps the lane declares; only pr is a legal requirement key; an unmet requirement refuses {error, {engine_requirement_unmet, Lane, Cap, Req}}

Capability routing: sol_lane_router:route/1 (and route/2 with #{host_class => Class}) is the PURE routing core ’s sol_lane_orchestrator:request/2 calls through its dynamic seam. Requirements are flat and fail-loud: vision, tool_calls, strict_json, mtp (booleans), min_ctx (positive integer, compared against effective_ctx — host-policy ctx_overrides[Lane] else the lane’s declared ctx), throughput (#{min_eval_tps => N} against the optional expected.eval_tps), mode, host_pref (a placement hint the router validates but does not use), deep_reasoning, and lane (an explicit pin that still passes every gate). Unknown keys refuse {error, {unknown_requirement, K}}; bad values refuse {error, {bad_requirement, K, V}}. Returns {ok, Lane} for a local lane, {remote, api_tier} as a DECISION (deep-reasoning or no local fit; api_tier has no provider/model binding — remote_binding/0 answers the typed {error, {remote_tier_unbound, api_tier}}), or a typed refusal (no_lane, {unknown_lane, _}, {staged_not_grantable, _}, {not_allowed_on_host, _}, {strict_json_unsupported, _}, {engine_requirement_unmet, _, _, _}, {ctx_insufficient, _, _, _}, {ctx_unknown, _}, {throughput_unmet, _, _, _}, {throughput_unmeasured, _}, {mode_not_allowed, _, _}, {deep_reasoning_requires_remote, _}) — never a silent fallback. Eligibility: kind => staged is never selectable; explicit host-policy lists filter by membership; lanes => all_gpu means every local lane whose engine class is a GPU class (the CPU lane, the remote tier and staged lanes are excluded).

response_format: the field is extracted at both HTTP ingresses (sol_http_validation:extract_inference_opts/1; a non-object value is a 400 on both dialects) and gated once the serving lane is known. A lane with caps.strict_json => true (and any engine_requirements satisfied) keeps the field and the OpenAI-wire body builder forwards it to the lane. An incapable lane STRIPS it for a tolerant request ({"type":"json_object"}) with the labeled counter inference_response_format_stripped_total{lane} and a lane_response_format_stripped event; a strict demand ({"type":"json_schema"} or "strict": true) refuses 400 with the typed {strict_json_unsupported, Lane} / {engine_requirement_unmet,...} message. Remote/provider/legacy lane-less legs keep the historical drop but are counted (lane label remote / unknown) — no silent drop. ATX forwards; the Ling lanes strip/refuse until #28682 flips their strict_json cap (blocked by their engine_requirements row until the engine bump carries the marker).

Needle + rows: sol_lane_needle is the reusable recall gate — a deterministic 16k-token haystack with AMBER-KEYLINE-7741 at position 0, chat path only, temperature 0, exact substring assert, wall + decode timing. run/2 resolves a RUNNING lane and never starts one ({error, lane_not_running}). The shared row shape (20 benchmark columns + the at freshness timestamp) is pinned by server/test/fixtures/lane_benchmark_row.json; fresh_row/6 is the pure freshness predicate ’s advertisement gate consumes (an engine bump changes engine_ref/build and invalidates). scripts/lane-needle.sh and scripts/lane-agentic-suite.sh are operator entry points (GPU-driven, off required checks); the GPU-less CT proves the mechanics against the extended fixture lane. tests/lane/run_agentic_suite.py ports the ghost 6-case + 10-case agentic ids; strict-JSON cases report gated (never pass) while is open.

Instance identity: the registry row key is the INSTANCE id — <<"<lane>/<model_slug>">> for lane starts, the bare model slug for legacy starts. sol_registry:start_model(Slug, #{lane => L, engine_override => E}) mints sol_model_<lane>__<slug> (legacy starts keep sol_model_<slug> exactly). Two lanes may serve the same GGUF; a duplicate instance-key collision with a different model slug refuses with {duplicate_instance, Lane, Slug}. /api/v1/models local rows expose slug (instance), model_slug, lane and engine.

Status/grant descriptor: every sol_inference:status/1 reply carries the additive flat tags lane, engine, endpoint, wire_format, http_auth, bind_mode, caps, ctx, slots_max, model, lease_id, expires_at (always present, undefined where unknown; endpoint = http://Host:Port, never /v1). The pure sol_inference:grant_descriptor/1 projects exactly the pinned seven keys {lane, endpoint, wire_format, caps, ctx, lease_id, expires_at} and returns {error, not_running} / {error, no_lane} otherwise. lease_id/expires_at are present-but-undefined until fills them; the contract fixture is server/test/fixtures/inference_grant_descriptor.json ( consume it byte-for-byte).

The fixture lane (sys.test.config only): fixture_openai engine (kind => fixture, production => false) + fixture_sse lane (kind => local, production => false, files.model under ./_build/test/tmp/models/, loading_probes => 20). starts it through the real sol_inference lifecycle — sol_inference_fixture_lane_SUITE (the Wave B exit proof: real start → /health → status descriptor → stop → port closed).

Lane Governor

Adds the node-local resource governor: sol_lane_lease (admission, monotonic leases, lifecycle modes), the bounded sol_gpu_probe sampler, the spawn-options seam (env/kill_timeout/kill_group), pidfile orphan reaping, and the lane metrics/alerts. The scalar keys below are validated by sol_config:validate_optional/0; lane_evict_hooks (an argv list) and lane_cron (a window map) are nested shapes the scalar sol.conf parser cannot express — they ship in sys.config/sys.prod.config (empty by default) and are deliberately absent from the plugin-bridge allowlist.

KeyRestartTypeShipped defaultEnv VarDescription
lane_kill_timeout_sbootinteger10—The erlexec SIGTERM→SIGKILL window per managed child ({kill_timeout, N}, erlexec 2.3.4 semantics — ONE window, not a poll). Range 0–60. The sol_inference_sup child shutdown budget follows it (max(5s, (N+2)s))
lane_idle_release_msper-callinteger900000—Default on_demand idle-release TTL; every admit resets it. Per-lane idle_release_ms overrides; false opts out (the test fixture lane opts out). Range 0–86400000
lane_duration_max_msper-callinteger86400000—Ceiling for a duration-mode start (duration_ms, request or lane row). Range 1–604800000
lane_lease_sweep_msper-callinteger5000—Expiry sweep cadence of the governor singleton. Range 100–600000
lane_lease_retry_after_msper-callinteger5000—retry_after_ms hint returned with {lane_busy, Holder, RetryAfterMs} (HTTP 409). Range 100–600000
lane_vram_sample_msper-callinteger5000—sol_gpu_probe cache TTL (nvidia-smi is never run per scrape/request). Range 100–3600000
lane_vram_headroom_mibper-callinteger1229—Free-VRAM margin required at lease acquire (ghost docs/benchmark-serving.md:488: “keep ≥1.2 GB free for image work”). Range 0–1000000
lane_release_tolerance_mibper-callinteger2048—Post-stop release verification tolerance: a delayed sample below pre_free − tolerance bumps sol_lane_release_verify_failed_total (CRITICAL alert). Range 0–1000000
lane_orphan_ttl_msper-callinteger3600000—Pidfile age horizon for the orphan sweep: older pidfiles are stale authority (the OS pid may have been reused) and are deleted WITHOUT touching the process; younger ones go through the full identity-checked reap. Range 1000–86400000
lane_evict_ackper-callbooleanfalse—Acknowledges executing lane_evict_hooks. Without it the configured hooks are refused (logged)
lane_evict_hooksper-calllist of argv lists[]—External-producer eviction commands (argv-only, ≤4, each non-empty; e.g. ghost’s ComfyUI /free POST). Executed once on a measured-budget refusal, then the budget is re-checked. Not expressible via sol.conf
lane_cronper-callmap#{}—#{<lane> => #{model => Slug, start => CronExpr, stop => CronExpr, duration_ms => N}} windows validated with sol_cron:validate_schedule/1. A start that cannot acquire is counted (lane_cron_start_refused_total) and skipped — never queued. Not expressible via sol.conf

Per-lane governor keys (validated by sol_lane_registry:validate/0; violations are typed {invalid_inference_lane, LaneId, Reason}):

Lane keyTypeMeaning
idle_release_msnon-negative integer | falsePer-lane idle-release override; false = resident until an explicit stop
duration_mspositive integerPer-lane default duration for duration-mode starts (request duration_ms wins)

Mode matrix: on_demand (default; start→use→idle-release), attended (idle-release policy; an explicit TTL/duration makes the lease fixed), duration (requires duration_ms, ≤ lane_duration_max_ms), cron (window map). A mode outside the lane’s modes_allowed refuses with {mode_not_allowed, Mode, Allowed} (HTTP 409 — never a 500). The start body gains "mode" and "duration_ms".

Slot/quota posture: lease acquire enforces big-lane exclusivity, the static VRAM sum (Σ expected.vram_mib + headroom ≤ host_policy.vram_mib), slot accounting (Σ slots_max + new ≤ host_policy.max_sessions), and the lane validator caps big lanes at 2 slots and tiny lanes at 5. A busy lane refuses {lane_busy, Holder, RetryAfterMs} (HTTP 409). The per-model admission cap is bounded by the lane’s parallel ( maps limits.slots_max); VRAM budgets are enforced statically for lanes that declare expected.vram_mib and advisory (typed unverified) elsewhere. Engine env: inference_engines.<id>.env (validated map; keys ^[A-Z_][A-Z0-9_]*$; LD_PRELOAD/LD_AUDIT refused; LD_LIBRARY_PATH requires env_ack => true) merges under lane_host_policy.<class>.host_env (now enforced, no longer stored-only; host_env_ack gates LD_LIBRARY_PATH). Explicit stop releases the lease; a crash/health-fail keeps it in recovering so the bounded auto-restart can renew it (a restart whose lease expired is denied, counted in sol_lane_restart_denied_total, and stays stopped).

Fleet Inventory & Orchestrator

Adds the replicated fleet read model (sol_inventory + the sol_lane_inventory ETS table, one row per node, pushed over explicit rpc:cast) and the placement brain (sol_lane_orchestrator:request/2). All scalar keys are validated by sol_config:validate_optional/0. replaces the old in-config lane_validation map with a DERIVED status over a runtime measurement record at <data_dir>/lane-validation.json (written 0600 atomically by sol_lane_validation, single writer = the admin validate route); the legacy lane_validation env map remains ONLY as the eunit/CT injection seam and is never shipped in sys.config.

KeyRestartTypeShipped defaultEnv VarDescription
lane_inventory_heartbeat_msper-callinteger30000—Re-push cadence even without a content change; staleness TTL = multiplier × this. Range 1000–600000
lane_inventory_scan_msper-callinteger5000—Local fact re-derivation cadence (running instances, leases, GPU sample, disconnected-node poll). Range 1000–60000
lane_inventory_coalesce_msper-callinteger1000—Minimum interval between peer pushes when content churns (the write-storm bound; the local row is refreshed regardless). Range 0–60000
lane_inventory_stale_multiplierper-callinteger3—Staleness = multiplier × heartbeat (default 3×30 s = 90 s). Range 2–10
lane_queue_maxper-callinteger8—Bounded admission waiters per lane on the target node; overflow → queue_full (0 refuses all waiting). Range 0–1000
lane_queue_wait_msper-callinteger30000—Default blocking wait for a busy lane; wait_ms=0 in the request is the async probe and returns {queued, Q} immediately. Range 0–600000
lane_queue_poll_msper-callinteger1000—Waiter re-check cadence (poll, not gen_event coupling). Range 100–60000
lane_ready_slack_msper-callinteger2000—Added to the per-lane loading budget (loading_probes × inference_loading_interval_ms) before the ready-wait gives up. Range 0–60000
lane_ready_wait_max_msper-callinteger600000—Absolute cap on the ready-wait budget. On timeout the instance is stopped (releasing its lease) and loading_timeout is returned. Range 1000–3600000
lane_failover_enabledper-callbooleantrue—Enables placement failover to the next candidate node
lane_failover_require_validationper-callbooleantrue—Requires the destination’s lane verdict state => validated before a move; otherwise {engine_unvalidated, Lane, Reason}
lane_request_id_ttl_msper-callinteger300000—Idempotency LRU TTL for request_id replay (bounded at 256 entries). Range 1000–3600000
lane_validation_ttl_msper-callinteger2592000000SOL_LANE_VALIDATION_TTL_MS: age after which a lane validation record is stale and the lane projects unvalidated (default 30 days). Range 3600000–15552000000 (1 h–180 d)

Operator surface: GET /api/v1/inference/lanes (RBAC inference:list) returns the sanitized merged view (?lane= / ?node= filters); the response never contains pids, env, model paths, or lease ids. request/2 is the single resolver: an explicit lane grants the 7-key descriptor plus a nested status map; requirements dispatch to ’s sol_lane_router:route/1 when present (otherwise no_lane).

Model Management

KeyRestartTypeDefaultEnv VarDescription
model_source_dirper-callstring"/fun/models"SOL_MODEL_SOURCE_DIRNFS or remote model directory (GGUF files)
model_store_dirper-callstring"/tmp/sol/models"SOL_MODEL_STORE_DIRLocal model cache (rsync target)
model_local_dirsper-calllist[]—Additional local model directories (no rsync)

Worker Management

KeyRestartTypeDefaultEnv VarDescription
worker_pathper-callstring"client/build/luna"SOL_WORKER_PATHPath to Luna worker binary. Validated against prefix. Hard-required in deployment_mode=prod
worker_path_prefixper-callstring""SOL_WORKER_PATH_PREFIXPrefix for spawned worker paths
max_workersper-callinteger16SOL_MAX_WORKERSMaximum concurrent agent workers. Range 1–1000 (sol_app:validate_config/0 boot validation); 1–10000 accepted by the optional validation battery (sol_config:validate_optional/0). The container entrypoint default is 100.
initial_workersper-callinteger1 (code fallback — sol_zmq_gateway.erl spawns initial_workers at boot; unset = 1)SOL_INITIAL_WORKERSWorkers spawned at boot. Range 0–1000
worker_heartbeat_timeout_msbootinteger15000 (shipped sys.config; code fallback 45000 — sol_zmq_gateway.erl/sol_zmq_worker_manager.erl/sol_health.erl)SOL_WORKER_HEARTBEAT_TIMEOUT_MSWorker heartbeat timeout in milliseconds (silent-worker eviction threshold). Range 1000–300000
worker_heartbeat_check_msbootinteger10000—Worker heartbeat check interval in milliseconds. Range 1000–60000
worker_busy_heartbeat_timeout_msbootinteger60000—Busy-worker eviction window: a worker holding an in-flight task is evicted only after this much TOTAL frame silence (no heartbeat AND no accepted token progress) — the plain worker_heartbeat_timeout_ms sweep can no longer orphan a busy-but-alive worker whose heartbeat timer is starved by its own task. Genuinely-dead busy workers are still reaped at this window (and independently by the task lease). Range 1000–600000
max_spawn_depthper-callinteger3 (shipped sys.config; code fallback 2 — sol_zmq_worker_manager.erl)—Max nested spawn depth. Range 1–20
agent_slots_per_principalper-callinteger0 — derive ceil(max_workers/2) at admission—: per-principal agent-slot FAIR-SHARE ceiling (one user cannot occupy every slot). 0 derives ceil(cap/2); a set value is the absolute ceiling, clamped to the global cap. Fleet-internal principals (internal/system) are not gated. Range 0–10000 (sol_config:validate_optional/0)
sync_enabledper-callbooleantrue—Installs sol_sync_event_forwarder — every store-routed event (incl. inference.complete, the spend-ledger rebuild’s source) is written to the durable event log. false leaves the advertised durable ledger/workflow consumers starved. The sol_event_sync_forwarder_installed gauge is absent when disabled
workspace_rootper-callstringundefined (shipped sys.config; sol_http_workspace.erl falls back to "." when unset)—Workspace files root for the HTTP workspace API

ZMQ

KeyRestartTypeDefaultEnv VarDescription
zmq_enabledbootbooleantrueSOL_ZMQ_ENABLEDRequired — the only key in sol_config’s REQUIRED_KEYS (missing = loud warning; ZMQ-dependent features dead). Enables the ROUTER/PUB gateway
zmq_router_portper-callinteger5555SOL_ZMQ_ROUTER_PORTROUTER socket port (workers connect as DEALER). Range 1–65535
zmq_pub_portper-callinteger5556SOL_ZMQ_PUB_PORTPUB socket port (event broadcasting). Range 1–65535
zmq_bind_addrbootstring"127.0.0.1"SOL_ZMQ_BIND_ADDRBind address for both sockets
zmq_error_strategybootatomskipSOL_ZMQ_ERROR_STRATEGYWorker-failure strategy: skip | retry | abort
zmq_max_retriesbootinteger3—Max retries under the retry strategy. Range 0–100
zmq_worker_capbootinteger100 (shipped sys.config; code fallback 256 — sol_zmq.hrl/sol_zmq_gateway.erl)—Max registered workers. Range 1–10000
zmq_listener_capbootinteger1000 (shipped sys.config; code fallback 1024 — sol_zmq.hrl/sol_zmq_gateway.erl)—Max event listeners. Range 1–1000
zmq_pid_capbootinteger10000 (shipped sys.config; code fallback 1024 — sol_zmq.hrl/sol_zmq_gateway.erl)—Max tracked pids. Range 50–10000
zmq_max_queue_depthbootinteger1000 (shipped sys.config; code fallback 10000 — sol_zmq.hrl/sol_zmq_gateway.erl)—Task queue depth cap. Range 1–100000
max_pending_tasksbootinteger100—Pending tasks per worker. Range 1–10000
dispatch_scheduled_pending_reserveper-callinteger10—: per-worker pending slots RESERVED for scheduled/workflow dispatch classes. Interactive (and channel/plugin) stop at max_pending_tasks - reserve; the reserved classes use the whole budget. Clamped to [0, max_pending_tasks - 1], so at least one non-reserved slot always remains. Range 0–10000
dispatch_scheduled_queue_reserveper-callinteger100—: queued-seat slots RESERVED for scheduled/workflow classes. Interactive (and channel/plugin) stop at zmq_max_queue_depth - reserve; the reserved classes use the whole queue. The shipped default is 10% of the shipped zmq_max_queue_depth (100 of 1000) — the original 1000 equalled the queue and left interactive one seat. Clamped to [0, max - 1]; a configured reserve at/above its budget refuses boot (validate_optional/0). Range 0–100000
shutdown_event_backlog_shed_thresholdper-callinteger5000—: at set_shutting_down (prep_stop), when the observed event backlog (sol_events + durable lane, or sol_sync_event’s admission queue) is at/over this many events, the shutdown pre-shed latch is armed: new store-routed events go straight to the durable shed journal (replayed at boot) and non-store events are dropped with the existing counter, so the bounded handler-completion drain cannot be re-flooded. Range 1–1000000
worker_boot_grace_msper-callinteger15000—How long a dispatch arriving while the session worker is still booting (spawning) is parked for readiness before the typed {not_available, spawning} refusal answers. On expiry — or if the worker dies mid-boot — the shared worker_unavailable classification answers unchanged
zmq_ownership_enforcedbootboolean— (unset → true)SOL_ZMQ_OWNERSHIP_ENFORCEDMessage-level ownership gates (result/token/error/event/spawn — sol_zmq_ownership.erl)
zmq_worker_secretbootstring— (unset)SOL_ZMQ_WORKER_SECRETWhen ≥16 bytes, every ZMQ ready frame must carry HMAC-SHA256(secret, nonce || u16(len(identity)) || identity || u16(len(worker_id)) || worker_id || u32(child_depth) || u64(ctr)) (v2 material via registration_signed_material/5; the 4-arity legacy material is the explicit zmq_enrollment_ctr_required=false escape hatch) or registration is refused (fail-closed)
allow_shared_workerper-callbooleanfalseSOL_ALLOW_SHARED_WORKER: the deployment acknowledges a SHARED worker. The shipped posture is single-tenant per worker; a READY declaring tenancy="shared" (or shared_worker=true) is refused with shared_worker_requires_declaration unless this is true. Even when true no multi-tenant isolation is claimed (one org per Sol; see docs/tenancy-posture.md)
zmq_allow_local_unregisteredper-callbooleanfalseSOL_ZMQ_ALLOW_LOCAL_UNREGISTERED: the dev-only escape from the credential requirement — with a LOOPBACK zmq_bind_addr and deployment_mode=dev, setting this permits credential-less worker registration (any local process can then register; CRITICAL-logged). A non-dev mode ignores it. The acknowledged external dev bind is the separate zmq_dev_external_bind_ack lever
zmq_dev_external_bind_ackbootbooleanfalseSOL_ZMQ_DEV_EXTERNAL_BIND_ACK: the ONLY way to boot ZMQ in deployment_mode=dev (the default) on a non-loopback zmq_bind_addr. Without it the boot REFUSES (dev_mode_external_zmq_bind) — the open dev posture (unauthenticated, MAC-optional registration) is never a silent default on a reachable interface. Acknowledged boots CRITICAL-banner at the gate; the effective posture is exported as the sol_zmq_deployment_posture gauge (0 = loopback, 1 = dev+external, 2 = staging/qa, 3 = prod, 4 = ZMQ disabled)
zmq_curve_enabledper-callatomautoSOL_ZMQ_CURVE_ENABLEDCURVE transport: auto = on when the bind is non-loopback, true = always, false = never. A curve-enabled node whose crypto backend is missing refuses boot
zmq_curve_secretkeyper-callstring— (unset → generated)SOL_ZMQ_CURVE_SECRETKEYServer CURVE key (Z85 or 32-byte binary); unset → generated and persisted to zmq_curve_keyfile
zmq_curve_keyfileper-callstring<data_dir>/curve_server.certSOL_ZMQ_CURVE_KEYFILEchumak_cert-format keypair file (z85), mode 0600, gitignored
zmq_curve_clientkeysper-calllistanySOL_ZMQ_CURVE_CLIENTKEYSAllowed client public keys (Z85 list); any accepts any
zmq_transport_plaintext_ackbootbooleanfalseSOL_ZMQ_TRANSPORT_PLAINTEXT_ACKOperator acknowledgement for a non-loopback plaintext bind (CRITICAL-logged); refuses boot in prod without it
zmq_transport_tunnelbootstring""SOL_ZMQ_TRANSPORT_TUNNELDeclared encrypted tunnel (wireguard/mtls-sidecar) satisfying the plaintext posture
zmq_enrollment_keysper-callmap#{}SOL_ZMQ_ENROLLMENT_KEYSPer-worker keys: #{KeyId => #{worker_id, secret}} (JSON via the env var); a key bound to a worker_id cannot re-register as another worker
zmq_enrollment_revokedper-calllist[]SOL_ZMQ_ENROLLMENT_REVOKEDRevoked key ids (comma-separated via the env var)
zmq_fleet_legacy_compatper-callbooleanfalseSOL_ZMQ_FLEET_LEGACY_COMPATFleet-secret (SOL_ZMQ_WORKER_SECRET) registration window; deprecation 2026-11-01
zmq_fleet_legacy_compat_untilbootstring— (unset)SOL_ZMQ_FLEET_LEGACY_COMPAT_UNTIL: the dated compat window (ISO YYYY-MM-DD) — the boot gate CRITICAL-banners while the window is open and REFUSES (fleet_compat_window_expired) once the date has passed; a window without a date stays CRITICAL-banner’d
zmq_local_enrollmentper-callbooleantrueSOL_ZMQ_LOCAL_ENROLLMENT: locally-spawned workers (init-wkr-N, sol_worker spawns) are first-class enrollment clients — the spawn path mints (or reuses, persisted at <data_dir>/zmq_enrollment_local.json, 0600) a per-worker key in the reserved local: namespace bound to the exact worker_id, and the worker env carries LUNA_ZMQ_KEY_ID + the minted secret INSTEAD of the shared fleet secret. false restores the legacy fleet-secret env (which refuses registration while the compat window is closed)
zmq_registration_plane_ackbootbooleanfalseSOL_ZMQ_REGISTRATION_PLANE_ACK: the ack lever for the knowably dead registration plane (fleet secret set + compat closed + no enrollment keys + local minting disabled) — boot REFUSES (zmq_registration_plane_dead) unless this is set (CRITICAL-banner’d)
zmq_register_rate_limitper-callinteger60SOL_ZMQ_REGISTER_RATE_LIMITSuccessful registrations/min PER CREDENTIAL bucket before the rate-anomaly refusal/alarm; a flood on one enrollment key never blocks another
lane_control_max_per_10sper-callinteger60—: per-identity sliding-window budget for lane-control operations (a remote lease lookup is deferred/refused with a typed rate_limited ack beyond it); bounds the resolver fan-out from one worker.
zmq_reready_rate_limitper-callinteger30— (sys.config only): successful re-READYs per identity per 60s for an ESTABLISHED registration before the typed registration_rate_limited refusal. Separate from zmq_register_rate_limit (new identities) and per IDENTITY, so one worker’s flood never spends another’s budget
zmq_preauth_pipe_limitper-callinteger20— (sys.config only)(ADV-A-02): per-delivering-pipe unregistered-frame replies allowed per 60s window before the pre-identity bucket drops them (counted zmq_preauth_heartbeat_dropped_total); the cap runs before any control reply
zmq_preauth_global_limitper-callinteger2000— (sys.config only)(ADV-A-02): global ceiling for unregistered-frame replies per 60s window across all delivering pipes
zmq_reready_resync_cooldown_msper-callinteger5000— (sys.config only): per-identity cooldown between READY resyncs (skills/settings/mail), alongside the at-most-one-queued-worker rule. 0 allows back-to-back admitted resyncs (the re-READY budget still bounds the rate)
zmq_replay_tx_max_age_msper-callinteger600000— (sys.config only): frame-tx past-freshness window (ms) — a tx older than this refuses as replay_stale; this is what makes idle replay-tombstone reaping safe. Rows older than the window are reaped on the liveness cadence
zmq_anonymous_capper-callinteger1— (sys.config only): the explicit local-unregistered (dev) posture admits at most this many distinct anonymous identities; an already-registered anonymous identity reconnects freely. Provision enrollment keys or raise this explicitly
zmq_identity_bindingper-callatomstrictSOL_ZMQ_IDENTITY_BINDING: the READY-path identity invariant. strict — the routing identity must equal the claimed worker_id (a wildcard "*"-bound key binds to its CLAIMED worker_id, so it no longer accepts arbitrary identity/worker_id pairs); provisioned — the enrollment record’s optional identity field must equal the routing identity. Refusals are typed (identity_mismatch / worker_id_missing / key_binding_invalid) and counted in sol_zmq_registration_refused_total{reason}. Invalid values refuse the boot (sol_config battery)
zmq_identity_binding_ackper-callbooleanfalseSOL_ZMQ_IDENTITY_BINDING_ACK: the ack lever for zmq_identity_binding=provisioned — boot REFUSES while any loaded enrollment record lacks the identity field unless this is set (CRITICAL-banner’d; those keys refuse registration with key_binding_invalid)
zmq_identity_ceilingper-callinteger4096SOL_ZMQ_IDENTITY_CEILING: the replay-identity ceiling — a NEW identity’s registration refuses (identity_ceiling_reached) once this many identities are tracked in the identity-lifetime replay tombstone stores (sol_zmq_frame_tx / sol_zmq_ready_ctr; re-registration of a tracked identity never refuses). Exported as the sol_zmq_replay_rows_tx/sol_zmq_replay_rows_ctr gauges; SolZmqReplayRowsGrowth pages at 80%. Range 1–100000
zmq_wire_skew_windowper-callbooleantrueSOL_ZMQ_WIRE_SKEW_WINDOW: admits a READY at the N−1 protocol version (version = current−1) during a rolling upgrade; task frames to that worker are stamped min(SolVersion, WorkerVersion) so its inbound validator accepts them. false restores strict version equality. Skew is counted by the sol_zmq_fleet_skew{version} gauge and WARNING-logged at registration
task_timeout_msbootinteger300000SOL_ZMQ_TASK_TIMEOUT_MSTask idle deadline (ms); 0 disables the GATEWAY deadline. Since the deadline is re-armed by token/heartbeat progress (progress-renewed lease); a task with no frames for this long resolves to the task_timeout terminal error (sol_zmq_gateway.erl). (XS-07): the task frame never omits the field — a disabled deadline is stamped with the shared 24h sentinel (docs/fixtures/task_timeout_contract.json, disabled_wire_sentinel_ms=86400000) so Luna’s max(task_timeout_ms or 300000, 30000) wedge watchdog cannot preempt Sol’s decision. A per-task timeout_ms in dispatch opts overrides it
task_max_lifetime_msbootinteger1200000SOL_TASK_MAX_LIFETIME_MS: total-lifetime cap (ms) of the progress-renewed task lease — a chatty-but-endless task is cancelled at the cap even while it streams; 0 = uncapped. Range 0–86400000
task_lease_renewalbootbooleantrueSOL_TASK_LEASE_RENEWAL: the lease-renewal rollback lever — false reverts to the legacy dispatch-armed deadline (no progress re-arm; the lifetime cap becomes unreachable in practice)
token_shed_window_msper-callinteger5000SOL_TOKEN_SHED_WINDOW_MS: the sustained-pause token shed window (ms) — only after a pause this long does the recv dispatcher shed a bounded fraction (every 2nd) of token frames, counted in zmq_token_shed_total and surfaced as truncated on the terminal row (honest truncation). 0 = off (tokens unsheddable)
orchestrator_lease_enabledper-callbooleantrueSOL_ORCHESTRATOR_LEASE_ENABLED: the single-writer lease (requires mango_auth_enabled=true; otherwise disabled). A second Sol boot against the same Mango refuses typed ({refuse_boot, {orchestrator_lease_held, Holder}}); a lease LOST at runtime self-fences the gateway (dispatch quiesced).: Mango unreachable at boot resolves the DURABLE marker — a confirmed holder stays unknown only inside the 30s TTL and self-fences on the wall-clock deadline (background retry active), while a NEVER-confirmed boot HOLDS dispatches by default (gateway quiesced; /ready 503) unless orchestrator_lease_stale_hold_ack=true preserves the historical unfenced posture
orchestrator_lease_takeoverper-callbooleanfalseSOL_ORCHESTRATOR_LEASE_TAKEOVER: the operator takeover lever (there is no Sol CLI parser — this env/config ack replaces the phase’s --takeover). Forces the lease CAS to this node (epoch+1); the old holder loses its next heartbeat and self-fences
orchestrator_lease_stale_hold_ackper-callbooleanfalseSOL_ORCHESTRATOR_LEASE_STALE_HOLD_ACK: the never-confirmed-boot / stale-hold acknowledgement. Default false = an unconfirmed lease HOLDS dispatches (gateway quiesced) and /ready is 503 (fail closed). true preserves the historical unfenced boot (dispatch + readiness stay available) and is the only way an unknown/stale lease row is not a readiness error. A fenced verdict is never cleared by this lever
orchestrator_lease_max_missed_heartbeatsper-callinteger2SOL_ORCHESTRATOR_LEASE_MAX_MISSED_HEARTBEATS: k consecutive 10s heartbeat transport failures (default 2 = 20s, inside Mango’s 30s lease TTL) after which a CONFIRMED holder self-fences. Non-consecutive blips never fence; a never-confirmed boot uses the ack lever above. A durable marker keeps a confirmed-then-stale/fenced verdict across a gateway or node restart
memory_recovery_barrier_msper-callinteger5000SOL_MEMORY_RECOVERY_BARRIER_MS: the bound on the WAL recovery drain that runs BEFORE the ETS read model hydrates. On timeout/queued ops hydration is HELD (memory_recovery_deferred, critical log + hydration_status/0 recovery=deferred) and retried on the cleanup tick — never a silent stale serve
orchestrator_lease_heartbeat_msper-callinteger10000SOL_ORCHESTRATOR_LEASE_HEARTBEAT_MS: lease heartbeat cadence (ms); Mango’s lease TTL is 30s. Range 100–600000.: the CONFIRMED-holder fence deadline is min(k × heartbeat, 30000) measured on the wall clock from the last confirmation and is (re-)armed on EVERY successful confirmation (and on a transport failure), not only when a heartbeat fails — a configured heartbeat longer than the TTL self-fences at the TTL even if no tick or failure ever occurs inside the stealable window

The #state{} record in server/include/sol_zmq.hrl has internal fallback defaults (worker_cap=256, listener_cap=1024, pid_cap=1024, heartbeat_timeout_ms=45000, max_queue_depth=10000). The shipped sys.config overrides these; the values above are what operators get.

The trust-plane keys above (zmq_curve_*, zmq_transport_*, zmq_enrollment_*, zmq_fleet_legacy_compat, zmq_register_rate_limit) and task_timeout_ms are documented in depth in zmq-security.md and zmq-protocol-reference.md; the rows here pin their env mappings so every entrypoint/sol_app read has a documented lever .

Cluster

KeyRestartTypeDefaultEnv VarDescription
inet_dist_listen_min / inet_dist_listen_max (kernel)bootinteger— (unset → random dist port)SOL_DIST_PORTWhen set, the container entrypoint (server/bin/entrypoint.sh) renders a kernel section pinning the Erlang distribution listener to this single port (min = max) — cluster deployments pin one port through firewalls (the live cluster uses 9150). Unset/empty = no pins, exactly the pre-cluster random-port behaviour. Range 1–65535; a non-integer or out-of-range value REFUSES the boot (exit 78) instead of rendering invalid Erlang.
cluster_nodesbootlist[] in sys.config and in the shipped sys.prod.configSOL_CLUSTER_NODESSeed nodes pinged at boot (sol_cluster init) and rendered into sys.config by the container entrypoint. Grammar (validated at BOTH layers — entrypoint render time and sol_app:nodes_val/1; malformed values are a loud typed boot refusal, never a silent drop): the Erlang list literal ['sol@peer1','sol@peer2'] (canonical — what the wild create scripts set), or the bare comma-separated form sol@peer1,sol@peer2, or [] for none. Names must be longnames (exactly one @, local@host, ≤253 chars); short names are refused — unqualified peers pang-fail against FQDN nodes. The union list is self-filtering (sol_cluster drops the local node before probing), so every node may ship the same list; wild’s per-host SOL_CLUSTER_NODES env still wins where set. The config-file [clustering] nodes value is normalized through the SAME grammar at apply time — a malformed value refuses the file (typed invalid_config) and applies NO keys (all-or-nothing). Seeds are re-probed asynchronously and on every 30s resync tick while unconnected (bounded: one probe per seed, bounded by the seed list).
cluster_expected_nodesper-callinteger1SOL_CLUSTER_EXPECTED_NODESExpected cluster node count, self included. Exposed as sol_cluster_expected_nodes{deployment}; the alert rule sol-cluster-expected-nodes (observability/grafana/alerting/sol-alerts.yml, warning, for 5m) fires when sol_cluster_node_count < sol_cluster_expected_nodes. The sol_config default is 1 (key absent); a SEPARATE unset derivation lives in the sol_prometheus metric reader — max(1, length(cluster_nodes) + 1) (sol_prometheus:cluster_expected_nodes/0, the gauge fallback when the key is unset). That reader-level derivation is not the configuration default: with a 3-node union list it yields 4, a false-negative on the exact day a node drops, which is why a fleet deployment pins the value (wild’s per-host SOL_CLUSTER_EXPECTED_NODES); the shipped artifact pins the standalone 1.
cluster_leave_persistper-callbooleanfalse in dev, true in prod—(OTP-10): persist the cluster-left set to <data_dir>/cluster_left.json through sol_durable_file so sol_cluster:leave survives a consumer restart and a VM restart. Prod always persists; dev/test keeps the historical memory-only set unless the operator sets cluster_leave_persist=true (a CT-case leave cannot poison successor suites).
cluster_version_guard_ackper-callbooleanfalse (pinned in sys.config + sys.prod.config)—: the Sol↔Sol join-guard acknowledgement. The join guard is DEFAULT-ON (join generation N/N−1 admitted + sol_cluster_version_skew gauge + the maintenance-503 posture marker; N−2/newer-than-N+1 and schema-epoch mismatches REFUSED + peer disconnected). true downgrades a refusal to a CRITICAL-logged ACKED admission for a DELIBERATE mixed-version/schema drill only — never a silent pass. See docs/version-matrix.md §Sol ↔ Sol.
cluster_deploymentper-callstringdefault; the shipped sys.prod.config pins "blue-red-green"SOL_CLUSTER_DEPLOYMENTDeployment label stamped on sol_cluster_node_count / sol_cluster_expected_nodes — one series pair per labeled deployment.
node_hostper-callstring"127.0.0.1"SOL_NODE_HOSTHostname suffix for node
node_name (-name in vm.args)bootstringsol@zerg-solSOL_NODE_NAMEErlang distribution node name rendered into vm.args by the container entrypoint. The cluster era requires a longname (local@host, e.g. sol@zerg-sol.example.com or sol@192.168.100.2) — short names pang-fail against FQDN peers. Must be identical to the name peers put in SOL_CLUSTER_NODES
allow_schema_driftbootbooleanfalse—: the boot schema-drift ack. When false, a local disc table whose disc_copies name a node outside cluster_nodes ∪ {self} REFUSES boot ({refuse_boot, {foreign_schema_nodes, Nodes}}). true boots WARNING + mnesia_schema_drift_boot_total for the documented repair window only.
mnesia_backup_intervalper-callinteger (seconds)3600—Mnesia backup interval. Range 0–86400 (sol_config.erl optional battery — seconds, not ms)
mnesia_disc_fallbackper-callram | refuseram—: posture when a store cannot create its disc_copies table. ram keeps the historical availability behavior but logs CRITICAL and counts mnesia_disc_ram_fallback_total (the store is RAM-only until the schema dir is repaired); refuse fails the store’s init so boot refuses the silent downgrade.
mnesia_backup_dirbootstringanchored <mnesia_dir>/backups (sys.config ships /tmp/sol/mnesia_backups; prod /var/lib/sol/data/mnesia_backups; the container entrypoint derives it from SOL_DATA_DIR)SOL_MNESIA_BACKUP_DIR (container render)Mnesia backup destination. Resolution order: this config key > anchored <mnesia_dir>/backups. Set it ABSOLUTE — a CWD-relative value silently orphans backups on a different-CWD restart. mnesia_backup_retention_days (default 7) prunes by age; MAX_BACKUPS=5 is a per-UTC-day cap, not a global one
maintenance_drain_deadline_msper-callinteger5000—(CORE-01): deadline for the maintenance-enable drain (sol_maintenance). Range 100–60000; out-of-range values fall back to 5000. A drain timeout leaves the gate ENABLED and returns a typed error (never a silent bypass).
mnesia_dirbootstringanchored <data_dir>/mnesia when unset; /var/lib/sol/data/mnesia in sys.prod.configSOL_MNESIA_DIRMnesia data directory. The standalone prod profile pins it under the unit’s writable state root; the container render derives it from SOL_DATA_DIR. An unset value in a prod boot whose data_dir is also unset/relative refuses typed ({mnesia_dir_unset, _}), never a silent CWD schema

Container Entrypoint (server/bin/entrypoint.sh)

The canonical container entrypoint translates SOL_* env into the release sys.config + vm.args before exec’ing the BEAM. Beyond the keys mapped elsewhere in this reference, it reads these path/layout vars (all optional; unset = the container defaults shown). The former OTLP and plugin_system_dir/templates_dir sys.config renders were DELETED — none had an in-VM reader (the OTLP facade was retired in; system plugins are the bundled priv/plugins root; ).

Env VarDefaultDescription
SOL_ROOT/opt/solRelease root the entrypoint probes for the BEAM runtime ($SOL_ROOT/erts-*/bin/erl) when performing the sys.config authority merge; a missing erl binary refuses the boot rather than serving a 32-key-only render
SOL_MERGE_ERL— (unset → probed under SOL_ROOT)Explicit erl binary used for the sys.config authority merge; when set it must be executable, else the probe path is used
SOL_COOKIE_FILE${HOME:-/opt/sol/data}/.erlang.cookieDistribution cookie file the entrypoint reads/creates for vm.args cookie rendering
SOL_DIST_TLS_ENABLEDfalse: render the distribution-TLS posture into vm.args (-proto_dist inet_tls + -ssl_dist_optfile). Only true/false; true refuses the boot (exit 78) when the optfile is missing — never a silent plaintext boot.
SOL_DIST_TLS_OPTFILE/etc/zerg/tls/ssl_dist.confStaged Erlang distribution-TLS optfile used when SOL_DIST_TLS_ENABLED=true (wild’s stage-dist-tls.sh writes it).
SOL_RELEASE_DIRunset: explicit release directory for the container entrypoint (wins over all other selectors). With SOL_RELEASE_VSN and the <root>/current symlink, it replaces the pre-fix nondeterministic `ls releases
SOL_NOFILE_LIMIT65536: the fd ceiling the entrypoint applies with ulimit -n before exec (>=1024; a hard limit may refuse the raise loudly). The runtime gauges sol_http_nofile_{limit,required,headroom} expose the effective value vs http_max_connections + max_sse_connections + 1024.
SOL_RELEASE_VSNunset: explicit release version directory under $SOL_ROOT/releases/<vsn> (second to SOL_RELEASE_DIR/current); the single-release and bare-image fallbacks are logged.
SOL_DATA_DIR/opt/sol/dataContainer data root; the entrypoint derives the default SOL_MNESIA_DIR, SOL_AUDIT_LOG_PATH (<data>/logs), SOL_AUDIT_DATA_DIR (<data>/audit-data), SOL_MNESIA_BACKUP_DIR (<data>/mnesia_backups), model/plugin/template dirs from it. data_dir/audit_data_dir/mnesia_backup_dir are RENDERED over the release profile
SOL_MNESIA_BACKUP_DIR<SOL_DATA_DIR>/mnesia_backups: Mnesia backup destination for a container boot; rendered as mnesia_backup_dir over the release profile
SOL_ETC_DIRthe release dirDirectory the entrypoint writes the rendered sys.config + vm.args into
SOL_PLUGIN_DIR<data>/pluginsContainer directory the entrypoint CREATES for plugin payloads
SOL_TEMPLATES_DIR<data>/templatesContainer directory the entrypoint creates for workflow/plugin templates
SOL_OTEL_ENABLEDfalseAccepted for compatibility; NOT rendered and read by no Sol module
SOL_OTEL_ENDPOINThttp://127.0.0.1:4318Accepted for compatibility; NOT rendered, no reader
SOL_OTEL_SERVICE_NAMEsolAccepted for compatibility; NOT rendered, no reader

Circuit Breaker

KeyRestartTypeDefaultEnv VarDescription
circuit_breaker_failure_thresholdper-callinteger5—Failures before circuit opens. Range 1–100
circuit_breaker_window_msper-callinteger60000—Failure counting window (ms). Range 1000–3600000
circuit_breaker_cooldown_msper-callinteger30000—Cooldown before half-open (ms). Range 1000–3600000
provider_pool_strategyper-callatomround_robin—Provider key selection strategy
provider_key_storeper-callboolean or pathtrue (shipped sys.config; code fallback false — sol_provider_key_store.erl; absent disables the store)—: persists OPERATOR-added provider-pool keys (sol_provider_pool:add_key/3, the documented remote-shell ceremony) AES-256-GCM at rest. true derives <data_dir>/provider_keys.bin (0600); a path overrides. Declarative keys stay config/keyring/OAuth-derived and are never copied to the store. A corrupt/unreadable store logs + counts and fails OPEN (the pool still boots)
provider_key_store_secretper-callstringunset—: explicit encryption secret for the key store (recommended when the data dir is backed up/shared). Unset → a generated 0600 <store>.key keyfile carries the key

Cost / Spend Guard

Per-principal daily inference enforcement (sol_spend_guard). The caps are UTC-day scoped and checked before every streaming ingress dispatch; an in-flight request is never interrupted, so the overshoot is bounded by the concurrently admitted requests’ projected usage (see cost.md). 0 disables either axis. A USD cap makes an unpriced model a typed model_unpriced refusal unless the policy allows it.

KeyRestartTypeDefaultEnv VarDescription
inference_daily_budget_usdper-callnumber0 (disabled)—Per-principal daily USD cap. Settled cost comes from sol_cost/sol_model_metadata; 0 disables the USD axis
inference_daily_token_budgetper-callinteger0 (disabled)—Per-principal daily token cap (input + output settled). 0 disables the token axis
inference_unknown_price_policyper-callatom/binarydeny—With a USD cap enabled: deny refuses unpriced models (model_unpriced); allow admits them and records cost 0 (counted in cost_unknown_price_total / inference_model_unpriced_total)
inference_spend_reservation_ttl_msper-callinteger600000—: a parked admission reservation older than this is reclaimed by the lock-scoped sweep on the next reserve for the same principal/day (a caller crash between reserve and dispatch can never hold pending forever). 0 reclaims on the next reserve
completion_lease_ttl_msper-callinteger300000—Fixed TTL for the attended lease a /v1/completions request takes on its FIM lane. It must not exceed lane_duration_max_ms (an over-max value is REFUSED with duration_exceeds_max; it is not silently clamped). Keeps one ghost-text request from pinning a big lane for the 15-minute on_demand class
inference_worker_daily_task_budgetper-callinteger0 (disabled)—Per-principal daily worker-task cap enforced at every worker-send funnel (ZMQ dispatch, stdio chat/WS/REST sol_worker:send_task/2, one-shot sol_worker_bg, ZMQ background child spawn); counts admitted placements (not tokens), refunded when placement is refused; 0 disables
inference_daily_budget_overridesper-callmap#{}—Optional per-user cap overrides keyed by user_uuid: #{<<"uuid">> => #{daily_budget_usd => N, daily_token_budget => N, daily_worker_task_budget => N}}; a missing axis falls back to the global value
inference_ledger_rebuild_on_bootper-callbooleantrue—(PRV-05): rebuild the per-tenant daily spend ledger from the durable inference.complete event log when the ETS ledger is created (bounded window, deduped by request_id). false skips the rebuild; an absent/degraded event store never blocks admission.
inference_ledger_rebuild_retry_msper-callinteger60000—: bounded retry interval for a failed ledger rebuild/reconcile; the boot caller retries after this interval instead of leaving the day empty until the next restart.
inference_ledger_rebuild_page_sizeper-callinteger10000—: event-log page size for the boot ledger rebuild; non-positive values fall back to 10000.
inference_ledger_rebuild_max_eventsper-callinteger1000000—: cap on events replayed by the boot ledger rebuild; the walk stops at this bound and the ledger continues from the last settled cursor. Non-positive values fall back to 1000000.
inference_ledger_marker_ttl_msper-callinteger86400000—: TTL (ms) for the settlement/worker-turn idempotency markers before the bounded prune may delete them (0 = delete on the next pass). Negative values fall back to 24h.
inference_ledger_prune_interval_msper-callinteger60000—: minimum interval (ms) between marker-prune passes; a marker row claims the interval so concurrent settles do not re-walk the table. Negative values fall back to 60000.

Auth / Security

KeyRestartTypeDefaultEnv VarDescription
auth_enabledbootbooleanfalse (shipped sys.config; sys.prod.config sets true)SOL_AUTH_ENABLEDEnable Bearer token authentication. false grants the dev principal (permissions=[<<"*">>]) ONLY when deployment_mode=dev AND the request is loopback-topology (peer + forwarded headers); a proxied/non-loopback request is refused typed (auth_disabled_but_proxied) and logged CRITICAL. The non-loopback + auth_enabled=false boot refusal remains (sol_app:validate_auth_boundary/0)
auth_tokensbootlist | map[]SOL_AUTH_TOKENSValid API tokens for Bearer auth (local mode).: entries may carry per-token permissions — [{<<"reader">>, [<<"tasks:read">>]}] (or the map form #{<<"reader">> => [<<"tasks:read">>]}); a bare token keeps the historic * grant and is CRITICAL-logged at boot (the POST /api/v1/lua/eval superuser exposure) until migrated. The SOL_AUTH_TOKENS env form stays the CSV of bare tokens
auth_exempt_pathsper-calllist[] (additive)—Additional paths that skip auth. Entries are ADDED to the built-in exempt list — see below (sol_auth_middleware.erl ?DEFAULT_EXEMPT_PATHS). The list is read per call but cached in persistent_term; after changing it call POST /api/v1/infra/cache-invalidate (no restart required)
allow_token_queryper-callboolean— (unset → false)SOL_ALLOW_TOKEN_QUERYAccept ?token= query-string auth. Deprecated — leaks credentials into proxy logs (sol_auth_middleware.erl)
rate_limit_enabledbootbooleantrueSOL_RATE_LIMIT_ENABLEDPer-token request rate limiting. Posture split: code default is ON (sol_auth_middleware.erl rate_limit_default/0), the shipped dev sys.config sets false (explicit off) and sys.prod.config sets true. When the dedicated limiter is enabled, accounting uses rate_limit_rpm/rate_limit_burst; the middleware’s built-in per-token budget (used before/without the limiter process) is 300 rpm + 30 burst (?RATE_LIMIT_RPM_DEFAULT/?RATE_LIMIT_BURST_DEFAULT)
rate_limit_rpmbootinteger60SOL_RATE_LIMIT_RPMRequests per minute per key (dedicated sol_rate_limiter; default 60 also in sol_security_sup.erl fallback). Range 1–100000
rate_limit_burstbootinteger10SOL_RATE_LIMIT_BURSTBurst capacity (dedicated limiter). Range 1–10000
rate_limit_principalper-callatomip+tokenSOL_RATE_LIMIT_PRINCIPAL: bucket principal. ip+token (default): every request consumes the resolved peer-IP bucket pre-auth and, after a successful token validation, the verified-token bucket. ip: rollback lever — the token bucket is never consulted
rate_limit_ip_rpmper-callinteger60 (shipped sys.config; the built-in middleware code fallback is 300 — sol_auth_middleware.erl ?RATE_LIMIT_RPM_DEFAULT)SOL_RATE_LIMIT_IP_RPM: per-IP requests/minute enforced on BOTH limiter paths; the shipped configs set 60/10 per class explicitly. Range 0–100000. Shared/NAT deployments raise this without weakening the per-token budget
rate_limit_ip_burstper-callinteger10 (shipped sys.config; the built-in middleware code fallback is 30 — sol_auth_middleware.erl ?RATE_LIMIT_BURST_DEFAULT)SOL_RATE_LIMIT_IP_BURST: per-IP burst for the built-in default budget. Range 0–10000
rate_limit_token_rpmper-callinteger60 (shipped sys.config; the built-in middleware code fallback is 300 — sol_auth_middleware.erl ?RATE_LIMIT_RPM_DEFAULT)SOL_RATE_LIMIT_TOKEN_RPM: per-token requests/minute enforced on BOTH limiter paths; the shipped configs set 60/10 per class explicitly. Range 0–100000
rate_limit_token_burstper-callinteger10 (shipped sys.config; the built-in middleware code fallback is 30 — sol_auth_middleware.erl ?RATE_LIMIT_BURST_DEFAULT)SOL_RATE_LIMIT_TOKEN_BURST: per-token burst for the built-in default budget. Range 0–10000
locality_secretper-callstring— (unset)SOL_LOCALITY_SECRET(HTTP-03): the POSITIVE host-locality proof for the tokenless /metrics + /api/v1/metrics gate and the auth-disabled dev principal. When set (≥16 bytes), an on-host proxy must inject x-zerg-locality: <unix-seconds>:<hex HMAC-SHA256(secret, METHOD "\n" PATH "\n" TIMESTAMP)> (acceptance window ±300 s, constant-time compare); loopback topology alone then no longer suffices. Unset requires an explicit loopback Host authority in addition to loopback topology — reported at boot as EXPLICIT-LOOPBACK and on first gated request with a one-time WARNING. A configured secret shorter than 16 bytes fails CLOSED (FAIL-CLOSED boot datum). Contract in security.md
trusted_proxiesper-calllist | comma-string[127.0.0.1]SOL_TRUSTED_PROXIES: TCP peers allowed to set X-Forwarded-For/X-Real-IP. Bare IPs and CIDR entries (10.0.0.0/8) both match; invalid entries drop fail-safe with a warning, a /0 CIDR drops with a CRITICAL unless allow_global_trust=true, and an invalid (or /0-unacknowledged) SET value refuses the boot (sol_net:validate_trusted_proxies/1). Client-IP resolution is the Mango-parity rightmost-untrusted walk with the anti-mint-loopback rule
allow_global_trustper-callbooleanfalseSOL_ALLOW_GLOBAL_TRUST: ack lever for a /0 entry in trusted_proxies (trust-everything deployments). Without it the entry is dropped, and a boot with it set refuses (sol_config:http_trust_config_violations/0)
legacy_write_implies_executeper-callbooleantrueSOL_LEGACY_WRITE_IMPLIES_EXECUTE: the coarse rule granting execute-class permission from write-class. Kept true for existing installs; new installs set false (execute-grade tools then require tasks:execute). Migration note in security.md
permission_max_pendingper-callinteger100—: maximum outstanding permission asks the registry keeps; beyond it new asks are refused typed (backpressure, never an unbounded queue). Code fallback 100 — sol_permission_registry.erl ?MAX_DEFAULT_PENDING
worker_control_timeout_msper-callinteger10000—: bounded wait for a chat worker session_control reply (branches/snapshots/restore); a timeout is a typed control_timeout, never a worker kill

Cluster scope of the limiter: the limiter’s distributed mode is wired but UNEXERCISED in production — the mechanism is a distributed => true start option on sol_rate_limiter (joins a pg scope and sums remote counts), but the production security supervisor passes only {enabled, rpm, burst} and there is no env/config key that flips it. Per-node budgets are the recorded posture: N nodes ⇒ up to N× the effective budget per principal. A distributed limiter is a successor design item only if per-account global budgets become a requirement. Deleted key: the Sol-side “Cluster API key” app-env key (api_key, placeholder REPLACE_WITH_GENERATED_KEY) was removed — it had No Sol reader and the entrypoint rendered a second spelling with zero consumers. Cluster API auth is RBAC tokens (auth_tokens). The similarly named environment variable consumed by the Luna client as its bearer token is client configuration, documented with the client (not a Sol boot key). ci/config_consumer_lint.py now also fails when an entrypoint-rendered app-env key has no read site.

Mango bridge (Sol-side keys)

These are Sol app-env keys that configure Sol’s client connection TO the Mango identity service — Mango’s own service config lives in mango/conf.py (see §Related configuration surfaces).

KeyRestartTypeDefaultEnv VarDescription
mango_auth_enabledbootbooleanfalseSOL_MANGO_AUTH_ENABLEDDelegate auth to Mango (mango_host:mango_port). When true, mango_service_token is required
mango_hostbootstring"127.0.0.1"SOL_MANGO_HOSTMango auth/identity service host
mango_portbootinteger5800SOL_MANGO_PORTMango service port
mango_service_tokenbootstring""SOL_MANGO_SERVICE_TOKENService token for Sol→Mango calls. Placeholder REPLACE_WITH_GENERATED_SECRET is a fatal boot error
mango_pub_urlbootstring— (unset)SOL_MANGO_PUB_URLMango public-facing URL (for redirects)
mango_tlsbootbooleanfalseSOL_MANGO_TLSTLS for Sol→Mango
mango_ca_fileper-callstring— (unset)SOL_MANGO_CA_FILECA bundle for Sol→Mango TLS
mango_transport_tunnelbootstring""SOL_MANGO_TRANSPORT_TUNNELTunnel marker exempting Sol→Mango from the plaintext refusal

Audit & recording

KeyRestartTypeDefaultEnv VarDescription
audit_hmac_secretper-callstringundefinedSOL_AUDIT_HMAC_SECRETHMAC key for the audit log tamper-evidence chain. Must be stable across restarts — random keys break the chain. : prod + unconfigured secret REFUSES BOOT unless audit_chain_ephemeral_ack=true (the chain is then valid within one run only — verify_integrity/1 flags pre-restart segments after every restart); dev/loopback keeps the historical warn posture. The boot log records the secret’s provenance (provisioning env vs sys.config).: the container entrypoint renders this as base64 in sys.config (sol_app:decode_b64_secrets/0 decodes it before validation), so quotes/newlines in the secret cannot break the rendered term. (CORE-3): the b64: rendering is decoded on BOTH config arms — a SOL_AUDIT_HMAC_SECRET="b64:<base64>" process-env value is normalized after the env override pass (malformed base64 on either arm is a typed boot refusal)
audit_chain_ephemeral_ackbootbooleanfalseSOL_AUDIT_CHAIN_EPHEMERAL_ACK: explicit acknowledgment letting a prod boot start WITHOUT audit_hmac_secret. CRITICAL-banner’d; the tamper-evidence chain is valid within a single run only
audit_log_pathper-callstring"/opt/zerg/logs" (code fallback); /var/lib/sol/data/logs in sys.prod.configSOL_AUDIT_LOG_PATHDirectory (not a file). Daily files audit-YYYYMMDD.jsonl. moved the prod/container default under the data root. The shipped systemd unit overrides it to /var/log/sol/audit (its LogsDirectory), which is equally writable
audit_data_dirbootstring"/opt/zerg/data" (code fallback ?DEFAULT_DATA_DIR, sol_audit_log.erl); /var/lib/sol/data/audit-data in sys.prod.configSOL_AUDIT_DATA_DIRAudit chain state directory (chain checkpoint + seq/sig sidecars). moved the prod/container default under the data root
audit_enabledper-callboolean— (unset → true, sol_audit_log.erl)SOL_AUDIT_ENABLEDMaster audit switch
audit_verify_interval_msper-callinteger (ms)300000—: cadence of the scheduled anchored audit-chain verification (runs in a monitored side process; values below 100 fall back to the default). The verdict feeds audit_chain_verified_seq/audit_chain_last_verify_timestamp; staleness pages via the dead-man rule.

Auth-exempt paths (as-implemented)

Generated source: the auth-exempt and maintenance-exempt lists are single-sourced from sol_auth_middleware.erl (?DEFAULT_EXEMPT_PATHS + is_maintenance_exempt/1) and rendered into docs/auth-flow.md by ci/docs_constant_parity_lint.py --write. Do not hand-copy the lists here; the generated block is the only inventory and the parity lint gates it.

Semantics: a request with no token on an exempt path runs FULL RBAC as anonymous; exempt means “no token required”, never “skip authorization”. /api/v1/ready runs 19 subsystem checks (503 when degraded). /metrics is not auth-exempt: a tokenless scrape is allowed only when the loopback TOPOLOGY holds (the TCP peer, not proxy headers), otherwise it needs metrics:read. Cookie-leg logout still requires the zerg_csrf double-submit pair; /api/v1/webhook/ is unauthenticated by design because the per-channel signature IS the auth; the WS one-time ticket is honored only on the WS handshake route.

Retry-After: three shapes (as-implemented)

Retry-After is emitted in three different shapes depending on the producer (they are NOT interchangeable — parse both the header and the body):

ShapeWhereExample
Header only429 seat/worker capacity denials — sol_http_chat.erl capacity_reply (429 seat_cap_reached / max_workers_reached)Retry-After: 1 + body {"ok":false,"error":"seat_cap_reached"}
Body-embedded only429 bulk worker-mgmt soft-cap — sol_http_worker_mgmt.erl (429 cap_reached)body {"error":"cap_reached","retry_after":"30","results":[...]} (NO header)
Header + body-embedded429 auth rate limit — sol_auth_middleware.erl do_auth (rate-limit path)Retry-After: <N> + body {"error":"rate_limited","retry_after":<N>}

Auth-rate-limit saturation is a fail-closed 503 + Retry-After (rate_limiter_unavailable), never a 401.

Provider Routing

KeyRestartTypeDefaultEnv VarDescription
default_routingper-callmap——Default routing policy per capability mode (build/plan/general) (config-file routing section, sol_config_file.erl)
provider_mappingsper-calllist[]—Model-to-provider routing overrides: a list of {ModelName, ProviderAtom} pairs (sol_provider_boot:register_config_mappings/0 accepts ONLY is_list/1). A map was previously documented and silently ignored — changed the shipped profile to [] and ci/config_divergence_lint.py now refuses a non-list shape (boot validation lives in the config/CI layer until the provider-boot module is touched).
allow_insecure_provider_httpper-callbooleanfalse—(PRV-12): explicit ack allowing a NON-loopback http:// provider endpoint (config or a declarative provider’s allow_insecure_provider_http). The default REFUSES plaintext remote endpoints (the provider key would travel in cleartext) and counts provider_plaintext_refused_total; https:// is always accepted (case-insensitive) and loopback http:// needs no ack.
provider_trusted_egress_ackper-callbooleanfalse—: the operator-trusted PROVIDER egress ack. With the ack, declarative registration accepts LOOPBACK endpoints (any scheme — plaintext never leaves the host) and PRIVATE/LAN endpoints over https:// only, stamping trusted_target into the registry POpts so the pipeline pin allows the private/loopback target. Default (and LAN plain-http:// even when acked) REFUSES with ssrf_rejected; webhooks keep the unconditional sol_http_validation SSRF gate.
cluster_trust_cidrsper-callstring[]—: comma-separated IPv4 CIDR allowlist of cluster-local networks (e.g. "10.0.0.0/8,192.168.0.0/16"). A remote provider target whose RESOLVED address falls inside a listed CIDR is pinnable without a per-provider trusted_target stamp — the operator-declared list IS the trust. Default empty: no cluster exemption.
ollama_urlper-callstring"http://localhost:11434"—Ollama API base URL
oauth_redirect_uriper-callstring"http://127.0.0.1:21337/callback"—OAuth redirect URI for the PKCE browser-login flow. Override it when 21337 is taken; only loopback redirect URIs are bindable by the CLI.
oauth_allow_loopback_httpper-callbooleanfalse—: explicit ack permitting http:// OAuth authorize/token URLs ONLY when the host is loopback (a local test IdP). The default refuses with the typed insecure_oauth_url; https:// always goes through the pinned-IP SSRF validator.

Provider pipeline

Timeout keys of the remote-provider request pipeline (sol_pipeline.erl; the total default strictly exceeds first-token + idle):

KeyRestartDefaultDescription
provider_request_timeout_msper-call300000Total budget — armed at the FIRST connect attempt, covers pinning + connect + body
provider_first_token_timeout_msper-call60000Max wait for the first token
provider_idle_timeout_msper-call30000Max inter-token gap (stall detection)
provider_bodyless_200_grace_msper-call500(BVI-052): grace window (ms) for a 200 response that has not produced a first token yet before the pipeline types the terminal empty_response (0 disables the fast-fail and restores the historical first-token-budget wait; clamped 0–10000)
provider_max_retriesper-call2Connect retry budget (exponential backoff + jitter)
provider_stream_flow_window_bytesper-call102400: the streaming flow-control window (gun flow credit trigger; never a truncation point). Minimum 1024.
provider_sse_event_max_bytesper-call1048576: the SSE EVENT cap — the parser-residual bound. Separate from the flow window so one legal >100 KiB event is not fatal; a boundary-less residual that reaches this cap is a typed oversized_sse_event. Minimum 1024.
provider_anthropic_versionper-call2023-06-01: the anthropic-version header value Sol sends on every anthropic-wire request (sol_provider_wire:anthropic_version/0; config-overridable for future Messages-API rollouts)
provider_response_max_bytesper-call1048576Non-streaming response cap (breach → output_exceeded_cap + circuit failure)
provider_tls_cacertsper-callOTP bundled cacertsCA list for TLS provider endpoints (SNI + verify_peer under IP pinning)
provider_gun_up_watchdog_msper-call10000Gun-up watchdog (defaults to 2× the ?CONNECT_TIMEOUT macro)
provider_conn_reuseper-calltrue (shipped sys.config; absent = disabled): per-target idle gun connection reuse. HTTP/1.1 only: a conn is checked out exclusively (no pipelining), liveness-probed before reuse, and checked in ONLY on a clean fully-consumed 2xx terminal; every error/interrupted path closes it. Test VMs leave it off so a mocked gun conn is never pooled
provider_conn_pool_idle_msper-call30000Idle age at which the reaper closes a pooled conn
provider_conn_pool_reap_msper-call5000Reaper sweep cadence
provider_conn_pool_max_idle_per_targetper-call4Idle-conn cap per {transport, host, port, SNI} target (oldest evicted)
provider_conn_pool_max_idleper-call32Total idle-conn cap across targets (the fd bound)

The TCP connect timeout itself is the ?CONNECT_TIMEOUT macro — 5000 ms, not operator-configurable.

Retry taxonomy: a 429/503 at the response head is transient — one bounded retry, then terminal; any other 4xx/5xx is terminal ({http_error, Status} + circuit failure); connect exhaustion is terminal ({connect_exhausted, Host, Port}); TLS handshake/verification failures are permanent, single-attempt. Mid-stream retry never happens. The streaming chunk window (?MAX_BUFFER_BYTES, 102400) is a flow-control trigger — parser residuals are always preserved across chunk boundaries, and overflows are counted (buffer_overflow metric).

Memory, Embedding & Vector Storage

Read consistency: per-key reads read through to PostgreSQL on an ETS miss; the stats/reflections enumeration reads are served by sol_memory_read from the NODE-LOCAL sol_memory ETS read model hydrated from PG. A row written on another cluster node becomes visible after that node re-reads/hydrates, not immediately.

KeyRestartTypeDefaultEnv VarDescription
memory_pg_enabledbootbooleanfalseSOL_MEMORY_PG_ENABLEDPersistent memory via PostgreSQL
memory_pg_urlper-callstring""SOL_MEMORY_PG_URLPostgreSQL connection URL
memory_pg_pool_sizeper-callinteger4SOL_MEMORY_PG_POOL_SIZEGeneral DB connection pool size. Range 1–64
memory_pg_sslper-callbooleanfalseSOL_MEMORY_PG_SSLPG TLS for the memory pool. true requires memory_pg_ca_file; the connection is verify_peer — never blind encrypt. An ssl-without-CA connect refuses loud (typed {refuse_pg_connect, pg_ca_file_required})
memory_pg_ca_fileper-callstring""SOL_MEMORY_PG_CA_FILECA bundle for memory_pg_ssl. Path to the PG server CA certificate; unreadable/absent with ssl on refuses the connection
memory_hydrate_max_entriesper-callinteger100000—(EV-02b): the ETS read-model TOTAL cap — hydration stops at this bound with the truncated datum (hydration_status/0) instead of fighting the owner’s eviction sweep forever
memory_max_entriesper-callinteger100000—(EV-02b): the sol_memory ETS cap. The owner’s sweep evicts the OLDEST rows up to memory_cap_eviction_budget per 60 s pass until the table fits
memory_cap_eviction_budgetper-callinteger5000—(EV-02b): per-sweep eviction budget (rows). A 2×-over table converges in ~10 passes
memory_wal_batch_sizeper-callinteger50—WAL batch size. Range 1–10000
memory_wal_flush_msper-callinteger100—WAL flush interval. Range 100–60000
memory_http_durable_writesper-callbooleanfalse—: HTTP memory writes use the durable ack contract (ok only after the WAL drained / PG committed; an unconfirmed flush answers 503). Default false = cache-durable (RAM-crash-safe; power-loss-durable to the last WAL flush)
task_store_backendper-callenumets—: the task-store behaviour seam selector. ets is the existing ETS+Mnesia adapter (sol_task_store_ets); any other value refuses boot via sol_config:validate_optional/0. The PG backend is a documented follow-on (see server/src/sol_task_store_backend.erl)
pg_query_timeout_msper-callinteger10000SOL_PG_QUERY_TIMEOUT_MSPer-query statement/socket bound; a hung query is killed and its connection culled. Range 100–600000
pg_pool_max_lease_msper-callinteger300000SOL_PG_POOL_MAX_LEASE_MSLast-resort lease-age bound: a lease older than this is reclaimed with a CRITICAL log, its connection culled, and the reconnect ladder armed. Must be greater than pg_query_timeout_ms. Range 1000–3600000
pg_pool_health_reservedper-callinteger1SOL_PG_POOL_HEALTH_RESERVEDReserved health-probe connections, added on top of memory_pg_pool_size and never handed to general callers. Must be less than memory_pg_pool_size (out-of-range values are clamped loudly). 0 = probe through the general pool without queueing. Range 0–63
pg_reconnect_delay_msper-callinteger5000SOL_PG_RECONNECT_DELAY_MSPG reconnect backoff. Range 100–300000
pgvector_enabledper-callbooleanfalseSOL_PGVECTOR_ENABLEDpgvector storage (requires pgvector extension + memory_pg_enabled=true). Opt-in per
pgvector_similarity_thresholdper-callfloat0.75—Cosine similarity cutoff
embedding_enabledper-callbooleanfalse (shipped sys.config; code fallback is conditional — true when memory_pg_enabled=true AND memory_pg_url is set — sol_embedding.erl)—Compute embeddings
embedding_backendper-callatomollama—Embedding backend
embedding_modelper-callstring"nomic-embed-text"—Embedding model id
embedding_urlper-callstring"http://localhost:11434"—Embedding backend URL
embedding_api_keyper-callstringunset—Optional bearer for an authenticated embedding backend (sent as Authorization: Bearer …)
embedding_dimensionper-callinteger768—Embedding vector dimension
memory_decay_enabledper-callbooleanfalse (shipped sys.config; code fallback true — sol_memory_decay_worker.erl)—Exponential memory decay
memory_decay_interval_msper-callinteger3600000—Decay sweep. Range 60000–86400000
memory_forget_thresholdper-callfloat0.1—Weight below which a memory is forgotten
memory_decay_halflife_secondsper-callinteger86400—Decay half-life (24h). Range 3600–2592000
memory_reflection_enabledper-callbooleanfalse—Background reflection/consolidation pass
memory_reflection_interval_msper-callinteger21600000—Reflection sweep (6h). Range 60000–86400000
memory_reflection_cluster_thresholdper-callfloat0.85—Similarity to merge memories
memory_reflection_min_cluster_sizeper-callinteger5—Minimum cluster size before consolidation

Embeddings use the embedding_* family. No memory_embed_model key exists. Related typed-guard keys validated by the optional battery: embed_max_concurrency (range 1–64), embed_max_queue (1–10000).

Scheduler

KeyRestartTypeDefaultEnv VarDescription
max_scheduled_jobsper-callinteger1000—Global maximum scheduled jobs (429 max_jobs_reached on exceed). Range 1–10000
max_scheduled_jobs_per_userper-callinteger100—Per-user quota of active (pending+running) jobs
scheduler_catchup_batch_maxper-callinteger5 (code fallback ?MAX_CATCHUP_RUNS, sol_scheduler.erl)—Max missed jobs dispatched in the boot catch-up burst; the remaining overdue tail is deferred with per-job jitter
scheduler_lease_reaper_interval_msper-callinteger720000 (2× the 360 s stuck-job grace)—Phantom-lease reaper cadence. The scheduler’s running-lease (currently_running) is deliberately not persisted: a node crash mid-run re-dispatches the job only after the boot grace — the documented redispatch window is 360 s. The legacy alias workflow_lease_reaper_interval_ms is read one release for upgrade continuity

Channels

KeyRestartTypeDefaultEnv VarDescription
channel_enabledper-callbooleantrue (dev); false in sys.prod.configSOL_CHANNEL_ENABLEDEnable channel delivery system. The production profile ships the channel plane OFF
channel_rate_limit_msper-callinteger100—Minimum interval between messages (ms)
channel_reply_routingper-callon | broadcaston—: task-reply routing. on addresses the originating chat (send_to) for tasks dispatched from a channel; broadcast is the rollback posture.
channel_origin_maxper-callinteger1024—(CON-12): hard cap on live channel-origin rows. Expired rows prune first; at the cap the oldest LIVE origins are replaced by same-store tombstones and counted (channel_origin_pruned_total), and their eventual terminal is a counted drop (channel_reply_dropped_total) — never a silent “not a channel task”.
channel_origin_ttl_msper-callintegermax(3600000, task_timeout_ms + 3600000); 86400000 when task_timeout_ms=0—(CON-12): channel-origin retention. Rows past the monotonic deadline are pruned and counted (channel_origin_expired_total). The task deadline is progress-renewed, so a channel task that stays live past this window is pruned and its eventual reply is a counted drop; raise this for tasks that can exceed it.

Plugins

KeyRestartTypeDefaultEnv VarDescription
plugin_user_dirper-callstring""SOL_PLUGIN_USER_DIRUser plugin directory. Empty = ~/.sol/plugins/
plugin_config_pathper-callstring""SOL_PLUGIN_CONFIG_PATHPath to plugins.json
plugin_user_dir_load_ackper-callbooleanfalseSOL_PLUGIN_USER_DIR_LOAD_ACKExplicit operator consent for UNPINNED ~/.sol/plugins plugins. Without a sha256 pin or this ack, user-dir plugins REFUSE to load — and a pin mismatch refuses the boot
plugin_env_allowlistper-callstring listbundled channel varsSOL_PLUGIN_ENV_ALLOWLISTThe ONLY env vars plugin config ${VAR} expansion may interpolate; non-allowlisted names expand to empty, never the host environment
plugin_tls_verifyper-callbooleantrue (shipped sys.config; code fallback verify_peer — sol_plugin_bridge_http.erl/sol_oauth_store.erl)—Verify TLS on plugin fetches
plugin_max_reductionsper-callinteger5000000—Luerl VM reduction budget per plugin call (range 1000–2000000000)
plugin_max_heap_mbper-callinteger256—Heap budget (MB) for every plugin runner — allocation bombs are killed ({error, heap_budget_exceeded}, metric plugin_heap_killed_total)
plugin_max_binary_mbper-callinteger256—Referenced-binary byte budget (MB) per plugin runner: Lua strings are refc binaries OUTSIDE the heap cap, so the watchdog also polls process_info(Pid, binary) and kills at this cap ({error, binary_budget_exceeded}, metric plugin_binary_killed_total)
plugin_budget_poll_msper-callinteger100—Watchdog poll interval (ms) for the plugin heap/binary/reduction budgets. Lower polls kill allocation bombs sooner at a small scheduling cost
plugin_lifecycle_timeout_msper-callinteger3000—Wall-clock budget for lifecycle/poll/on_event calls
plugin_max_result_bytesper-callinteger1048576—Wire result cap for plugin tool calls (result_too_large beyond; sol_zmq_protocol.erl)
plugin_max_event_typesper-callinteger1024—Bounded sol.events.emit atom admission
plugin_max_queue_lenper-callinteger32—Per-plugin FIFO cap
plugin_http_max_bodyper-callinteger5242880—sol.http response body cap (5 MB; {error, body_too_large} beyond)

Deleted key: plugin_system_dir (env-rendered) had no reader anywhere — system plugins are the bundled priv/plugins root and the user root is plugin_user_dir; the inert render was deleted rather than turned into an auto-loaded system trust root.

Skills

KeyRestartTypeDefaultEnv VarDescription
skill_body_max_bytesper-callinteger262144—ONE cap for skill bodies across the registry push (skill_sync v2), the marketplace publish path and the install endpoint. Register/publish over the cap answer the typed body_too_large (HTTP 413 at the API boundary); a value ≤ 0 or non-integer degrades to the default. Luna enforces the same default locally (LUNA_SKILL_BODY_MAX_BYTES overrides)

Lua Workers

KeyRestartTypeDefaultEnv VarDescription
lua_eval_timeoutper-callinteger30000 (dev); 5000 in sys.prod.config—Lua eval timeout in milliseconds. Range 1000–60000. The production profile tightens it 6×. Code fallback 10000 (sol_lua_worker.erl ?DEFAULT_EVAL_TIMEOUT)
lua_eval_max_lenper-callinteger4096—Max Lua eval input length in bytes
lua_default_scriptper-callstring— (undefined)—Default Lua script for workers
lua_script_dirper-callstring""—Directory for Lua script files

Process Management

KeyRestartTypeDefaultEnv VarDescription
exec_userbootstringnobodySOL_EXEC_USERDowngrade to this OS user for spawned processes
latency_validateper-callbooleantrue—Validate latency histogram entries
max_active_requestsper-callinteger100 (shipped sys.config); 1000 in sys.prod.config (10× dev; code fallback 32 — sol_inference.erl ?MAX_ACTIVE_REQUESTS)—Per-model concurrent inference requests admitted by the model gen_statem (llama-server --parallel slots are separate — emitted only when a model config carries it). Draining on stop refuses admission until in-flight requests finish or scale_down_grace_ms elapses. Validated range 1–10000
max_active_requests_per_principalper-callintegerhalf max_active_requests, clamped to it—: per-principal fair share of admitted requests (sol_inference_admission). Over-share requests get the typed 429 inference_budget_exceeded carrying the owner principal; reserved system/internal callers are exempt from the share but still count against the global cap
metrics_max_entriesper-callinteger10000—Max entries in latency histogram

Workflow Engine

KeyRestartTypeDefaultEnv VarDescription
workflow_max_parallel_stepsper-callinteger8 (shipped sys.config; code fallback 4 — sol_workflow.erl/sol_workflow_instance.erl)—Max parallel steps in a workflow. Range 1–100
workflow_timeout_msper-callinteger3600000 (shipped sys.config; code fallback 3600000 — sol_workflow_instance.erl; sys.prod.config OMITS the key, so prod runs 3600000; valid range 10000–86400000)—Workflow hard timeout. corrected the pre-fix dev 300000 (a dev-only override that silently diverged from prod)
workflow_bridge_enabledper-callbooleantrue—Workflow→worker bridge: subscribes to task.* from the durable sync store and dispatches prompt steps. The sol_workflow_bridge_installed gauge is absent when disabled
workflow_bridge_dispatch_timeoutper-callinteger30000—Bridge dispatch timeout in milliseconds. Range 1000–300000
workflow_user_dirper-callstring""—User workflow definition directory

Events, Backpressure & Archival

KeyRestartTypeDefaultEnv VarDescription
event_worker_poolper-callinteger32 (code fallback ?DEFAULT_EVENT_WORKER_POOL, sol_sync_event.erl)—Bounded concurrent event workers; overflow queues (FIFO)
event_queue_limitper-callinteger10000 (code fallback, sol_sync_event.erl)—Core-event queue cap; exceed → callers get {error, overloaded} (telemetry-class events shed with slo_event_loss_total instead)
event_append_deadline_msper-callinteger30000 (code fallback ?APPEND_DEADLINE_MS)—(EV-25): per-lane append watchdog — a worker whose Mnesia append exceeds this deadline is KILLED (sync_event_append_deadline_killed_total) and its event sheds through the durable funnel
projector_deadline_msper-callinteger30000 (code fallback ?PROJECTOR_DEADLINE_MS, sol_sync_event.erl)—Per-projector watchdog; a hung projector is killed at the deadline (projection_hung_killed_total)
projector_deadline_total_msper-callinteger40000 (clamped to ≤ 40000, below the 45 s run/2 call budget)—Aggregate projector budget per emitted event; projectors run sequentially under min(per-projector deadline, remaining total) and the remainder is skipped on exhaustion
event_retention_daysper-callinteger7 (shipped sys.config; code fallback is 30)—sync_event retention before compaction. Range 1–365
telemetry_retention_daysper-callinteger7 (code fallback ?DEFAULT_TELEMETRY_RETENTION_DAYS, sol_event_compactor.erl)—telemetry_event retention (hourly compaction pass)
event_compaction_enabledper-callbooleantrue—Compact the event store
event_retention_max_rowsper-callinteger1000000—Retained-event volume budget in rows. The compactor ENFORCES it: when the log exceeds the budget, the oldest rows join the terminality-aware reap (bounded per pass); the sweep-end gauge sync_event_retained_bytes_estimate and event_retention_over_budget_total report the residual
event_retention_per_aggregate_capper-callinteger10000 (code fallback ?DEFAULT_EVENT_RETENTION_PER_AGGREGATE_CAP)—: per-aggregate hard cap — a never-terminating aggregate keeps at most this many events (the overflow is compacted and counted event_retention_cap_forced_total)
staging_backlog_max_eventsper-callinteger20000 (code fallback ?DEFAULT_STAGING_BACKLOG_MAX_EVENTS)—: staging backlog cap; a write that would exceed it is refused (events stay in Mnesia) and staging_backlog_cap_total is counted
compaction_terminality_checkper-callbooleantrue (code fallback, sol_event_compactor.erl)—Terminality-aware paired sweep: an expired event is retained while its aggregate’s projection view row is non-terminal or fresher than the retention cutoff. false restores the timestamp-only retention match spec (rollback lever)
event_compaction_interval_msper-callinteger3600000—Compaction sweep. Range 60000–86400000
event_lane_spill_windowper-callinteger0 (code fallback, sol_sync_event.erl)—Lane-queue spill window: an admitted event that must wait in a lane queue past this in-RAM depth is appended to the durable spill segment (<mnesia dir>/event_lane_spill/lane_spill.log) before enqueue and replayed on boot. 0 = every queued event spills (no RAM-only pre-durability window)
event_lane_spill_compact_bytesper-callinteger1048576 (code fallback, sol_sync_event.erl)—: spill-segment byte trigger for the atomic rewrite-to-outstanding compaction (outbox-journal discipline). The segment stays ~O(outstanding) under a sustained backlog instead of growing with every retire marker; a failure leaves the segment intact and retries at most once per second. Gauge: event_lane_spill_bytes.
event_lane_spill_sync_msper-callinteger1000 (code fallback, sol_sync_event.erl)—: bounded-interval fsync of the spill segment while appended bytes are outstanding — the power-loss window is the interval, not the whole outstanding lifetime. The timer is only armed while dirty.
sol_events_mailbox_maxper-callinteger10000 (code fallback, sol_events.erl)—: gen_event manager mailbox bound. At/over the bound a store-routed event goes to the durable shed journal and any other event is dropped with events_mailbox_dropped_total; gauge events_mailbox_len.
sync_event_shed_mailbox_maxper-callinteger10000 (code fallback, sol_sync_event_shed.erl)—: bound on the supervised shed-worker queue (store-down/over-bound shed records). A drop at the cap is counted sync_event_shed_mailbox_dropped_total; the journal itself is separately byte-capped.
log_metadataper-callbooleantrue (shipped sys.config/sys.prod.config; code fallback in sol_log_middleware.erl)—Append request/task correlation ids to the default logger template. false restores the stock OTP template for log parsers that cannot tolerate the suffix; process metadata itself stays attached either way
event_archive_before_compactionbootbooleantrue—Archive events before compacting
archive_enabledper-callbooltrue—Enable event archival to Mango PostgreSQL. Single canonical resolver: sol_event_compactor:archive_enabled/0
event_archive_http_requestsper-callbooleanfalse—: archive generic-dispatch http_request rows. Off by default — request rows track Sol’s request rate into Mango write load; metrics + request logs already cover them
archive_mango_urlper-callstring"http://127.0.0.1:5800" (shipped; code fallback unset)—Mango service URL for archival. : loopback http:// is the dev posture; a NON-LOOPBACK plaintext http:// target is REFUSED at boot AND at flush time (the audit stream + HMAC over a plaintext hop). Remote archive transport requires https:// (+ mango_ca_file for a private CA). Operator precondition: a live deployment whose archive_mango_url points at a remote plaintext URL must be updated to https before/with this release (the boot refusal is explicit, never silent; an operator-disabled archive — archive_enabled=false — is exempt).
bg_task_ttl_msper-callinteger86400000—Background-task record TTL. Range 60000–604800000
shutdown_drain_timeout_msper-callinteger5000SOL_SHUTDOWN_DRAIN_MSHTTP-request drain budget. Must be ≤ the container stop grace (podman ~10s / runit ~7s; see production-runbook.md “Shutdown budget”) — ci/shutdown_budget_lint.py pins the shipped configs to ≤5000. The pre-fix default (30000) exceeded the grace, so the drain never completed before SIGKILL. Range 1000–300000

Compaction durability: compaction no longer deletes before the archive confirms. The full compacted events are staged to a durable file (sol_event_compactor_staging.dump under the Mnesia dir, temp+rename) first; deletion happens only when a durable copy exists (the archive ack or the staging file itself). A restart mid-compaction re-archives any unacknowledged staging file on boot (compaction_skipped_total counts cycles where no durable copy could be staged).

Chat History

KeyRestartTypeDefaultEnv VarDescription
chat_checkpoint_tokensper-callinteger64 (code fallback ?DEFAULT_CHECKPOINT_TOKENS, sol_chat_history.erl)—Persist the streamed buffer every N tokens (crash loses ≤ 1 window)
chat_checkpoint_msper-callinteger2000 (code fallback ?DEFAULT_CHECKPOINT_MS)—…or every T ms, whichever comes first

Infrastructure & Observability

KeyRestartTypeDefaultEnv VarDescription
prometheus_enabledper-callbooleantrue—Enable Prometheus /metrics endpoint
grafana_urlper-callstring— (undefined)—Grafana URL for infra status page link

ACP (Agent Control Protocol — opt-in)

Source: sol_acp_listener.erl, sol_acp_session.erl, env mappings in sol_app.erl. No auth middleware in front of this listener — keep disabled unless HMAC is configured.

KeyRestartTypeDefaultEnv VarDescription
acp_enabledbootboolean— (unset → false)SOL_ACP_ENABLEDRaw-TCP ACP listener
acp_listener_portper-callinteger— (unset; code fallback 9120)SOL_ACP_LISTENER_PORTACP port. Range 1024–65535
acp_listener_ipper-callstring (parsed IP)— (unset → {127,0,0,1})SOL_ACP_LISTENER_IPACP bind IP. A non-loopback bind refuses boot without SOL_ACP_LISTENER_PLAINTEXT_ACK=true
acp_shared_secretper-callstring— (unset → <<>>; listener refuses to enable with a too-short secret)SOL_ACP_SHARED_SECRETHMAC secret for ACP messages
acp_session_timeoutper-callinteger (seconds)300 (code fallback ?SESSION_TIMEOUT, sol_acp_session.erl)SOL_ACP_SESSION_TIMEOUTACP session timeout. Range 10–3600
acp_request_wait_timeout_msper-callinteger30000—(SC-03): how long the synchronous HTTP ACP arm waits for the reply frame before answering a typed 504 (acp_reply_timeout); the registry entry is consumed by its own timer, so a late reply can still land.
acp_packet_sizeper-callinteger1048576 (clamped at 16777216 at listener boot)SOL_ACP_PACKET_SIZEACP frame-size cap; oversized declared lengths are refused in the driver before allocation. Range 1024–16777216
acp_listener_plaintext_ackper-callbooleanfalseSOL_ACP_LISTENER_PLAINTEXT_ACKExplicit acknowledgement that the ACP plane (HMAC-only raw TCP) may bind non-loopback
acp_replay_maxper-callinteger65536SOL_ACP_REPLAY_MAXGlobal replay digest cache LRU cap (oldest-evicted). Range 16–1048576
acp_replay_scopeper-callstring (global | peer)globalSOL_ACP_REPLAY_SCOPEReplay cache scope. peer is the one-window rollback lever (cross-connection replay NOT refused; CRITICAL boot banner)
acp_key_idper-callbinary<<"default">>— (sys.config only)Key identity bound to TCP-leg capability registrations; flipping it between connections is a key rotation — a mismatched key for a taken AgentId is refused
acp_shared_secretsper-callmap#{}— (sys.config only): named ACP HMAC secrets #{KeyId => Secret} (≥16 bytes each). The verified key id is bound to the peer on capability registration; a different key for a taken AgentId, or the same key from a different peer address, is refused
acp_max_sessionsper-callinteger500— (sys.config only): the ACP session-table ceiling. Sessions are created only after a frame authenticates (unauthenticated connects never allocate)
acp_max_sessions_per_ipper-callinteger50— (sys.config only): per-IP fairness cap on ACP sessions (one peer cannot occupy the whole table)

Seats & Licensing

KeyRestartTypeDefaultEnv VarDescription
seats_enabledper-callboolfalseSOL_SEATS_ENABLEDMaster switch; off = checks pass, Community defaults. Off in production until the release gate. See seats.md
license_fileper-callstring—SOL_LICENSE_FILECLF v1 license file path (cold start / air-gap)
license_pubkeyper-callstring—SOL_LICENSE_PUBKEYPEM ed25519 pubkey for CLF signature verification (empty = trusted config in dev)
seats_urlper-callstring—SOL_SEATS_URLControl-plane seat endpoint (ZERGBASE panel /api/seats). https:// required under enforcement — http:// is refused at boot; since then (LIFE-19) that refusal is a typed PRE-SUP violation ({forbidden_http_seats_url, Url} → invalid_config), so the license child never raises
seats_tokenper-callstring—SOL_SEATS_TOKENBearer token for the seat endpoint
seats_signing_keyper-callstring—SOL_SEATS_SIGNING_KEYHMAC-SHA256 key for /api/seats signatures — required when seats_url is set
seats_url_allow_httpper-callboolfalseSOL_SEATS_URL_ALLOW_HTTPTest-only loopback override of the http:// refusal. NEVER in production
seats_refresh_msper-callinteger30000SOL_SEATS_REFRESH_MSSeat refresh interval (bounds 5000–86400000)
seat_cluster_occupancy_ttl_msper-callinteger2000—(BVI-014): TTL (ms) of the cached cluster-occupancy verdict after a degraded peer read (range 1000–5000, outside → 2000). A flapping peer cannot mint one spawn per dispatch inside the TTL.
seat_cluster_occupancy_bound_msper-callinteger1500—(BVI-014): bound (ms) on one cluster-occupancy peer read before the verdict degrades to this node’s live count (range 100–5000, outside → 1500).

Managed Settings — the admin fleet-push plane

Admin-only (PUT /api/v1/managed-settings) fleet settings that every Luna worker applies. The key set is CLOSED by the shared fixture docs/fixtures/managed_settings_schema.json — consumed by Sol’s PUT validator (sol_managed_settings_schema), Luna’s applier (client/core/managed_config.lua M.SCHEMA), the Limon form, and ci/managed_settings_schema_lint.py. This is the highest-precedence plane (see Managed-settings precedence).

KeyTypeBoundsLuna target (consumer)
execution.policyenumstrict | standard | permissiveexecution.policy (core.command_policy PROFILES)
execution.max_iterationsinteger1–200max_iterations (core.agent)
execution.session_budget_usdnumber0–1000000session_budget_usd (core.agent_budget; 0 = unlimited)
  • PUT refusals are TYPED: 400 unknown_setting_key (message lists the nearest known keys), 400 setting_out_of_bounds, 400 setting_type_mismatch. Refusals never persist, audit or publish.
  • GET /api/v1/managed-settings answers {ok, data, schema}; the server-injected data._schema_rev is metadata (never persisted) and a worker running an older schema rev SKIPS the payload loudly (upgrade Luna) rather than applying a partial contract.
  • Stored keys written before the schema existed (theme, arbitrary maps) remain in the snapshot but are IGNORED by Luna (loud skip + counter) and rendered read-only by the console — no free-text JSON editing.
  • Sol-side runtime consumers: honestly NONE today. The plane’s contract is fleet-push-to-Luna; the Sol managed_settings store is read only by this API. Wire: PUT → PUB managed_settings_update → Luna bounded refetch (≥5 s between fetches, cache preserved on failure).

Advanced & Regeneration Tuning Keys

These keys are read directly from the sol application env (config file, or the env mapping named below) and were previously discoverable only by reading source (E-4). Defaults are the code fallbacks; a shipped sys.config/sys.prod.config value wins when set. Keys whose default is shown as — (unset) are optional overrides.

ZMQ transport & bridge

KeyRestartTypeDefaultEnv VarDescription
zmq_frame_macper-callenumrequired—Worker-plane frame MAC posture: required / prefer / off. required refuses unsigned frames.
zmq_frame_mac_legacyper-callbooleanfalse—Legacy-window acceptance for v1 (Z1, tx-less) MACs during the material-v2 cutover.
zmq_frame_mac_d1542_legacyper-callbooleanfalse—Type-scoped straggler window for cancel_task/plugin_tool_call frames from previous workers.
zmq_enrollment_allow_invalidper-callbooleanfalse—Test-only escape hatch: admit syntactically invalid enrollment records (never set in production).
zmq_enrollment_ctr_requiredper-callbooleantrue—Require the monotonic ready-counter in the registration material.
zmq_frame_mac_rollback_ackper-callbooleanfalseSOL_ZMQ_FRAME_MAC_ROLLBACK_ACK: acknowledge a zmq_frame_mac value other than required. Without this the boot REFUSES (unsigned frames accepted).
zmq_frame_mac_legacy_ackper-callbooleanfalseSOL_ZMQ_FRAME_MAC_LEGACY_ACK: acknowledge zmq_frame_mac_legacy=true (tx-less MAC material accepted). Without this the boot REFUSES.
zmq_frame_mac_d1542_legacy_ackper-callbooleanfalseSOL_ZMQ_FRAME_MAC_D1542_LEGACY_ACK: acknowledge zmq_frame_mac_d1542_legacy=true (unsigned cancel_task/plugin_tool_call accepted). Without this the boot REFUSES.
zmq_enrollment_ctr_required_ackper-callbooleanfalseSOL_ZMQ_ENROLLMENT_CTR_REQUIRED_ACK: acknowledge zmq_enrollment_ctr_required=false (nonce-only replay bound). Without this the boot REFUSES.
zmq_ownership_enforced_ackper-callbooleanfalseSOL_ZMQ_OWNERSHIP_ENFORCED_ACK: acknowledge zmq_ownership_enforced=false (executor-ownership gates off). Without this the boot REFUSES.
zmq_bridge_allow_unsignedper-callbooleanfalse—Mango bridge: accept unsigned inbound frames (fail-closed default; the bridge refuses to boot without a secret).
zmq_bridge_ts_window_msper-callinteger120000—Mango bridge HMAC timestamp freshness window (ms).
zmq_mango_recv_watchdog_msper-callinteger30000—Mango bridge receive-watchdog bound: a silent SUB pipe reconnects after this.
zmq_mango_resync_msper-callinteger60000—Mango revocation-resync interval during normal operation (ms).
zmq_mango_sub_rcvhwmper-callinteger5000—Mango bridge SUB socket receive high-water mark.
zmq_pub_lingerper-callinteger1000—PUB socket linger (ms) at close.
zmq_pub_sndhwmper-callinteger5000—PUB socket send high-water mark.
zmq_pub_sndtimeo_msper-callinteger5000—PUB send timeout (ms) — chumak has no SNDTIMEO, the send bound is enforced at the call site.
zmq_router_rcvhwmper-callinteger10000—ROUTER socket receive high-water mark.
zmq_router_sndhwmper-callinteger10000—ROUTER socket send high-water mark.
zmq_sender_outbound_boundper-callinteger512—Per-identity outbound frame bound per 60s window (control lane keeps a +64 reserve); drops are counted loudly.
zmq_cancel_tombstone_ttl_msper-callinteger300000—Recent-cancel tombstone TTL (ms) — dedupes duplicate cancel deliveries.
zmq_ready_ctr_max_age_msper-callinteger600000—Ready-counter freshness bound (ms) — a counter older than this cannot admit a reconnect.
zmq_recv_watchdog_msper-callinteger30000—Gateway receive-watchdog bound (ms) — a silent ROUTER pipe forces a reconnect.
zmq_replay_fence_fileper-callstring— (unset)—Path of the durable replay-fence state file; unset uses the anchored data dir.
zmq_replay_fence_journal_fileper-callstring— (unset)—Path of the durable replay-fence append journal; unset derives it from the snapshot path.
zmq_bridge_nonce_journal_fileper-callstring— (unset)—Path of the durable Mango bridge nonce journal; unset uses the anchored data dir.
zmq_fallback_max_rearmsper-callinteger10—HTTP streaming ZMQ-fallback re-arm bound per stream.
zmq_control_journal_ttl_msper-callinteger21600000— (sys.config only): TTL (ms; 6h) for a journaled control frame (cancel/spawn_ack) targeting an unreachable identity; older records are no longer replayed.
zmq_control_replay_attempt_capper-callinteger8— (sys.config only): replay-attempt cap for a live journaled control frame; at the cap the record is retired (the outstanding-control gauge drains).
zmq_egress_quarantine_msper-callinteger5000— (sys.config only): how long a task whose egress repeatedly fails is quarantined before the recovery lane retries it (ms).
zmq_preauth_global_known_limitper-callinteger2000— (sys.config only)(ADV-A-02): global 60s ceiling for unregistered-frame replies from KNOWN (previously registered) delivering pipes; distinct from zmq_preauth_global_limit (unknown pipes).
zmq_replay_tx_max_future_msper-callinteger120000— (sys.config only): future-tx tolerance (ms) — a frame tx more than this ahead of the Sol wall clock is refused as skew (never silently stamped).
zmq_transport_retry_backoff_msper-callinteger300— (sys.config only): base retry backoff (ms) for a failed egress send; values below 250 fall back to 300.
zmq_transport_retry_capper-callinteger8— (sys.config only): consecutive transport retry attempts before the task is quarantined for zmq_egress_quarantine_ms.

Events & archive

KeyRestartTypeDefaultEnv VarDescription
event_lane_countbootinteger8—Number of per-aggregate event sequencer lanes; frozen at boot (sol_sync_event:init/1).
event_payload_max_bytesper-callinteger1048576—Maximum encoded event payload size (bytes); larger payloads are refused at admission.
event_replay_on_bootbootbooleantrue—Replay the durable event store into projections at boot.
event_replay_disabled_ackbootbooleanfalse—Explicit degraded-posture ack for event_replay_on_boot=false: unset refuses boot (the RAM views would be empty); true proceeds unproven with /ready 503 and event retention refused until a successful replay.
replay_all_max_eventsper-callinteger50000—Cap for the paged sol_sync_event:replay_all/1 projector walk; the walk stops page-aligned and counts replay_all_truncated_total.
projection_outbox_max_rowsper-callinteger10000—Projection outbox row cap; a NEW owed row past the cap is quarantined (projection_outbox_quarantined_total), refreshes always allowed.
event_forwarder_rearm_msper-callinteger60000—Cadence (ms) of the durable lane’s store-forwarder re-arm/gauge refresh after an N-strike handler removal.
schema_quarantine_max_eventsper-callinteger50000—Cap for the durable archive schema-quarantine dead-letter; a 4xx page is accounted there and the drain advances.
event_compaction_budget_msper-callinteger15000—Per-compaction-cycle wall-clock budget (ms). Code fallback 15000 — sol_event_compactor.erl ?COMPACT_BUDGET_MS.
event_seq_cleanup_thresholdper-callinteger100000—Compacted-sequence rows retained before the seq table cleanup runs.
event_router_subscribe_retry_msper-callinteger5000—Event-router subscription retry cadence (ms) when the store is not yet up.
staging_recover_max_chunksper-callinteger64—Maximum staged WAL chunks recovered per boot pass.
archive_ack_drain_budget_msper-callinteger10000—Mango archive-ack drain budget per cycle (ms).
archive_ack_max_passesper-callinteger64—Maximum ack-drain passes per archive cycle.
archive_mailbox_maxper-callinteger5000—Live-archive gen_server mailbox bound; live metadata casts are refused (counted) at/over this depth while a slow archive holds the flush.
archive_gen_server_mailbox_boundper-callinteger1200—(EV-09): the archive gen_server’s OWN mailbox bound (above the 1000 queue + 100 batch so a legitimate burst still exercises the queue overflow). At/over it the incoming cast is dropped loudly (event_archive_mailbox_dropped_total; the Mnesia row + staging retain the event).
archive_overflow_log_interval_msper-callinteger60000—Minimum interval between live-archive queue-overflow warnings (the drop counter still counts every refused event).
subscriber_queue_limitper-callinteger256—Per-subscriber bounded event queue depth (overflow is shed + counted).
max_subscriptions_per_processper-callinteger16—SSE/event subscriptions admitted per process (per-process cap).
sync_event_async_mailbox_maxper-callinteger10000—Async event-forwarder mailbox bound before shedding.
sync_event_shed_journal_max_bytesper-callinteger4194304—Durable shed-journal segment bound (bytes).
telemetry_archive_enabledper-callbooleantrue—Persist telemetry events into the ETS telemetry store + archive leg.
metrics_persist_dirper-callstring— (unset)—Metrics-counter dump directory override; unset uses the anchored data dir.
path_latency_max_pathsper-callinteger64—Maximum distinct paths tracked by the latency histogram owner.
goal_projector_sub_retry_msper-callinteger1000—Goal projector subscription retry cadence (ms).
goal_catchup_max_eventsper-callinteger1000—Max workflow events replayed per goal catch-up window.
goal_projector_sub_retry_maxper-callinteger10—Goal projector subscription retry attempts before giving up loudly.
goal_retention_msper-callinteger2592000000—Terminal-goal retention window (ms; 30 days).
bridge_correlation_ttl_msper-callinteger300000—Workflow-bridge correlation entry TTL (ms).

Task store & idempotency

KeyRestartTypeDefaultEnv VarDescription
idempotency_window_msper-callinteger86400000—Idempotency discard-table window (ms; 24h) — duplicate task ids inside the window replay the stored verdict.
idempotency_max_rows_per_userper-callinteger1024—(BVI-013): per-user cap on live idempotency claims; an insert over it is refused typed ({over, per_user}) and the caller gets a 429. Non-positive values fall back to 1024.
idempotency_max_rows_globalper-callinteger100000—(BVI-013): fleet-wide cap on the idempotency table; an insert over it is refused typed ({over, global}) and the caller gets a 429. Non-positive values fall back to 100000.
task_idempotency_sweep_budgetper-callinteger2000—(BVI-013): rows deleted per paged idempotency-sweep pass (range 1–20000, outside → 2000). The sweep runs in a spawned worker, never inside the store writer.
task_store_terminal_mnesia_bound_msper-callinteger5000—(BVI-012): production-sized bound (ms) for the terminal durable write + failure-readback leg (range 1000–12000, outside → 5000). The 1s task_store_mnesia_bound_ms stays the liveness seam for probes/reads; the terminal leg needs the larger dump-tolerant window.
task_ttl_msper-callinteger3600000—Task-store row TTL (ms) for non-terminal rows swept by retention.
task_result_retention_msper-callinteger604800000—Terminal task-result retention window (ms; 7 days).
task_retention_sweep_budget_msper-callinteger400—Retention-sweep pass budget (ms) — a pass yields and resumes next tick.
task_store_mnesia_bound_msper-callinteger1000—Per-operation Mnesia bound (ms) before the ETS fallback verdict is used.
task_store_terminal_marker_pages_per_passper-callinteger8—: per-reconcile-pass page budget for the continuation-threaded needs_reconcile terminal-marker walk (500 markers per page). A deferred tail is counted task_store_terminal_marker_walk_deferred_total and resumes next pass.
task_store_terminal_marker_walk_bound_msper-callinteger10000—: bound (ms) on one marker-walk activity (the mnesia select continuation must stay inside the activity that created it, so the walk owns a longer explicit bound than the store’s default 1s).
outbox_journal_compact_bytesper-callinteger8388608—Dispatch-outbox journal size (bytes) above which the clear chokepoint atomically rewrites it to the outstanding receipt set.
zmq_store_mailbox_shed_thresholdper-callinteger5000— (sys.config only): task-store mailbox depth at which new writes are shed (counted) instead of deepening the mailbox; 0 disables the shed latch.
zmq_store_shed_after_msper-callinteger5000— (sys.config only): age (ms) after which a latched mailbox-shed posture is cleared/re-probed.
outbox_journal_compact_min_interval_msper-callinteger60000—Minimum interval (ms) between outbox journal compactions.

Chat history

KeyRestartTypeDefaultEnv VarDescription
chat_seq_backfill_budgetper-callinteger50000—Chat-history seq backfill batch budget per pass.
chat_session_boot_restore_capbootinteger2000—Maximum chat sessions re-hydrated from disk at boot (sol_chat_sessions_owner:init/1 restore).
chat_session_retention_daysper-callinteger30—Chat-session metadata retention window (days; the message store keeps its own retention).

Workflow engine

KeyRestartTypeDefaultEnv VarDescription
workflow_recovery_enabledbootbooleantrue—Run boot recovery (compensation of crashed instances) for the workflow engine.
workflow_boot_recovery_grace_msper-callinteger60000—Boot-recovery grace before an instance is considered crashed (ms).
workflow_boot_rescan_margin_msper-callinteger1000—: extra margin before the post-boot stale-row rescan (ms); keeps the rescan outside the crash-recovery grace window.
workflow_force_resume_stale_msper-callinteger60000—: a recovered instance whose last progress is older than this is force-resumed by the recovery pass (ms).
workflow_legacy_unscoped_completionper-callbooleanfalse—migration window: accept unscoped/first-attempt workflow completions from pre-marker producers. Default false (fail-closed); remove after the migration window.
workflow_recovery_compensation_budget_msper-callinteger30000—Per-instance boot-compensation budget (ms).
workflow_recovery_max_compensationsper-callinteger100—Maximum instances compensated per boot-recovery pass.
workflow_compensation_timeout_msper-callinteger65000—Compensation step timeout (ms). Code floor 65000 = the 60000 ms worker kill ceiling + 5000 ms margin (sol_workflow_instance.erl ?COMP_KILL_CEILING_MS + ?COMP_WINDOW_MARGIN_MS); values below the floor are clamped UP and warned once per boot — the pre-fix doc’s 60000 was not settable.
workflow_inline_compensation_timeout_msper-callinteger60000—Inline-compensation kill ceiling (ms) — must stay under the instance kill window.
workflow_revocation_mark_window_msper-callintegercompensation window + 5000—(WSC-14): bounded post-cancel revocation-marker fallback window (ms; default derives from workflow_compensation_timeout_ms). Values ≤5000 fall back to the derived default — the old fixed 5s window could not outlive a slow unwind.
workflow_budget_auto_stop_msper-callinteger86400000—Wall-clock budget after which a running workflow auto-stops (ms; 24h).
workflow_state_retention_msper-callinteger2592000000—Terminal workflow-state retention window (ms; 30 days).
workflow_decomp_definition_capper-callinteger5000—Decomposition-definition registry row cap.
workflow_decomp_definition_ttl_msper-callinteger3600000—Decomposition-definition registry row TTL (ms).
workflow_decomp_definition_durable_ttl_msper-callinteger2678400000—: durable decomp-* definition retention (ms; default 31 days — one day past the terminal workflow-state retention so a resumable row never outlives its definition). The ETS cache TTL/cap never shortens it.
workflow_max_active_per_userper-callinteger500—: live workflow-instance admission cap per principal (0 disables the axis); refusal is {workflow_limit_reached, {principal, Cap}} → HTTP 429 + workflow_admission_refused_total.
workflow_max_activeper-callinteger5000—: live workflow-instance admission cap for the whole node (0 disables the axis); refusal is {workflow_limit_reached, {global, Cap}} → HTTP 429.
workflow_store_resub_msper-callinteger1000—Workflow-store resubscribe retry cadence (ms).
workflow_store_resub_maxper-callinteger10—Workflow-store resubscribe attempts before the instance is marked crashed_unrecovered.
workflow_lease_reaper_interval_msper-callinteger720000—LEGACY ALIAS of scheduler_lease_reaper_interval_ms. The effective default is 2 *?STUCK_JOB_GRACE_MS = 2 × 360000 = 720000 ms (sol_scheduler:stuck_grace_ms/0, which is itself max(?STUCK_JOB_GRACE_MS, plugin_execute_timeout_ms + slack + plugin dwell) = 360000 at the shipped plugin budget); the alias is nested inside the scheduler key read, so the scheduler key wins when both are set.
instance_cleanup_ttl_msper-callinteger600000—Terminal workflow-instance in-memory record TTL (ms) before GC.

Scheduler

KeyRestartTypeDefaultEnv VarDescription
scheduler_store_debounce_msper-callinteger2000—Scheduler store persistence debounce (ms) for bulk edits.
scheduler_journal_compact_bytesper-callinteger262144—: appended-byte threshold that arms the scheduler journal’s compaction tick. Claims append one fsynced frame (O(1) in job count); crossing the threshold schedules the whole-table snapshot compaction on the store’s idle tick (never on the claim call). flush/0 always compacts synchronously under the shutdown bound.
scheduler_mirror_claimsper-callbooleanfalse—Mirror single-writer job claims across the cluster.
scheduler_await_ceiling_msper-callinteger0 (derive: task_max_lifetime_ms + 120 s)—Ceiling (ms) for the scheduler’s bounded wait-for-terminal loop around dispatched tasks; an exhausted await is the typed dispatch_timeout class (no job-error increment). 0 derives the ceiling; an explicit override is floored at 300000.
max_stored_jobsper-callinteger10000— (sys.config only): cap on persisted scheduler jobs (active + retained terminal rows); a create over the cap answers the typed cap verdict instead of growing the store.
scheduler_terminal_retention_msper-callinteger604800000— (sys.config only): terminal scheduler-job retention window (ms; 7 days) before the sweep removes the row.

Plugins

KeyRestartTypeDefaultEnv VarDescription
plugin_execute_timeout_msper-callinteger60000—Per plugin tool-execution timeout (ms).
plugin_lifecycle_wall_clock_msper-callinteger30000—Plugin lifecycle-call wall-clock watchdog (ms).
plugin_max_concurrent_executorsbootinteger64—Plugin executor process cap.
plugin_max_scheduled_jobsper-callinteger100—Per-plugin scheduled-job cap.
plugin_max_subscriptionsper-callinteger64—Per-plugin event-subscription cap.
plugin_min_interval_msper-callinteger1000—Minimum interval floor for plugin scheduled jobs (ms).
plugin_queue_dwell_maxper-callinteger16—Per-plugin FIFO queue-dwell cap before a 429 busy-with-retry-hint.
plugin_http_sweep_msper-callinteger60000—Plugin HTTP connection-pool sweep cadence (ms).
plugin_http_conn_max_age_msper-callinteger300000—Plugin HTTP pooled-connection max age (ms).

Inference & model registry

KeyRestartTypeDefaultEnv VarDescription
inference_restart_retriesper-callinteger3—llama.cpp restart attempts before the lane is marked failed.
inference_restart_backoff_msper-callinteger5000—llama.cpp restart backoff (ms).
inference_restart_strike_decay_msper-callinteger1800000—Stable-ready window that clears one auto-restart strike (default 30 min); an exhausted lane is quarantined and re-probed on this cadence.
ready_health_interval_msper-callinteger30000—READY health-probe interval (ms) for loading engines.
scale_down_grace_msper-callinteger15000—Autoscaler scale-down drain grace (ms).
pipeline_admission_timeout_msper-callinteger30000—Admission wait bound (ms) before a request is answered 503/429.
provider_health_tls_verifyper-callbooleantrue—TLS peer verification for the provider-health probe (must stay true outside loopback).
model_prepare_tmp_ttl_msper-callinteger3600000—Registry prepare staging-file TTL (ms) before the boot sweep removes it.
embed_max_concurrencyper-callinteger4—Embedding-pool concurrent request cap (the async bounded pool).
embed_max_batchper-callinteger256—: the embed_batch/2 fan-out wave size — helper processes are spawned in bounded chunks, never one per input text.
cost_legacy_metadata_priceper-callbooleanfalse—: re-enables the LEGACY bundled-metadata rate source when the catalog has no row. Off by default — the catalog is the one rate source.
embed_max_queueper-callinteger64—Embedding-pool queue depth cap.
lane_benchmark_csvper-callstring— (unset)—Benchmark-artifact path consumed by lane validation (prod config points at /opt/sol/data/local-inference-benchmark.csv).
lane_inventory_expire_after_msper-callinteger— (unset)—Fleet-inventory row expiry override (ms); unset derives the bound from the heartbeat cadence.
lane_placement_inflight_maxper-callinteger8—Maximum in-flight lane placements admitted by the orchestrator.
lane_resolve_cold_asyncper-callbooleantrue—Resolve cold lanes asynchronously instead of blocking the dispatch path.

Workers & licensing

KeyRestartTypeDefaultEnv VarDescription
license_fail_modeper-callenum— (unset → refuse)—License-check failure posture for worker spawns (refuse is the shipped behavior; the lever is read by sol_worker_sup).
team_ghost_grace_msper-callinteger3600000—Team ghost-member expiry grace (ms) before the sweeper removes the member.

Auth, audit & shares

KeyRestartTypeDefaultEnv VarDescription
audit_archive_secretper-callstring— (unset)SOL_AUDIT_ARCHIVE_SECRETHMAC secret for the Mango audit-archive POST leg; must equal Mango’s MANGO_AUDIT_ARCHIVE_SECRET.
audit_retention_daysper-callinteger30—Audit JSONL retention window (days). Range 1–3650, validated at boot. Config-file twin: [audit] retention_days. The daily sweep deletes only CLOSED day files strictly older than the clamped cutoff — today’s open file and the newest closed day always survive.
audit_strong_consistencyper-callbooleantrue—fsync audit appends before acknowledging (tamper-evidence first).
mango_bridge_hmac_secretper-callstring— (unset)—Shared HMAC secret for the Mango event bridge (boot refuses without it when the bridge is enabled).
auth_flush_on_reconnectper-callbooleantrue—Flush every Sol-side auth cache once when the Mango bridge reconnects: a role/team/user demotion made during a bridge outage lands within the reconnect window, not the per-user cache TTL. The flush is O(cache size) per reconnect; set false to restore the previous costed posture.
share_quota_per_userper-callinteger100—Session-share links per user before the quota 429.
share_rate_limit_per_minper-callinteger30—Per-IP session-share read rate limit (requests/min).
share_rate_max_keysper-callinteger10000—Bound on the share rate-limiter key table: distinct per-IP buckets tracked before new keys are refused admission to the table (existing buckets keep counting), so a hostile address spray cannot grow memory without bound.
share_reap_budgetper-callinteger2000—Expired-share reap budget per sweep pass.

Mango audit-archive cutover levers. Mango’s own receiver config is mango/conf.py, but these two env-only levers belong to the Sol↔Mango archive wire and are set on the MANGO leg:

VariableDefaultMeaning
MANGO_AUDIT_ARCHIVE_ALLOW_V1unset (v1 refused)Accept the legacy v1 archive HMAC during a documented one-window cutover. Leave unset on a stock deployment: the Sol sender shipped since then speaks HMAC v2 (X-Audit-Archive-Timestamp/-Nonce + body-bound material), so no ack is needed. Mango logs a once-per-boot WARNING when the ack IS set (the replayable-wire posture); MANGO_AUDIT_ARCHIVE_REQUIRE_V2=1 refuses v1 even under the ack. Strict boolean: a typo refuses boot.
MANGO_AUDIT_ARCHIVE_REQUIRE_V2unsetHard-refuse v1 (overrides the ack). Set only AFTER the Sol sender upgrade to the v2 timestamp/nonce material. Strict boolean.

Mango identity-plane levers. These are Mango-process env levers (read by mango/); Sol does not read them.

VariableDefaultMeaning
MANGO_SERVICE_TOKEN_DEFAULT_SCOPEunset → the read-only inventoryDefault scope minted when a service-token request carries no explicit scope. default selects users:read,orgs:read,teams:read,tasks:read,roles:read; a comma-separated verb list is clamped to the owner’s live grant (an empty clamp is now a typed 400 refusal, never an inert token); legacy/none/unscoped restores the previous full-RBAC mint LOUDLY (one migration window). A malformed value refuses the mint (503), never a silent widening. NOTE: the read-only inventory does NOT include orchestrator:lease or revocations:read — a Sol service account minted with the default must request those explicitly (or mint in the legacy/unscoped window).
MANGO_SERVICE_TOKEN_ALLOW_UNSCOPEDfalseOne-window legacy lever: with no MANGO_SERVICE_TOKEN_DEFAULT_SCOPE set, true mints the historical full-RBAC (NULL-scope) service token by default and logs a warning. Unset it after rotating integrations to explicit scopes.
MANGO_LDAP_BREAK_GLASS_DURING_OUTAGEfalseWhile the LDAP outage circuit is open, email-shaped logins answer ONE uniform typed 503. true explicitly restores the local break-glass fallback for local accounts during an outage; a deliberate, visible weakening.
MANGO_LEGACY_SESSION_COOKIEfalseSession auth reads only the __Host--prefixed cookie. true re-enables the legacy zerg_session reader for the documented migration window. The legacy name is still EMITTED for Sol/Limon readers either way; CSRF cookies keep their migration fallback (not a credential).
MANGO_LIMITER_KNOWN_HEADROOMMAX_KEYS // 10 (1000 of 10000)Capacity reserved for RESOLVED identities: unknown keys stop at MAX_KEYS - headroom, so a junk-identity flood cannot deny a known user’s login. Absolute MAX_KEYS still caps every class; a malformed value falls back to the default.
MANGO_MAX_LOCK_ENTRIES10000Live hard-lockout entries retained before overflow eviction (counted, with a transition warning + once-per-1000 log bound).
MANGO_MAX_LOCK_ENTRIES_HARD2 × MANGO_MAX_LOCK_ENTRIESHard ceiling for the lockout dict; when an ACTIVE entry must be evicted the operation is counted (the per-account bucket still bounds the attacker). Never below MANGO_MAX_LOCK_ENTRIES.
MANGO_MAX_USERSunset (NOT enforced)DE-CLAIMED: Mango does not enforce a user cap. The Sol seat map still carries max_users, but docs/seats.md records the non-claim (no signed Sol→Mango seat datum exists); the name is reserved for that future datum.

Chat turn lease & idempotency

The session turn plane (sol_chat_sessions_owner + sol_chat_turn_plane) enforces one live turn per session across WS and REST and powers the client_turn_id replay contract (see docs/api-reference.md, chat message).

KeyRestartTypeDefaultEnv VarDescription
chat_turn_lease_ttl_msper-callintegertask_timeout_ms + chat_turn_lease_grace_ms (360000)—Absolute lease TTL override (ms). Unset derives from the task deadline plus the grace; a live holder is extended, never preempted by wall clock alone.
chat_turn_lease_grace_msper-callinteger60000—Grace added to task_timeout_ms when chat_turn_lease_ttl_ms is unset (the no-relay TTL fallback window).
chat_turn_lease_renew_msper-callintegerderived: min(30000, max(1000, ttl div 4))—Caller-side renewal throttle for a live turn’s lease (token/progress renews at most once per window).
chat_turn_dedupe_ttl_msper-callinteger300000 (5 min)—Content-bound client_turn_id replay window; replayed after the window duplicates by contract.
chat_turn_dedupe_max_per_sessionper-callinteger32—Per-session cap on the dedupe side table (oldest evicted at insert).

HTTP & streaming

KeyRestartTypeDefaultEnv VarDescription
client_timeout_max_msper-callinteger600000—Ceiling for client-supplied per-request timeouts (sol_http_validation).
sse_heartbeat_msper-callinteger15000—SSE heartbeat cadence (ms) — keeps idle streams alive through proxies.
sse_stream_shutdown_grace_msper-callinteger2000—: grace after the age sweep’s typed {sol_stream_shutdown} before the reaper kills the stream process; accounting is released only after the DOWN (never a released-but-alive slot).
sse_write_ack_timeout_msper-callinteger15000—: the bounded Cowboy data-ack deadline for FOREIGN stream writers (sol_http_stream — chat pumps and replay producers). A timeout/connection DOWN is a typed error + stream_writer_abandoned_total, so the caller releases its admission/session row; non-positive/non-integer values fall back to 15000.

Health & backups

KeyRestartTypeDefaultEnv VarDescription
sol_health_process_warnper-callnumber0.8—Process-count warn threshold (fraction of the Erlang process limit).
sol_health_process_critper-callnumber0.95—Process-count critical threshold (fraction of the Erlang process limit).
sol_health_memory_warn_bytesper-callinteger4294967296—Memory warn threshold (bytes).
sol_health_disk_warn_bytesper-callinteger1073741824—Disk free-space warn threshold (bytes).
sol_health_disk_crit_bytesper-callinteger104857600—Disk free-space critical threshold (bytes).
sol_health_mq_warnper-callinteger100—Message-queue depth warn threshold.
sol_health_check_budget_msper-callinteger300—: per-check budget for the bounded readiness runner. A check that misses its budget is a typed timeout error row (never a healthy default). Range 10–60000.
sol_health_total_budget_msper-callinteger900—: total deadline for the readiness fan-out; checks past it are typed total_deadline_exceeded rows. Keeps a wedged dependency under 1s. Range 10–120000.
sol_health_disk_sample_msper-callinteger15000—: the supervised disk sampler’s cadence (ms). Requests/scrapes only read the sampled cache; a sample older than 90s makes the disk check degraded (probe_stale). Range 1000–3600000.
sol_health_core_queue_warnper-callinteger5000—(LIFE-13): message-queue warn tier for the core data-plane children (task store, workflow manager, scheduler, event store, cluster). Range 100–1000000.
sol_health_core_queue_critper-callinteger20000—: message-queue critical tier for the core data-plane children (readiness error). Range 100–1000000.
health_expect_modelsper-callbooleanderived—: force the readiness model expectation. Unset = expect a serving model whenever the registry has rows; true makes an empty registry an error too.
sol_health_owner_registry_checkper-callbooleantrue—(LIFE-4): owner-plane content check in the readiness ets probe. A registry (sol_models, sol_channels, sol_provider_registry) that had content under the same app instance but returns EMPTY under a NEW owner is a readiness error until the content is restored (or the same owner deliberately empties it). Set false to run an intentionally empty channel plane without the red verdict.
health_expect_workersper-callbooleanderived—(LIFE-12): force the readiness worker expectation. Unset = expect workers when zmq_enabled and initial_workers > 0; true/false pin the verdict.
http_max_connectionsper-callinteger16384—: the explicit HTTP listener admission cap, applied through ranch:set_max_connections/2 after the transport tail starts (the pre-fix ranch default was 1024 shared with the SSE budget). max_sse_connections stays a separate streaming budget within this pool. Exported as sol_http_connections_{active,max,utilization_pct}; the nofile requirement is max_connections + max_sse_connections + 1024. Range 1–1000000.
mnesia_load_strictper-callbooleanset by sol_app to true for the release boot—(BVI-006): the durability-table load/create posture. true makes a failed disc-table create or an unloaded durability table a TYPED BOOT REFUSAL; eunit/partial boots leave it unset (loud degrade). Internal boot flag — operators never set it directly
mnesia_force_load_on_timeoutper-callbooleanfalse—(BVI-006): ack-gated operator lever — on a load-barrier timeout, force_load_table re-reads the local log. Enable ONLY after confirming the local log copy is authoritative (docs/operations #mnesia-load)
sol_mnesia_load_bound_msper-callinteger15000—(BVI-006): the boot load barrier’s wait_for_tables bound; a timeout publishes the typed pending verdict (strict boot refuses)
maintenance_worker_settle_msper-callinteger1500—Maintenance drain settle window (ms): the bounded wait for in-flight worker tasks before the gate flips. A drain that cannot settle returns the typed drain_incomplete, never a silent success.
worker_bootstrap_retry_msper-callinteger1000—First backoff (ms) when a worker’s async bootstrap (lane resolve/spawn) fails; doubles per attempt up to worker_bootstrap_retry_max_ms.
worker_bootstrap_retry_max_msper-callinteger30000—Backoff ceiling (ms) for the async worker bootstrap retry loop.
worker_bootstrap_max_attemptsper-callinteger5—Consecutive bootstrap failures before a parked worker GIVES UP: it exits {shutdown,{unavailable,_}} (no supervisor restart, slot released) instead of retrying forever. Bounds a deterministic spawn failure (missing binary, denied lane) to one slot and zero pool-budget burn.
data_plane_check_msper-callinteger5000—sol_data_plane_restorer keeper tick (100–60000): restore a missing data plane after the boot ladder completed, and monitor the live one.
data_plane_restore_retry_msper-callinteger5000—Delay (100–60000) between bounded data-plane restore attempts.
data_plane_restore_max_attemptsper-callinteger5—Consecutive restore failures (1–100) before the keeper logs CRITICAL and calls application:stop(sol) — a node never serves a dead data plane.
worker_resolve_deadline_msper-callinteger10000—Bounded deadline (ms) for the lane-resolve probe moved out of init/1 into the async bootstrap.
mnesia_backup_retention_daysper-callinteger7—Mnesia backup retention window (days). Range 1–3650, validated at boot. Config-file twin: [mnesia] retention_days. Rotation never deletes the artifact it just wrote; the success gauge is stamped only after the backup file exists and the manifest checksum reads back.
sol_mnesia_backup_remote_pathper-callstring""—Remote backup copy target — an rsync DESTINATION DIRECTORY; the data file and its .manifest are copied as a verified pair. Empty disables the remote leg; a local absolute path is copied directly (temp+fsync+rename).
mnesia_backup_offsite_lifecycle_managedper-callbooleanfalse—: operator attestation that a REMOTE offsite destination has an external lifecycle/retention policy. A locally-mounted destination is pruned by Sol automatically (same age + per-day retention); false on a remote destination makes sol_mnesia_backup_offsite_managed 0 and pages SolBackupOffsiteUnmanaged.
scrape_deadline_msper-callinteger5000—: the whole /metrics scrape deadline (ms). Once spent, remaining formatters are skipped (their families are ABSENT, counted in sol_scrape_deadline_exceeded_total) — a wedged dependency can never lose the whole scrape or the dead-man. Bound ≥500.
airgap_modeper-callbooleanfalseSOL_AIRGAP_MODE: explicit air-gap posture ack. In prod, readiness normally requires an off-host backup target (offhost_target_required); airgap_mode=true makes the off-host leg optional while the LOCAL scheduled Mnesia backup stays mandatory (mnesia_backup_interval > 0 — 0 is a readiness local_backup_required error in an air-gapped prod node). Boolean grammar is strict (a non-boolean value refuses the boot).
sol_exec_default_timeout_msper-callinteger120000—Default wall-clock timeout for sol_exec-managed child processes (ms).

Channels & marketplace

KeyRestartTypeDefaultEnv VarDescription
channel_max_concurrentper-callinteger5—Maximum concurrent channel event deliveries.
teams_validation_rate_per_minuteper-callinteger30—Per-channel rate limit for the Teams subscription-validation echo (fixed one-minute window; over-limit answers a bounded 429). The echo also requires a configured teams_auth_token.
unsigned_webhook_rate_per_minuteper-callinteger60—Per-channel fixed-window body budget for allow_unsigned_webhooks=true channels (anonymous plugin dispatch). Over budget the webhook answers a bounded 429 + Retry-After: 60; each accepted delivery carries input_trust=anonymous_input in the audit event and dispatch log.
marketplace_ratings_max_age_msper-callinteger7776000000—Marketplace rating-row max age (ms; 90 days) before refresh.
marketplace_ratings_sweep_msper-callinteger86400000—Marketplace ratings sweep cadence (ms).
memory_wal_drop_policyper-callenumblock—Memory-WAL overflow policy when the durable leg is down: block or drop (drop is counted loudly).
memory_wal_sync_every_opsper-callinteger0—Fsync the active memory-WAL segment every N accepted enqueues (0 = off; the default keeps the historical throughput — ack means segmented/page-cache durable, power-loss is bounded by the flush cadence).
memory_wal_sync_every_msper-callinteger0—Fsync the active memory-WAL segment on the first enqueue after this interval (0 = off; no timer wakeups).
cluster_lease_reportsper-callboolean— (unset → on)—Cross-node lease-report exchange lever (cluster maintenance).

Air-Gapped Deployment

airgap_mode (SOL_AIRGAP_MODE) is the explicit air-gap posture ack. It has ONE effect: in prod it relaxes the readiness requirement for an off-host backup target (the local scheduled Mnesia backup remains mandatory). It is not an egress switch. Egress is enforced by the opt-in gates documented in security.md §Egress inventory: LUNA_ALLOW_OSV_CHECK (Luna/MCP OSV lookups — fail-closed, default off), LUNA_ALLOW_TOOL_INSTALL (Luna tool auto-install downloads and package-manager legs — fail-closed, default off; ) and ZERG_ALLOW_EGRESS_UPDATE (zerg-cli update checks). Sol’s own outbound sockets target deployment-configured endpoints only — but the inventory also includes the license/seat refresh (seats_url; seats_refresh_ms=30000) and OAuth token refresh for declarative providers. In an air-gap, leave seats_url empty, disable unused OAuth providers, and point Mango/provider/webhook URLs at in-cluster services. Bind defaults (http_ip 127.0.0.1, zmq_bind_addr 127.0.0.1) keep the control plane off the network. See air-gap-install.md for the walkthrough.

Boot Validation & Strict Boot

The boot ladder is contractual — the HTTP listener (bound inside sol_http:start/0 under sol_transport_sup) and the ZMQ sockets start only AFTER the event store is initialized. The order, pinned by the boot_order_lint CI gate:

sol_sup:start_link (static tree, no transport tail)
  → sol_config:validate_all        (required keys, ranges, placeholder secrets)
  → sol_config:validate_optional   (the ~44-entry optional battery — LIVE)
  → init_event_store               (tables, registrations, boot replay)
  → gate_event_store_boot          (strict refusal OR maintenance degrade)
  → supervisor:start_child         (DEFERRED TRANSPORT: sol_transport_sup,
                                    sol_plugin_sup, sol_memory_sup)
  → remaining init labels          (workflow defs/compensations/providers,
                                    workflow recovery)
  → check_strict_boot              (post-init strict gate)

Before this change the transport tail was a static part of sol_sup, so HTTP+ZMQ served stale/empty projections during the whole boot-replay window.

Strict boot is per-label. A failed init label is recorded per boot; what happens next depends on the levers, evaluated per label:

LeverSemantics
(no env set)event_store defaults strict — the boot REFUSES ({refuse_boot, {strict_boot_init_failed, [event_store]}}) before any listener binds. Every other label defaults non-strict (warn-and-boot).
{strict_boot, event_store} = falseThe documented degraded posture: the boot continues, and maintenance mode is enabled BEFORE the transport starts — projection routes serve 503 maintenance_mode (the sol_auth_middleware gate; /health, /api/v1/health, /api/v1/ready, /metrics stay exempt) until the operator resolves the store.
strict_boot = true (global master-override)The data-integrity set (event_store, workflow_recovery) refuses the boot — unchanged from its pre- contract.
{strict_boot, Label} = true/falsePer-label lever; wins over both the global override and the default for that label.

The global master-override itself is a Sol app-env key:

KeyRestartTypeDefaultEnv VarDescription
strict_bootbootbooleanfalse—global master-override: true makes the data-integrity init labels (event_store, workflow_recovery) refuse the boot; the per-label {strict_boot, Label} lever wins over it. Read once by sol_app:check_strict_boot/0 (boot-time only)

validate_optional boot gate: the optional-key battery (range checks for keys like max_active_requests, scale_down_grace_ms, embed_max_concurrency; boolean-type checks for zmq_enabled, mango_auth_enabled, …) ACCUMULATES every violation and refuses the boot with {error, {invalid_config, [Violation, …]}}, logging each violated entry loudly. Undefined keys are exempt — the battery only judges keys the operator actually set. Violation shapes mirror validate_config’s range checks: {out_of_range, Key, Val, Min, Max} and {wrong_type, Key, Val}.

VM Args

Defined in config/vm.args (development) and config/vm.prod.args (production).

ArgDefaultDescription
-namesol@127.0.0.1Erlang node name. Must be unique in cluster.
SOL_CLUSTER_COOKIEunset (dev) / required (prod)Distribution cookie. The vm.args carry NO -setcookie line: the entrypoint installs the cookie as $HOME/.erlang.cookie mode 0400 (or SOL_COOKIE_FILE), so it never appears in ps/argv. Charset [A-Za-z0-9_@-], max 64 chars. prod: must be explicitly set, at least 16 chars, and must not be sol_cookie or the CHANGE_ME_GENERATE_A_UNIQUE_COOKIE placeholder — otherwise the boot refuses. The cookie must match across cluster nodes. sol_app:rotate_cookie/0 generates a 64-char hex cookie
SOL_COOKIEunsetLegacy alias for the distribution cookie (read only when SOL_CLUSTER_COOKIE is unset): sol_app:apply_cookie_override/0 calls erlang:set_cookie/2 at runtime (charset [A-Za-z0-9_-@], max 256 chars; invalid values are ignored with a warning). Prefer SOL_CLUSTER_COOKIE — the prod gate consumes that name.
+A4Number of async threads
+S4Number of scheduler threads
+KtrueEnable kernel poll (epoll/kqueue)
+hms8192Minimum heap size (words)
+hmbs8192Minimum binary heap size (words)
+zdbbl32768Distribution buffer busy limit (production only)

Luna Agent Configuration

Luna loads configuration from JSON files, CLI arguments, and environment variables (client/core/config.lua).

Config File Locations

Config files merge in this order (later wins — client/core/config.lua discover_config_files/1, profile merged last at config.lua:347):

~/.luna.json < ~/.luna/settings.json < .luna.json < .luna/settings.json < .luna/settings.local.json < profile (Paths.profile_config_path)

LocationPriorityExample
CLI argumentsHighest--model glm-5.1
.luna/config.jsonHighProject-local config
~/.luna/config.jsonMediumUser global config

Each file is deep-merged on top of DEFAULT_CONFIG. Encrypted fields are decrypted via core.age_crypto if present. Schema version lives in _config_version (currently 1).

Security-relevant keys from the project-local files additionally require the repo-config consent gate (below).

CLI Arguments

ArgumentShortTypeDefaultDescription
--model-mstringglm-5.1Model alias or ID
--permission-mode-pstringdefaultPermission mode: default, allow-all, deny-all, read-only, plan, auto
--resume-rflagfalseResume last session
--print—flagfalseNon-interactive: print response and exit
--session-sstringautoSession file path
--gc-sessions—flagfalseDry-run the session-corpus GC and exit (no session/provider boot)
--gc-apply—flagfalseApply the session-corpus GC and exit (age/idle/lease guarded)
--gc-max-age-days—numberconfig (30)Age cutoff override for a GC run
--gc-limit—numberunlimitedMaximum eligible sessions processed by one GC run
--theme—stringdefaultColor theme: default, onedark
--connect—string—Headless ZMQ worker mode: connect to the Sol ROUTER endpoint (e.g. tcp://127.0.0.1:5555)
--id—string—Worker identity for --connect mode
--pub-endpoint—string—Sol PUB endpoint for --connect mode (events)
--editor—flagfalseEditor session posture (requires --connect): hold ONE lane lease across turns — adopt the first task-scoped grant, refresh it while active, release on exit. The lease rides the existing lane_control plane; there is no stdio lane-control verb
--session-lane—string—Preferred lane/use case for the editor session (implies --editor); advisory — Sol still owns placement and may refuse typed
--propose-edits—flagfalseHeadless editor edit turn: write-class calls surface one validated tool_use proposal and are never executed; execute-class calls are refused. The editor reviews the diff and applies only on accept. See client/docs/vim-integration.md §

Environment Variables

VariableDefaultDescription
LUNA_MODELglm-5.1Default model (zmq_worker.lua; connect-mode task fallback)
LUNA_LOG_LEVELinfoLog level: debug, info, warn, error (main.lua)
LUNA_CONFIG_PROVENANCEunset (off)boolean
LUNA_SQLITE_PATH~/.luna/sessions.dbSQLite session DB path override (session_backend.lua)
LUNA_BLOB_MAX_BYTES10485760Per-blob cap at store time (loud error on exceed); retrieve verifies content hash — torn blobs raise, never silently nil (blob_store.lua)
LUNA_BWRAP_ALLOW_ROOTunsetExplicit ack to run bwrap as real root
LUNA_CLASSIFIER_ENABLEDunsetForce the AI permission classifier on/off (true/false; ai_classifier.lua)
LUNA_PERMISSION_ASK_TIMEOUT_MS120000Worker-side ask wait timeout (ms) before a typed deny; the Sol registry owns the authoritative timeout
LUNA_LEGACY_WRITE_IMPLIES_EXECUTEunsetOverride the coarse write⇒execute RBAC rule (config.lua/permission_checker.lua; default true — new installs set false)
LUNA_ZMQ_ALLOWED_WORKSPACE_ROOTSunsetComma-separated allowlist of wire-supplied workspace roots (fail-safe; zmq_worker.lua)
LUNA_ALLOW_OSV_CHECKunset (off)Opt-in egress gate for MCP/OSV vulnerability lookups (fail-closed; see security.md)
LUNA_ALLOW_TOOL_INSTALLunset (off)Opt-in egress gate for tool auto-install network legs. Package-manager installs that use sudo additionally require explicit caller consent

Advanced environment overrides

The production levers below were read by code with no live-doc mention (the UW-6 audit). Defaults are the code defaults; ci/config_env_docs_parity_lint.py keeps this table and the client/ READ corpus in lockstep (both directions).

VariableDefaultDescription
LUNA_MEMORY_MODEdualMemory backend selector: dual (default), json, sqlite, file, vector, hybrid, graph. Config key memory.mode wins over the env. graph is a real scoped KV-over-triples backend (one has_value triple per key); graph neighbour expansion is prefix-scoped. Memory refuses to start without $HOME (no /tmp fallback).
LUNA_ANALYTICS_DB~/.luna/analytics.dbLocal analytics SQLite path override (CLI/tests).
LUNA_DATA_DIR~/.luna-relativePackaging/deployment data-dir override.
LUNA_SESSION_MAX_MESSAGES1000 (code default when unset)Per-session record ceiling (Session.MAX_ALL_MESSAGES); older records are dropped with a counted WARN. This is an in-memory/JSONL cap, not a corpus GC — 0 drops all but the newest record set, it is NOT unbounded
LUNA_SESSION_TOOL_RESULT_TURN_BUDGET_BYTES40000Per-operator-turn aggregate tool-result text budget; overflow renders a persisted-output marker + read_tool_output handle. 0 disables.
LUNA_SESSION_FULL_OUTPUT_BLOB_BYTESunsetBlob-spill threshold for tool output in sessions.
LUNA_BLOB_MIGRATE_MAX_BYTES / LUNA_BLOB_MIGRATE_MAX_FILESunsetOne-shot blob-store migration bounds.
LUNA_KEYRING_REQUIREDconfig keyring_required (false)Refuse the plaintext config fallback when no OS keyring exists.
LUNA_SHA256_CLIunset (off)Opt-in openssl dgst backend for SHA-256/HMAC on large buffers; only 1/true arms it. Default OFF keeps MAC’d planes zero-fork (FFI, then the pure-Lua floor) — see crypto.md.
LUNA_ALLOW_SESSION_KEYSunsetSECURITY ACK: allow model-driven session-key combos (ctrl+alt+F2, alt+F2,…). Default REFUSE; only 1 consents (computer_use.lua).
LUNA_ALLOW_INSECURE_TLSunsetSECURITY ACK: acknowledge a caller’s verify_peer=false request. The transport still pins CURLOPT_SSL_VERIFYPEER=1 — this ack can never weaken TLS; it only silences the refusal and logs a warning (web_fetch_shared.lua).
LUNA_ALLOW_PLAINTEXT_HTTPunsetSECURITY ACK: permit plaintext http:// for NON-loopback in-process targets. Default REFUSE — non-loopback targets need https://; loopback is always reachable. The config twin is execution.sandbox.allow_plaintext_http=true (transport.lua). A failed TLS probe never downgrades silently.
LUNA_SNAPSHOT_CLEANUP_AGE_HOURS24Git-snapshot auto-cleanup age.
LUNA_SNAPSHOT_CLEANUP_INTERVAL_MS3600000Git-snapshot cleanup cadence.
LUNA_SNAPSHOT_DEBOUNCE_MS2000Debounce after a mutating-tool completion.
LUNA_SNAPSHOT_RETRY_BASE_MS500Git-snapshot retry backoff base (exponential).
LUNA_SNAPSHOT_RETRY_CAP_MS30000Git-snapshot retry backoff cap.
LUNA_SNAPSHOT_RETRY_MAX5Git-snapshot retry attempt bound.
LUNA_TOOL_OUTPUT_COMPACT_THRESHOLDcode defaultToken threshold for compact tool-output rendering.
LUNA_TOOL_OUTPUT_COMPACT_HEAD_CHARScode defaultHead-chars kept by the compact renderer.
LUNA_LANE_RESOLVE_TIMEOUT_MS120000Lane-resolve deadline override (clamped by the task timeout).
LUNA_MCP_START_BUDGET_MS1500Bounded MCP bootstrap budget.
LUNA_SIXEL / LUNA_IMAGE_PROTOCOLunsetTerminal image protocol: LUNA_SIXEL=1 or LUNA_IMAGE_PROTOCOL=sixel enables sixel (term_probe.lua).
LUNA_ZMQ_CURVE_PUBLICKEY / LUNA_ZMQ_CURVE_SECRETKEYunsetWorker CURVE keypair (z85; non-loopback transport posture — see docs/zmq-security.md).
LUNA_ZMQ_HANDSHAKE_IVL_MSliveness defaultZMTP handshake interval.
LUNA_ZMQ_HEARTBEAT_MSliveness defaultZMTP heartbeat interval.
LUNA_ZMQ_RCVHWM / LUNA_ZMQ_SNDHWMliveness defaultZMQ high-water marks.
LUNA_ZMQ_TCP_KEEPALIVE (+ _CNT / _IDLE_S / _INTVL_S)1 / OS defaultsZMQ TCP keepalive posture.
LUNA_ZMQ_TOKEN_BATCH_BYTEStransport defaultToken-batch flush bound.
LUNA_ZMQ_BUSY_LIVENESS_MSliveness defaultBusy-worker liveness window.
LUNA_ZMQ_IDLE_NO_INBOUND_MSmax(4×idle window, 60000)(RV-044): the HARD no-inbound ceiling for an idle registered worker. A successful fire-and-forget send (the 5 s heartbeat) is not bidirectional evidence — the send-success suppression only defers the trip to this ceiling. >0 sets an explicit ceiling in ms; 0 restores the legacy send-only suppression (never trips while sends succeed). Deliberately a bounded reconnect cadence, not a “never trip” posture (client/core/zmq_liveness.lua).
LUNA_AI_PROVIDER / LUNA_AI_MODELconfig provider/modelProvider and model overrides for the headless/ZMQ task path (the config keys win when set).
LUNA_AI_API_KEYunsetAPI key for the shell/headless provider path.
LUNA_WORKSPACEunsetDeclared config-resolver override for workspace_root (wins=fill: only when no file layer set it).
LUNA_ZMQ_LIVENESS_MSliveness defaultWorker-liveness window (frame-stamp freshness).
LUNA_ZMQ_TCP_KEEPALIVE_CNTOS defaultZMQ keepalive probe count.
LUNA_ZMQ_TCP_KEEPALIVE_IDLE_SOS defaultZMQ keepalive idle seconds.
LUNA_ZMQ_TCP_KEEPALIVE_INTVL_SOS defaultZMQ keepalive probe interval.
LUNA_ZMQ_TOKEN_BATCH_MS20Token-batch flush interval; 0 disables batching.
LUNA_WEDGE_WATCHDOG_MStask-timeout-derivedWedge-watchdog progress-age threshold override.
LUNA_CONCURRENT_TOOL_WAIT_MS300000Drain deadline for in-flight concurrent tools.
LUNA_PENDING_RESULTS_MAX4096(BVI-068): cap on the in-RAM terminal-retransmit ledger (_pending_results). The cap matches the durable terminal spool; insert over it drops the OLDEST entry loudly (counted, with the durable row surviving when the spool is available). A non-positive/invalid value falls back to 4096.
LUNA_SPAWN_GROUP_REGISTRYunset (off)(BVI-017): opt-in supervisor marker (=1) that enables the <data>/spawn_pgids registry consumed by client/contrib/luna-orphan-sweep.sh (starttime-checked orphan-group kill after a SIGKILLed Luna). Default off keeps test/embedded spawns out of the user’s real data dir; the runit unit sets it in production.
LUNA_PTB_TIMEOUT_MSplugin-bridge defaultPlugin-bridge call timeout (Sol’s plugin_execute_timeout_ms twin).
LUNA_REFUSE_WITHOUT_MONOTONICunsetRefuse startup when the real monotonic clock is unavailable (otherwise the watchdog degrades to wall clock, loudly).
LUNA_SIGNAL_SHIMbuilt-in pathDev/test path to the signal shim shared object (production uses the built binary).

Luna→Sol endpoint family (the memory/vector-search and completion client legs read these; the single documented port is SOL_HTTP_PORT, ). There is no SOL_PORT env var (retired; use SOL_HTTP_PORT).

VariableDefaultDescription
ZERG_API_URLunsetFull base URL override; wins over host/port.
SOL_HOST / SOL_HTTP_HOST127.0.0.1Sol HTTP host.
SOL_HTTP_PORT21434Sol HTTP port.
SOL_TOKEN / SOL_API_KEYunsetLuna→Sol HTTP bearer (MANGO_TOKEN is also accepted).

Luna completion entry — client/run --complete reads one JSON object on stdin and writes raw completion text on stdout (exit 0). It posts only to POST /v1/completions on Sol; it never calls a lane /infill endpoint or ollama. Protocol and trim behavior: docs/cli-reference.md. Input: {"prefix","suffix","model?","max_tokens?","stop?","temperature?"}; an empty prefix is a no-op (no request). A configured bearer is attached as Authorization: Bearer; plaintext credential transport is allowed only to a loopback host unless ZERG_ALLOW_INSECURE=1 (the CLI transport matrix).

VariableDefaultDescription
ZERG_COMPLETE_MODELunsetCompletion model when the request and --model omit one; unset = Sol default. Do not point this at a non-FIM model.
ZERG_COMPLETE_TOKENS96Completion-token budget when the request omits max_tokens (clamped to the server ceiling of 1024).
ZERG_COMPLETE_TIMEOUT15Completion HTTP timeout (seconds).
ZERG_COMPLETE_MAX_PREFIX_BYTES8000Prefix tail kept (nearest the cursor); 0 = unlimited. UTF-8 codepoint-safe.
ZERG_COMPLETE_MAX_SUFFIX_BYTES1000Suffix head kept; 0 = unlimited. UTF-8 codepoint-safe.

Defaults (client/core/config.lua DEFAULT_CONFIG)

All rows below are read from config.lua:15-131.

KeyDefaultNotes
model"sonnet"string
max_tokens8192must be > 0
max_iterations50capped at 200
permission_mode"default"one of allow-all, deny-all, read-only, default, plan, auto
steering_mode"all"all or one-at-a-time — steer-queue drain mode
follow_up_mode"all"all or one-at-a-time — follow-up-queue drain mode
auto_compaction_input_tokens_threshold100000min 1000
provider_base_urlnilstring
providers{}Settings-level custom providers — see Settings providers
api_keynilstring
mcp_servers{}table
permission_rules{allow={}, deny={}, ask={}}table
thinking_levelnilone of none, minimal, low, medium, high, xhigh
system_promptnilstring
append_system_promptnilstring
lsp_enabledfalseboolean
lsp_servers{}table
agents_dirnilstring
extensions_enabledfalseboolean — opt-in (allow-listed sandbox is the prerequisite)
local_agents_dirnilstring
session_budget_usd0number — 0 disables
tool_timeout_ms60000number
tool_timeout_max_ms600000Upper clamp for model-supplied command timeouts; the expiry alarm kills the child process group
fallback_providers{}table
response_formatnilstring
model_low / model_medium / model_highnilstring
auto_continue_after_compactionfalseboolean
slot_isolationfalseboolean
format_on_writefalseboolean
lint_on_writefalseboolean
budget_grace_enabledtrueboolean
tool_guardrails{}table
fork_turns"none"string
verification_enabledfalseboolean
git_step_trackingfalseboolean
track_git_diffsfalseboolean
persistent_retry_max_duration21600number (seconds)
fallback_modelnilstring
legacy_write_implies_executetrueboolean
keyring_requiredfalseboolean — refuse plaintext-config fallback when no OS keyring
otel_endpointnilstring — Luna-local span sink; no cross-service tracing
metrics_portnilnumber — opt-in loopback worker /metrics port
summarize_turnsfalseOpt-in per-turn summary generation (uses provider tokens)
web_search_provider"duckduckgo"Search provider: duckduckgo, searxng, brave, bing
brave_api_key—API key for Brave search provider
web_search_url—Required for the searxng provider (loopback targets refused at the egress gate)
mcp_sampling_enabledfalseAllow MCP servers to request LLM sampling
mcp_elicitation_enabledtrueRegister the production MCP elicitation/create handler and advertise the client capability. false removes the handler and the capability; headless/default responses are always decline — the optional operator responder is the only accept path
command_policy"standard"Execution policy: strict, standard, permissive
session_backend"dual"Session storage mode: "dual" (JSONL + SQLite, default), "jsonl" (JSONL only) (session_backend.lua DEFAULT_MODE)
session_sqlite_path"~/.luna/sessions.db"SQLite database path — resolved from the SessionBackend.init db-path arg, the LUNA_SQLITE_PATH env, then the default
session_gc{enabled=false, max_age_days=30, min_idle_seconds=600, page_size=100, dry_run=true, delete_trajectory=true, delete_orphan_tmp=true}Opt-in session-corpus GC. See Session corpus GC
zmq{}ZMQ worker-mode options (incl. allowed workspace roots)

Nested defaults

{
  "compaction": {
    "trigger_percent": 70,
    "protected_turns": 5,
    "cooldown_seconds": 120,
    "max_consecutive": 3,
    "max_tool_output_chars": 2048
  },
  "retry_config": { "max_retries": 3, "base_backoff_ms": 1000 },
  "token_guard": {
    "budget_ratio": 0.8,
    "max_input_tokens": null,
    "max_output_tokens": null,
    "adaptive_truncation": true,
    "truncation_scale_min": 0.25
  },
  "auxiliary": {
    "model": null, "provider": null, "api_key": null, "base_url": null,
    "max_tokens": 2048, "temperature": 0.3, "tasks": {}
  },
  "team": { "queue_backend": "durable" },
  "search": { "cjk_trigram": false },
  "session_gc": {
    "enabled": false,
    "max_age_days": 30,
    "min_idle_seconds": 600,
    "page_size": 100,
    "dry_run": true,
    "delete_trajectory": true,
    "delete_orphan_tmp": true
  },
  "execution": {
    "sandbox": {
      "enabled": true,
      "bwrap": "auto",
      "landlock": "auto",
      "network": false,
      "allow_plaintext_http": false,
      "read_only_dirs": {}, "allowed_write_paths": {},
      "rw_dirs": {}, "denied_paths": {}, "denied_read_paths": null,
      "deny_sockets": null, "deny_sockets_ack": false,
      "allow_git_trust_writes": false,
      "posture_downgrade_ack": false
    }
  }
}

Sandbox is ON by default (fail-closed). A prompt-injected agent does not get unsandboxed shell. Operators wanting the legacy insecure behavior set execution.sandbox.enabled = false (config.lua; documented insecure option). "auto" backends prefer bwrap, fall back to landlock-in-fork, and error when neither is available. execution.sandbox.deny_sockets replaces the /dev/null socket-shadow list ( — docker/podman/containerd *.sock denied by default; adds the build-time-resolved /run/user/<uid>/{keyring,gnupg}, /run/gnupg, and $SSH_AUTH_SOCK; /tmp/ssh-*/agent stays an accepted residual). deny_sockets = [] denies none ONLY with deny_sockets_ack = true — without the ack the empty override is ignored and the defaults apply (the dangerous-override ack discipline; a non-empty list replaces the defaults without an ack).

execution.sandbox.read_only_dirs entries must NOT be nested under a granted write root (workspace root, allowed_write_paths, or rw_dirs): the Landlock fork layer’s path-beneath rules are additive and cannot subtract a child from a parent grant, so such a config is refused with the typed landlock_ro_overlap:<path>:<write-root> error ( — the spawn refuses in every mode rather than pretending the path is read-only). A read-only entry that is an ANCESTOR of a write root is supported (the nested write grant is dropped). Use bwrap’s ro-binds for subtractive read-only semantics.

execution.sandbox.allow_git_trust_writes (default false) is the explicit model-tool rollback lever for the git trust-file write-deny
.git/{config,hooks,attributes,info,modules} and .gitmodules are write-denied for every model tool because a planted textconv/filter/hook turns a later READ-class git call into command execution. Setting it true admits those writes (the operator takes the trust decision); absent/false refuses with a typed git trust file error. The deny also resolves symlinked parents (a repo evil ->.git cannot carry a write through).

execution.sandbox.allow_any_commit_restore (default false) is the snapshot-restore scope lever: git_snapshot restore (and the undo snapshot replay) only restores commits reachable from a Luna-owned refs/luna-snapshot/* ref. The pre-fix shape accepted any hex commit and wrote its tree into the worktree through a path-addressed redirect; combined with a repo symlink (evil ->.git) that overwrote .git/config. Restore now also runs the shared write policy per target and writes each file through the fd-relative no-follow workspace primitive. Setting this key true admits an explicit non-Luna commit (the operator takes the trust decision); the refusal otherwise names the restriction and this lever. Session checkpoint restore is an internal caller and is unaffected.

execution.sandbox.posture_downgrade_ack (default false) is the operator acknowledgement for a bwrap→Landlock-only posture downgrade
a payload cannot flip the latch (wrapper- attributed failures only, N consecutive), and a posture that requires a bwrap-only property (network=false, read_mode=allowlist, a non-empty denied_read_paths, deny_sockets unless deny_sockets={} + deny_sockets_ack=true, bwrap=required, require_effective_layer=true) REFUSES the spawn instead of silently losing it. Setting the ack re-arms the wrapper attempt and clears a latched downgrade (counted + EventBus-visible).

Settings providers

providers declares custom OpenAI/Anthropic-compatible endpoints in the layered settings (user/project keys merge like every other key). Entries are validated and registered at config load through the shared core.provider validator — a malformed entry fails the load loudly; it is never deferred to first use.

{
  "providers": {
    "local": {
      "base_url": "http://localhost:11434",
      "wire_format": "openai",
      "models": ["qwen2.5-coder:7b"],
      "no_api_key": true
    },
    "remote": {
      "base_url": "https://api.example.com",
      "wire_format": "openai",
      "models": ["example-large"],
      "api_key_env": "EXAMPLE_API_KEY"
    }
  }
}
FieldRequiredRules
base_urlyeshttp(s)://host[:port] — the bare host:port. The provider appends /v1/chat/completions (openai) or /v1/messages (anthropic); a base_url ending in /v1 is refused at load (it would 404). A query/fragment is refused; trailing slashes are trimmed.
wire_formatnoopenai (default) or anthropic.
modelsnoArray of non-empty model names. Matching is the historical register semantics: exact or prefix (qwen2.5-coder:7b matches model qwen2.5-coder:7b-…). Custom providers are consulted before the prefix heuristics, so a models entry for a qwen* name routes to your endpoint instead of the alibaba cloud provider.
api_key_envkeyed providersEnvironment-variable name (never a raw key; api_key is refused). The key is read from the env, then the OS keyring.
no_api_keykeyless providersBoolean. The explicit keyless rule: no env/keyring lookup and no auth header. Loopback only — localhost, 127.0.0.0/8, or ::1; a non-loopback no_api_key provider is refused at load (fail-closed). Cannot be combined with api_key_env.

Either api_key_env or no_api_key: true is required per provider.

Duplicate names: last definition wins. A settings entry replaces a programmatically registered provider of the same name (the operator’s settings are authoritative), the next config load re-asserts it, and a name that disappears from the settings is unregistered. Within the file layers, the normal merge precedence applies (later user/project layer wins).

Consent: providers is part of the provider plane, so a project-local (.luna.json, .luna/settings.json, .luna/settings.local.json) providers table is stripped unless the repo has the trust marker — a cloned repo cannot redirect inference (or a key-bearing request) without approval.

Project-local config files (.luna.json, .luna/settings.json, .luna/settings.local.json) deep-merge OVER user config — a cloned repo can carry security-relevant keys. Those keys apply ONLY with a consent marker. Source: client/core/repo_config_security.lua (the family list + strip) and client/core/repo_config_trust.lua (all semantics below).

Security-relevant key families (from project-local files):

FamilyMeaning
execution.*Sandbox posture (execution.sandbox.enabled, bwrap mode, network flag)
permission_*Any key starting with permission (e.g. permission_mode, permission_override)
server_permissionsServer-grant RBAC list
workspace, workspace_rootWorkspace roots
workdir, _workspaceWorkspace-root aliases — first candidates for the bwrap bind root AND the Landlock grant root (sandbox.lua); _workspace is first precedence in tools/init.lua, workdir in formatters.lua/linters.lua — covered by this gate per (LUNSBX-1)
provider_base_urlWire destination of every provider request
providersSettings-level custom provider definitions — base_url/wire_format/models and api_key_env or no_api_key
api_key, api_keysProvider credential sources
auxiliaryAuxiliary model plane — base_url/api_key
fallback_providersFailover destinations
otel_endpointLuna-local span sink (fire-and-forget HTTP POST from the worker; no cross-service tracing — Sol/Mango export no spans)
classifierAI permission-classifier provider plane — enabled/model/provider/base_url; base_url is a network destination for classifier traffic
system_prompt, append_system_promptPrompt-injection planes: project-supplied prompt text
tool_validation, tool_guardrailsExecution-policy planes: disabling validation or loosening guardrails
desktop_overrideDisplay-global input injection opt-in
web_search_urlSearch destination (credentialed search API keys ride along)
memoryMemory backend selection — mode/backends incl. a remote vector_host
extensions_enabled, agents_dir, local_agents_dir, modeExtension opt-in and agent-mode discovery/selection

Trust-marker flow:

Consent is a hash-keyed marker in the USER’s approval dir: ~/.luna/approvals/trust-<sha256>.json. A marker inside the repo is deliberately NOT used — an attacker shipping the repo also ships the marker; user-owned storage is the only trust boundary that survives git clone attacker && cd repo && luna. Record-validated, atomic: all three consent planes share client/core/approvals_store.lua. Existence alone is not approval: a corrupt/truncated record, a record whose hash/kind names a different identity, or an unknown record version is IGNORED (fail closed). Legacy records without v/kind/hash (including {} rows) stay valid. Writes use FFI.atomic_write (mkostemp 0600 from birth + fsync + checked rename); the previous trust-marker writer was umask-dependent for the write window. Filenames and hash domains are preserved: trust-<hash>.json (config), <hash>.json (MCP), extension-<hash>.json (extensions). See consent.md. The hash covers BOTH file-sets: the config security keys (in merge precedence order) AND permission_override values from .luna/agents/ mode files — one marker approves both, so a config-only approval can never silently authorize mode overrides. Fail-closed without TTY: no marker and no TTY → the security-relevant project-local keys are IGNORED (stripped with a loud stderr warning, sandbox stays ON). With a TTY the operator is prompted once (y/N) and consent writes the marker; anything but an explicit y/yes is a decline. Verdicts are memoized per working directory for the process lifetime (M.reload clears them). Fingerprint: the permission-cache fingerprint derives from the sandbox posture (enabled/bwrap/network) and — per — includes the workspace root, so a re-rooted boundary (a repo that changes workdir/_workspace/workspace_root) invalidates cached allow decisions even with an identical sandbox posture. Defensive provider gate: provider.from_model/3 independently refuses a provider_base_url whose effective value equals the project-carried value while the consent verdict is false — a strip bypass falls back to the built-in destination with a CRITICAL line and a repo_base_url_refusals count. Value equality (not presence) keeps a same-key user-supplied URL legitimate. Project mode files: without consent, EVERY behaviour-bearing project mode field is dropped (permission_override, the permissions ruleset, system_prompt, system_prompt_section, tool_filter, tools, extra_tools, model, temperature, max_steps, max_iterations, max_turns, category), and a project file whose name collides with a NATIVE mode (build, plan, …) is refused entirely — a cloned repo cannot shadow the operator’s modes or apply a hidden ruleset. Custom/extension handler config: custom and plugin/extension handlers receive a deep, sanitized READ-ONLY COPY of the agent config — no _agent (provider key), credentials/provider-plane keys, server_permissions, or permission policy. Workspace context and the sandbox execution posture stay visible; mutations only touch the copy (the framework re-sanitizes on every dispatch). Audit pattern: the consent-gate corpus rows — workdir="/", _workspace="/", array/object variants, and the approved-repo-gains- workdir re-prompt.

KeyTypeDefaultDescription
search.cjk_trigrambooleanfalseUse the FTS5 trigram tokenizer for the CJK session-search table (messages_fts_cjk). Requires SQLite built with the trigram tokenizer. When enabled the table is created with tokenize='trigram'; when disabled unicode61. Switching the setting on an existing database drops-and-recreates the table and reindexes once. Threaded from main.lua → SessionBackend.init → session_sqlite.open.
{ "search": { "cjk_trigram": false } }

Session corpus GC (session_gc)

. The session corpus is retain-forever by default; this table opts into a whole-session sweep. Manual surfaces: --gc-sessions (dry run), --gc-apply, --gc-max-age-days N, --gc-limit N; TUI /gc (dry run) and /gc run [DAYS] (explicit apply). There is no LUNA_* env override for these keys.

KeyTypeDefaultDescription
session_gc.enabledbooleanfalseOpt-in idle cleanup. false means no automatic sweep ever runs
session_gc.max_age_daysnumber30A candidate’s last activity (max file mtime, index updated_at, SQLite updated_at) must be at least this old
session_gc.min_idle_secondsnumber600Additional recent-activity guard (corpora touched inside this window are skipped)
session_gc.page_sizenumber100Scan/deletion page size (1–10000; cursors resume a sweep)
session_gc.dry_runbooleantrueDefault for programmatic/manual runs; --gc-apply and /gc run override explicitly
session_gc.delete_trajectorybooleantrueRemove trajectory_<id>.jsonl with the session
session_gc.delete_orphan_tmpbooleantrueRemove age-gated orphan .luna_session_* / .luna_edit_* temps in the sessions dir

A candidate is the primary JSONL + rotations (.1/.2) + a stranded .rotate.tmp; deletion also covers SQLite rows (both FTS tables via the DELETE triggers), the JSON index entry, the optionally-included trajectory, and a stale .active lease. Content-addressed blobs, analytics, git snapshots, and session-scoped memory are explicit exclusions. Held leases, the current session, recent corpora, and symlinks are refused. See sessions.md for the operator contract and secure-deletion limits.

AI Permission Classifier (Ollama, client-side)

Defaults from client/core/ai_classifier.lua; env override LUNA_CLASSIFIER_ENABLED.

KeyTypeDefaultDescription
classifier.enabledbooleanfalseEnable AI permission classifier
classifier.modelstringqwen2.5-coder:7bOllama model for classification
classifier.base_urlstringhttp://localhost:11434Ollama API base URL
classifier.confidence_thresholdfloat0.85Minimum confidence for auto-decision
classifier.timeoutinteger5Request timeout in seconds
classifier.cache_sizeinteger64LRU decision cache entries

Worker metrics exposition

Luna can expose a loopback-only Prometheus text endpoint for worker-local health (client/core/metrics_exposition.lua). It binds 127.0.0.1 only — any other host is refused — and serves GET /metrics with a bounded request/accept posture. Families: sandbox zero-layer spawns/refusals, tool errors, memory entries/bytes/flush-unlocked, and FTS rebuilds. This is worker-local: the scrape target/wiring is a deployment decision (there is no central Sol claim over Luna metrics).

{ "metrics_port": 9477 }

metrics_port = nil (the default) keeps the endpoint off. A port below 1024 requires privileges; prefer an unprivileged port and a per-worker offset when multiple workers share a host.

Keymaps (~/.luna/keymaps.json)

Customize TUI key bindings. Overrides defaults for specified modes.

{
  "normal": { "Ctrl+P": "command" },
  "input": { "Ctrl+A": "beginning_of_line" }
}

Modes: normal, input, search, menu. View all bindings with /keymaps TUI command.

Memory Taxonomy

Memory extractor uses 4 types: fact, preference, procedure, relationship. Consolidator deduplicates within each category.

TUI Commands

CommandDescription
/compactCompact entire session
/compact --from <id>Compact messages before the specified entry
/compact --up-to <id>Compact messages up to and including the specified entry
/keymapsDisplay all key bindings

Search Providers

ProviderAuthNotes
duckduckgoNoneDefault, HTML scraping
searxngNoneSelf-hosted, requires web_search_url config (loopback targets refused at the egress gate)
braveAPI keySet brave_api_key in config
bingNoneHTML scraping, no API key needed

Example Configurations

Development (Single Machine)

%% config/sys.config
[
  {sol, [
    {http_port, 21434},
    {http_ip, "127.0.0.1"},
    {llama_server_path, "/usr/src/llama.cpp/llama-server"},
    {model_source_dir, "/fun/models"},
    {model_store_dir, "/tmp/sol/models"},
    {zmq_enabled, true},
    {max_workers, 4}
  ]}
].

Production (Cluster Node)

%% config/sys.prod.config
[
  {sol, [
    {http_port, 21434},
    {http_ip, "0.0.0.0"},
    {llama_server_path, "/usr/local/bin/llama-server"},
    {model_source_dir, "/mnt/nfs/models"},
    {model_store_dir, "/var/lib/sol/models"},
    {worker_path, "/opt/sol/etc/luna"},
    {max_workers, 32},
    {cluster_nodes, ['sol@gpu-node-2', 'sol@gpu-node-3']},
    {zmq_enabled, true},
    {zmq_bind_addr, "0.0.0.0"}
  ]}
].
## config/vm.prod.args
-name sol@gpu-node-1
-setcookie production_secret_cookie
+A 8
+S 8
+K true
+zdbbl 32768

Luna (User Config)

// ~/.luna/config.json
{
  "model": "glm-5.1",
  "provider": {
    "type": "anthropic",
    "api_key": "sk-..."
  },
  "permission_mode": "auto",
  "theme": "onedark",
  "classifier": {
    "enabled": true,
    "model": "qwen2.5-coder:7b",
    "confidence_threshold": 0.85,
    "timeout": 5,
    "cache_size": 64
  }
}

Custom Agent Modes

Agent modes are defined as JSON or Markdown files in ~/.luna/agents/ or .luna/agents/.

JSON Format

{
  "name": "security-review",
  "display": "Security",
  "description": "Security-focused code review mode",
  "badge": "S",
  "color": "red",
  "category": "primary",
  "permissions": {
    "*": "deny",
    "read_file": "allow",
    "grep_search": "allow",
    "glob_search": "allow",
    "bash": { "default": "ask", "patterns": { "npm audit*": "allow" } }
  },
  "tool_filter": "all",
  "model": "glm-5.1",
  "max_steps": 25
}

Markdown Format


name: security-review
display: Security
description: Security-focused code review mode
badge: S
color: red
category: primary
permissions:
  "*": deny
  read_file: allow
  grep_search: allow
  glob_search: allow
tool_filter: all
model: glm-5.1
max_steps: 25


# System Prompt

You are a security-focused code reviewer...

Mode Definition Fields

FieldTypeRequiredDescription
namestringYesUnique mode identifier (lowercase, hyphens)
displaystringYesDisplay name in TUI
descriptionstringYesOne-line description
badgestringNoSingle-char TUI badge (auto-assigned if missing)
colorstringNoTUI color name
categorystringNoprimary (Tab-cyclable) or secondary
permissionsobjectNoPer-tool ruleset (see permissions.md)
tool_filterstringNoall or tool list
modelstringNoOverride model for this mode
temperaturefloatNoOverride temperature
max_stepsintegerNoOverride max iterations
system_promptstringNoAdditional system prompt section (Markdown body)

Ollama Integration

Server-Side (Sol)

Ollama is auto-discovered at http://localhost:11434 (ollama_url). Models registered via sol_provider_boot with the ollama atom mapping; the model list refreshes every 5 minutes.

Client-Side (Luna Classifier)

See AI Permission Classifier above — classifier.* keys with defaults from ai_classifier.lua.

These are separate config namespaces with their own sources of truth — not part of the sol app env or the Luna merge, so they are not tabulated here:

SurfaceWhereNotes
Mango (identity service)mango/conf.py + envOwn settings module; Sol-side bridge keys (mango_*) are in Auth / Security above
Limon (ops console)limon/ build env (VITE_*)Client-side build-time env, not runtime Sol config. The one Sol-side CORS knob is limon_origin
zerg-cli (operator binary)own config file + envSee zerg-cli/ docs / zerg status
Production injectionrunit env files /etc/sv/zerg-sol/env/ (wild blueprint)SOL_* env vars are the primary production surface — see wild/AGENTS.md