REQ-CFG-001: Layered configuration resolution with most-specific-layer-wins precedence

← Requirements

What it requires

  1. GIVEN a global config declaring lead.gpu_layers=40, adapter=qwen35 and an eng tier, WHEN a project config that sets only gpu_layers=20 is overlaid, THEN gpu_layers becomes 20 while adapter and the eng tier are preserved.
  2. GIVEN a consumer-defaults file with log_level WARN and a project file with log_level ERROR, WHEN load_layered runs, THEN log_level is ERROR and the consumer's tier values survive where the project did not restate them.
  3. GIVEN ENTROPIC_LOG_LEVEL / ENTROPIC_MODELS__DEFAULT / ENTROPIC_ROUTING__* / ENTROPIC_COMPACTION__* / ENTROPIC_VRAM_RESERVE_MB / ENTROPIC_CONFIG_DIR are set, WHEN load runs, THEN each overrides the file-derived value; WHEN unset, THEN the config is left unchanged (no clobbering with empty).
  4. Every public entry runs parse -> env overrides -> validate in that order, and a parse error short-circuits before validation.
tier
NOT_RUN

Where it lives

  • src/config16
  • src/facade2

See it on the map

How it is met

implemented byresults (141 tests)apply_envapply_env_overridesapply_mcp_external_envdo_configure_direntropic_configure_dirload_configload_config_from_fileload_config_from_stringload_config_layersload_consumer_layerload_global_layerload_layeredload_project_layerparse_config_fileparse_config_stringparse_models_configresolve_consumer_defaultsvalidate_workspace_app_context141 absent141 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (141)

Reached through calls

141 tests: 141 absent

testresultlinked byimplementers exercisedcalls away
entropic_configure_dir on /dev/null subpath returns an error, not an exceptionabsentinferred13 of 181
entropic_configure_dir on a tmp dir runs the loader pathabsentinferred13 of 181
entropic_configure_dir rejects NULL handleabsentinferred13 of 181
entropic_configure_dir with empty string path returns an error code, not an exceptionabsentinferred13 of 181
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred13 of 181
gh#144: concurrent bridge clients queue instead of racingabsentinferred13 of 181
gh#163 entropic_configure_dir carries app_contextabsentinferred13 of 181
gh#163 the object and false spellings survive configure_dir tooabsentinferred13 of 181
gh#95: identity grammar: field constrains that tier's outputabsentinferred13 of 181
gh#133 fallout: the bundled default must not clobber explicit layersabsentinferred11 of 181
gh#133 mcp.plugins parses into MCPConfig::pluginsabsentinferred11 of 181
load_layered overlays a project config.local.yaml when presentabsentinferred11 of 181
load_layered's consumer-defaults layer overlays before projectabsentinferred11 of 181
load_config drives global + project + env + validate chainabsentinferred8 of 181
A tier selects a bundled model by family/size/quantabsentinferred7 of 181
gh#108 (v2.10.0): speculative.mtp and static grammar can coexist absentinferred7 of 181
gh#148: gpu_layers accepts a count or the word autoabsentinferred7 of 181
gh#153 #42(iii): cpu_moe_layers parses, and is absent by defaultabsentinferred7 of 181
gh#157: models.defer_load parses and is not mistaken for a tierabsentinferred7 of 181
gh#211: malformed YAML is a returned error, never an abortabsentinferred7 of 181
gh#94: per-tier sampler knobs parse from YAML into TierConfigabsentinferred7 of 181
load_config_from_file forwards file errors through the chainabsentinferred7 of 181
load_config_from_file is the single-file public entryabsentinferred7 of 181
load_config_from_string drives parse_config_string + validateabsentinferred7 of 181
Comprehensive config exercises every parse_* helperabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Consumer models block replaces global tiersabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
ENTROPIC_COMPACTION__ENABLED toggles compactionabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_COMPACTION__THRESHOLD_PERCENT overrides thresholdabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_CONFIG_DIR overrides config_dir pathabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_LOG_LEVEL overrides configabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_MODELS__DEFAULT overrides default tierabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_ROUTING__ENABLED overrides routing flagabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_ROUTING__FALLBACK_TIER overrides fallbackabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
ENTROPIC_VRAM_RESERVE_MB overrides VRAM reserveabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
Empty config file returns descriptive errorabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Layered merge — project overlays globalabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Non-map YAML root returns errorabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Nonexistent config file returns errorabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Parse config with tiersabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Parse minimal configabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Scalar YAML root returns errorabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
Unset env vars leave config unchangedabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
gh#160 delegation.isolation parses, and a bad mode is refusedabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
outside-root: the SHIPPED default config no longer hands the model absentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
parse_bool accepts every truth aliasabsentinferred3 of 18: apply_env, apply_env_overrides, apply_mcp_external_env1
parse_config_file rejects missing file with read errorabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context1
gh#158: interrupting one session leaves the other runningabsentinferred13 of 182
gh#158: metrics and context reads are safe during live runsabsentinferred13 of 182
gh#158: two concurrent sessions do not bleed into each otherabsentinferred13 of 182
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred13 of 182
gh#165 + gh#164: release the weights, keep the conversationabsentinferred13 of 182
gh#165: a dropped session restored from JSON keeps answeringabsentinferred13 of 182
gh#166: two workspaces on one handle do not read each other's absentinferred13 of 182
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred13 of 182
gh#179: each workspace's sessions answer from its own app_context, absentinferred13 of 182
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred13 of 182
gh#194: a plain generation publishes the prefill it performedabsentinferred13 of 182
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred13 of 182
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred13 of 182
gh#214: a prompt that does not fit fails the turn, typedabsentinferred13 of 182
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred13 of 182
gh#217: release is refused while another session is decodingabsentinferred13 of 182
gh#93: autoparser family parses a multi-parameter tool callabsentinferred13 of 182
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred13 of 182
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred13 of 182
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred13 of 182
outside-root optional: a real model's reads outside its root absentinferred13 of 182
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred13 of 182
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred13 of 182
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred13 of 182
v2.14.5: a failed turn is an error carrying only its own textabsentinferred13 of 182
gh#163 a top-level app_context path survives the config layersabsentinferred11 of 182
Classification runs the router and yields a configured tierabsentinferred8 of 182
Cleared classification_prompt makes routing a no-op (RED control)absentinferred8 of 182
gh#141 app_context carries inline contentabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context2
gh#141 every existing app_context spelling keeps its meaningabsentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context2
mcp.bash.timeout_seconds parses, defaults to 30, and refuses a absentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context2
mcp.filesystem outside_root_allow / outside_root_deny parse as absentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context2
mcp.filesystem.allow_outside_root is tri-state and defaults to absentinferred3 of 18: parse_config_file, parse_models_config, validate_workspace_app_context2
gh#106 MTP routes through orchestrator->generate()absentinferred8 of 183
gh#108 (v2.10.0) a request-level grammar routes to MTP on an absentinferred8 of 183
gh#108 (v2.10.3) CONTROL: non-streaming generate on the same tierabsentinferred8 of 183
gh#108 (v2.10.3) CONTROL: plain-decode streaming on the same tierabsentinferred8 of 183
gh#108 (v2.10.3) MTP + grammar + streaming through absentinferred8 of 183
gh#108 (v2.10.3) MTP + streaming without a grammar still streamsabsentinferred8 of 183
gh#108 CPU-only feasibility: E2B-QAT-Q4 x MTP x flash+q4KV, absentinferred8 of 183
gh#108 MTP engages with tools staged through orchestrator (agent loop)absentinferred8 of 183
gh#108 MTP loud error propagates through orchestrator (no fallback)absentinferred8 of 183
gh#108 agentic benchmark: full 24-config permutation matrix absentinferred8 of 183
gh#108 per-tier speculative_mtp=false overrides the global flagabsentinferred8 of 183
gh#134 (v2.10.4) A/B: the knob, not the model, produces the callabsentinferred8 of 183
gh#134 (v2.10.4) multi-turn: rails hold past the stall onsetabsentinferred8 of 183
gh#134 (v2.10.4) require_tool_call forces a tool call under MTPabsentinferred8 of 183
gh#137 a toolless enable_thinking:false turn must not deliver absentinferred8 of 183
testRunStartingabsentinferred8 of 183
Configure with null JSON returns errorabsentinferred7 of 183
Double-configure on one handle is refusedabsentinferred7 of 183
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred7 of 183
Three handles can coexistabsentinferred7 of 183
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred7 of 183
Two handles configure independentlyabsentinferred7 of 183
entropic_configure called twice on the same handle returns ALREADY_CONFIGUREDabsentinferred7 of 183
entropic_configure rejects NULL config_jsonabsentinferred7 of 183
entropic_configure rejects NULL handleabsentinferred7 of 183
entropic_configure_from_file rejects NULL handleabsentinferred7 of 183
entropic_configure_from_file rejects NULL pathabsentinferred7 of 183
entropic_configure_from_file rejects missing fileabsentinferred7 of 183
entropic_last_error reflects most-recent operation failureabsentinferred7 of 183
entropic_last_error returns per-handle state (v2.2.6)absentinferred7 of 183
entropic_register_mcp_server on a configured handle absentinferred7 of 183
entropic_run_messages with console logging disabled still absentinferred7 of 183
entropic_seconds_since_last_activity returns 0 before any run absentinferred7 of 183
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred7 of 183
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 26B-A4B absentinferred7 of 183
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 E4B absentinferred7 of 183
gh#154 a tier grammar stem that cannot resolve YET still absentinferred7 of 183
gh#154 a tier grammar stem that resolves still configuresabsentinferred7 of 183
gh#154 a tier with no grammar is unaffectedabsentinferred7 of 183
gh#154 entropic_metrics_json carries a generations arrayabsentinferred7 of 183
gh#156 a frontmatter-less app_context fails configure absentinferred7 of 183
gh#156 a frontmatter-less constitution fails configure tooabsentinferred7 of 183
gh#156 a missing app_context path fails configureabsentinferred7 of 183
gh#156 a well-formed app_context file still configuresabsentinferred7 of 183
gh#156 app_context false still configuresabsentinferred7 of 183
gh#156 inline app_context content still configuresabsentinferred7 of 183
gh#158 entropic_interrupt_session targets exactly one runabsentinferred7 of 183
gh#163 entropic_configure carries app_context into ParsedConfigabsentinferred7 of 183
gh#163 entropic_configure_from_file carries app_contextabsentinferred7 of 183
gh#164 entropic_release_model names an unknown tierabsentinferred7 of 183
gh#164 entropic_release_model refuses to unload mid-turnabsentinferred7 of 183
gh#165 entropic_session_context_set guards its preconditionsabsentinferred7 of 183
gh#165 entropic_session_context_set refuses the running sessionabsentinferred7 of 183
gh#165 entropic_session_context_set round-trips through the C ABIabsentinferred7 of 183
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred7 of 183
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 131072 contextabsentinferred7 of 183
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 32768 contextabsentinferred7 of 183
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 65536 contextabsentinferred7 of 183
gh#203: followup returns delegation_id and summary from real storageabsentinferred7 of 183
gh#204: an unservable http_port fails configure loudlyabsentinferred7 of 183
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred7 of 183
gh#193: what cold prefill costs at each residency levelabsentinferred7 of 184

Flows through it