Comprehensive config exercises every parse_* helper

Tests › tests/unit/config/loader_test.cpp

absent Not in the packaged run: no test report names it.

What this test is for

Why it exists

The test says nothing about why.

tests/unit/config/loader_test.cpp:191 · its file's page

What it checks (103)

  1. REQUIRE(err.empty()) observes parse_config_file via err
  2. CHECK(config.log_level == "WARN") not attributed
  3. CHECK(config.inject_model_context == true) not attributed
  4. CHECK(config.vram_reserve_mb == 512) not attributed
  5. CHECK(config.ggml_logging == true) not attributed
  6. CHECK(config.llama_log_path == "/tmp/llama-custom.log") not attributed
  7. CHECK(config.console_logging == false) not attributed
  8. REQUIRE(config.constitution.has_value()) not attributed
  9. REQUIRE(config.app_context.has_value()) not attributed
  10. CHECK(config.models.default_tier == "lead") not attributed
  11. REQUIRE(config.models.router.has_value()) not attributed
  12. CHECK(config.models.router->adapter == "qwen35") not attributed
  13. CHECK(config.models.router->context_length == 8192) not attributed
  14. REQUIRE(config.models.tiers.count("lead") == 1) not attributed
  15. CHECK(lead.adapter == "qwen35") not attributed
  16. CHECK(lead.context_length == 131072) not attributed
  17. CHECK(lead.gpu_layers == 40) not attributed
  18. CHECK(lead.keep_warm == true) not attributed
  19. CHECK(lead.use_mlock == true) not attributed
  20. CHECK(lead.reasoning_budget == 2000) not attributed
  21. CHECK(lead.cache_type_k == "q8_0") not attributed
  22. CHECK(lead.cache_type_v == "q8_0") not attributed
  23. CHECK(lead.n_batch == 1024) not attributed
  24. CHECK(lead.n_ubatch == 256) not attributed
  25. CHECK(lead.n_threads == 8) not attributed
  26. CHECK(lead.tensor_split == "0.5,0.5") not attributed
  27. CHECK(lead.split_mode == "row") not attributed
  28. CHECK(lead.main_gpu == 1) not attributed
  29. CHECK(lead.offload_kqv == false) not attributed
  30. CHECK(lead.rope_freq_base == 100000.0f) not attributed
  31. CHECK(lead.rope_freq_scale == 0.5f) not attributed
  32. CHECK(lead.n_parallel == 4) not attributed
  33. CHECK(lead.flash_attn == true) not attributed
  34. REQUIRE(lead.allowed_tools.has_value()) not attributed
  35. CHECK(lead.allowed_tools->size() == 2) not attributed
  36. CHECK_FALSE(lead.mmproj_path.empty()) not attributed
  37. CHECK(config.routing.enabled == true) not attributed
  38. CHECK(config.routing.fallback_tier == "lead") not attributed
  39. REQUIRE(config.routing.classification_prompt.has_value()) not attributed
  40. CHECK(config.routing.classification_prompt->find( "Pick the right tier") != std::string::npos) not attributed
  41. CHECK(config.routing.tier_map.size() == 2) not attributed
  42. CHECK(config.routing.tier_map.at("code") == "eng") not attributed
  43. CHECK(config.routing.handoff_rules.size() == 2) not attributed
  44. CHECK(config.compaction.enabled == true) not attributed
  45. CHECK(config.compaction.threshold_percent == Catch::Approx(0.8f)) not attributed
  46. CHECK(config.compaction.preserve_recent_turns == 5) not attributed
  47. CHECK(config.compaction.summary_max_tokens == 512) not attributed
  48. CHECK(config.compaction.notify_user == true) not attributed
  49. CHECK(config.compaction.save_full_history == true) not attributed
  50. CHECK(config.compaction.tool_result_ttl == 10) not attributed
  51. CHECK(config.compaction.warning_threshold_percent == Catch::Approx(0.6f)) not attributed
  52. CHECK(config.permissions.allow.size() == 2) not attributed
  53. CHECK(config.permissions.deny.size() == 1) not attributed
  54. CHECK(config.permissions.auto_approve == true) not attributed
  55. CHECK(config.mcp.enable_entropic == true) not attributed
  56. CHECK(config.mcp.enable_filesystem == true) not attributed
  57. CHECK(config.mcp.enable_bash == false) not attributed
  58. CHECK(config.mcp.enable_git == true) not attributed
  59. CHECK(config.mcp.enable_diagnostics == true) not attributed
  60. CHECK(config.mcp.enable_web == true) not attributed
  61. CHECK(config.mcp.server_timeout_seconds == 30) not attributed
  62. CHECK_FALSE(config.mcp.working_dir.empty()) not attributed
  63. CHECK(config.mcp.filesystem.diagnostics_on_edit == true) not attributed
  64. CHECK(config.mcp.filesystem.fail_on_errors == false) not attributed
  65. CHECK(config.mcp.filesystem.diagnostics_timeout == 10) not attributed
  66. CHECK(config.mcp.filesystem.allow_outside_root == entropic::OutsideRootAccess::allow) not attributed
  67. CHECK(config.mcp.filesystem.max_read_context_pct == Catch::Approx(0.5f)) not attributed
  68. CHECK(config.mcp.filesystem.max_read_bytes == 65536) not attributed
  69. CHECK(config.mcp.filesystem.max_walk_entries == 1000) not attributed
  70. CHECK(config.mcp.external.enabled == true) not attributed
  71. CHECK(config.mcp.external.rate_limit == 100) not attributed
  72. REQUIRE(config.mcp.external.socket_path.has_value()) not attributed
  73. CHECK(config.mcp.external.ask_streaming == false) not attributed
  74. CHECK(config.mcp.external.tool_prefix == "sumac") not attributed
  75. CHECK(config.mcp.external.server_name == "sumac-reviewer") not attributed
  76. REQUIRE(config.mcp.external.tool_descriptions.count("ask") == 1) not attributed
  77. CHECK(config.mcp.external.tool_descriptions.at("ask") == "Review this repository against the documentation " "ruleset.") not attributed
  78. CHECK(config.mcp.external.tool_descriptions.at("status") == "Reviewer engine health.") not attributed
  79. CHECK(config.mcp.external.tool_descriptions.count("nope") == 0) not attributed
  80. CHECK(fresh.tool_prefix == "entropic") not attributed
  81. CHECK(fresh.server_name == "entropic") not attributed
  82. CHECK(fresh.tool_descriptions.empty()) not attributed
  83. CHECK(config.generation.max_tokens == 2048) not attributed
  84. CHECK(config.generation.default_temperature == Catch::Approx(0.5f)) not attributed
  85. CHECK(config.generation.default_top_p == Catch::Approx(0.85f)) not attributed
  86. CHECK(config.lsp.enabled == true) not attributed
  87. CHECK(config.lsp.python_enabled == true) not attributed
  88. CHECK(config.lsp.c_enabled == false) not attributed
  89. CHECK(config.prompt_cache.enabled == false) not attributed
  90. CHECK(config.prompt_cache.log_hits == false) not attributed
  91. CHECK(config.prompt_cache.max_bytes == 268435456) not attributed
  92. CHECK(config.inference.speculative.enabled == true) not attributed
  93. CHECK(config.inference.speculative.n_draft == 8) not attributed
  94. CHECK(config.inference.speculative.draft.context_length == 4096) not attributed
  95. CHECK(config.inference.speculative.draft.flash_attn == false) not attributed
  96. CHECK(config.constitutional_validation.enabled == true) not attributed
  97. CHECK(config.constitutional_validation.max_revisions == 2) not attributed
  98. CHECK(config.constitutional_validation.max_critique_tokens == 256) not attributed
  99. CHECK(config.constitutional_validation.temperature == Catch::Approx(0.2f)) not attributed
  100. CHECK(config.constitutional_validation.enable_thinking == false) not attributed
  101. CHECK(config.constitutional_validation.priority == 50) not attributed
  102. CHECK(config.constitutional_validation.grammar_key == "constitutional") not attributed
  103. CHECK(config.constitutional_validation.skip_tiers.size() == 1) not attributed

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

Comprehensive config exercises every parse_* helper→load_test_registry→WHEN→parse_config_file→test_data→REQUIRE

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Comprehensive config exercises every parse_* helper · 103 checksWHENfailure_detailREQ-API-012 · inferredparse_config_fileREQ-CFG-001 · inferredparse_config_fileparse_top_sectionsparse_models_configREQ-CFG-002 · inferredload_test_registryloadREQ-CFG-003 · inferredparse_config_fileparse_top_sectionsparse_models_configparse_model_configREQ-CFG-005 · inferredparse_config_fileREQ-CFG-006 · inferredparse_config_fileparse_top_sectionsparse_optional_sectionsparse_delegation_configREQ-DELEG-005 · inferredparse_config_file… 4 calls …parse_absolute_path_listREQ-MCP-021 · inferredparse_config_file… 5 calls …parse_bash_configREQ-MCP-023 · inferredparse_config_fileREQ-TYPE-005 · inferred
Also reaches 10 requirements

Its run touches their code; that is reach, not proof.