Two independent resolution stacks share the same env > TOML > default precedence but live in different modules:
- the proxy’s
MultiConfig::resolve, which produces oneCliper listener - and the Hermes/FFI
Configloader, whoseapply_compressionwrites straight intoAphroditeState.
Both read the same aphrodite.toml; nearly the whole schema is consumed at runtime, with a small residual set that stays parsed-but-inert (catalog_mode, code_structure_map, rust_preview_lines, classifier_poll).
Precedence flowchart
Live vs inert keys
Precedence subtleties:
- The proxy’s
resolvedeliberately givesmode/listenno blanket env override - a process-wideAPHRODITE_MODE/APHRODITE_LISTENwould clobber every[[proxies]]entry and break the cache/token split. Port overrides stay per-mode (APHRODITE_CACHE_PORT/APHRODITE_TOKEN_PORT). apply_compressionmaps the FFI state’stool_thresholdto thetool_threshold_tokenTOML key and theAPHRODITE_TOOL_THRESHOLD_TOKENenv var. The oldtool_thresholdnames shipped in no TOML, so wiring them as-is would have silently resolved to the default forever.env_boolaccepts1/true(case-insensitive) as truthy and everything else as false;env_parse_warnwarns loudly on a present-but-malformed numeric override instead of silently defaulting.[previews] preview_max_charscaps rendered previews (envAPHRODITE_PREVIEW_MAX_CHARSwins over TOML; shipped default0= no cap). It is applied at proxy startup and whenever the FFI config is (re)loaded - a dylib reload re-applies it, andPOST /reloadre-applies it to the proxy, but the config-file watcher does not.- The config-file watcher reacts to
Modifyevents onaphrodite.toml(500 ms debounce), reloads the file, and stores the four resolved thresholds (cache,token,inline,code_multiplier) into every liveAppState’s atomics. Nothing else is updated live.