interface_factory: wiring + iface_* surface sweep

Tests › tests/unit/inference/interface_factory_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/inference/interface_factory_test.cpp:37 · its file's page

What it checks (32)

  1. REQUIRE(fx.iface.generate != nullptr) not attributed
  2. REQUIRE(fx.iface.generate_stream != nullptr) not attributed
  3. REQUIRE(fx.iface.route != nullptr) not attributed
  4. REQUIRE(fx.iface.complete != nullptr) not attributed
  5. REQUIRE(fx.iface.parse_tool_calls != nullptr) not attributed
  6. REQUIRE(fx.iface.is_response_complete != nullptr) not attributed
  7. REQUIRE(fx.iface.free_fn != nullptr) not attributed
  8. REQUIRE(fx.iface.backend_data == fx.ctx) not attributed
  9. REQUIRE(fx.iface.generate( R"([{"role":"user","content":"hi"}])", full, &out, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  10. REQUIRE(fx.iface.generate( nullptr, nullptr, &out, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  11. REQUIRE(fx.iface.generate( "not json", "also not", &out, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  12. REQUIRE(fx.iface.generate( "[]", "[1,2,3]", &out, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  13. REQUIRE(fx.iface.generate( "[]", R"({"max_tokens":1})", &out, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  14. REQUIRE(fx.iface.generate_stream( R"([{"role":"user","content":"x"}])", R"({"max_tokens":1})", [](const char*, size_t, void*) {}, nullptr, &cancel, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  15. REQUIRE(fx.iface.generate_stream( "[]", "{}", [](const char*, size_t, void*) {}, nullptr, &pre, fx.iface.backend_data) == ENTROPIC_ERROR_GENERATE_FAILED) not attributed
  16. REQUIRE(fx.iface.route( R"([{"role":"user","content":"x"}])", &out, fx.iface.backend_data) == 0) not attributed
  17. REQUIRE(out != nullptr) not attributed
  18. REQUIRE(fx.iface.complete( "prompt", R"({"tier":"override"})", &out, fx.iface.backend_data) == 0) not attributed
  19. REQUIRE(fx.iface.complete( "p", nullptr, &out, fx.iface.backend_data) == 0) not attributed
  20. REQUIRE(fx.iface.parse_tool_calls( "raw", &cleaned, &calls, fx.iface.backend_data) == 0) not attributed
  21. REQUIRE(std::string(cleaned) == "raw") not attributed
  22. REQUIRE(std::string(calls) == "[]") not attributed
  23. REQUIRE(fx.iface.parse_tool_calls( nullptr, &cleaned, &calls, fx.iface.backend_data) == 0) not attributed
  24. REQUIRE(std::string(cleaned).empty()) not attributed
  25. REQUIRE(fx.iface.is_response_complete( "x", nullptr, fx.iface.adapter_data) == 1) not attributed
  26. REQUIRE(fx.iface.is_response_complete( "x", "[]", fx.iface.adapter_data) == 1) not attributed
  27. REQUIRE(fx.iface.is_response_complete( "x", "{not}", fx.iface.adapter_data) == 1) not attributed
  28. REQUIRE(fx.iface.is_response_complete( "x", R"([{"name":"f","arguments":{}}])", fx.iface.adapter_data) == 0) not attributed
  29. REQUIRE(iface.parse_tool_calls( "<function=read_file>\n" "<parameter=path>config.yaml</parameter>\n" "<parameter=lines>10</parameter>\n</function>", &cleaned, &calls, iface.backend_data) == 0) observes build_orchestrator_interface via iface
  30. REQUIRE(cleaned != nullptr) not attributed
  31. REQUIRE(calls != nullptr) not attributed
  32. CHECK(std::string(calls) != "[]") 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

interface_factory: wiring + iface_* surface sweep→REQUIRE→destroy_orchestrator_interface→initialize→build_orchestrator_interface

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.

interface_factory: wiring + iface_* surface sweep · 32 checksbuild_orchestrator_interface… 7 calls …entropic_versionREQ-ABI-001 · inferredbuild_orchestrator_interface… 9 calls …entropic_session_bind_workspaceREQ-ABI-002 · inferredbuild_orchestrator_interface… 9 calls …entropic_last_errorREQ-API-003 · inferredbuild_orchestrator_interface… 9 calls …entropic_session_bind_workspaceREQ-API-005 · inferredbuild_orchestrator_interface… 9 calls …entropic_last_errorREQ-API-007 · inferredbuild_orchestrator_interface… 7 calls …entropic_versionREQ-API-008 · inferredbuild_orchestrator_interface… 10 calls …claim_exclusiveREQ-API-009 · inferredbuild_orchestrator_interface… 9 calls …handle_askREQ-API-012 · inferredbuild_orchestrator_interface… 5 calls …dispatchREQ-BRIDGE-001 · inferredinitializeactivate_routerensure_loadedload_and_activateREQ-INFER-002 · inferredbuild_orchestrator_interfaceiface_generate_streamgenerate_streamingREQ-INFER-005 · inferredbuild_orchestrator_interface… 7 calls …to_common_samplingREQ-INFER-006 · inferred

and 22 more requirement paths, listed below.

Also reaches 55 requirements

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