gh#164: release evicts the model and the next use brings it back

Tests › tests/unit/inference/release_model_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/release_model_test.cpp:105 · its file's page

What it checks (17)

  1. REQUIRE(orch.initialize(config)) observes initialize
  2. REQUIRE(orch.loaded_models().size() == 1) observes loaded_models
  3. CHECK(rc == ENTROPIC_OK) observes release_models via rc
  4. CHECK(log.count(ModelOrchestrator::ResidencyEvent::Evicted) == 1) not attributed
  5. REQUIRE_FALSE(log.tiers.empty()) not attributed
  6. CHECK(log.tiers.front() == "lead") not attributed
  7. CHECK(orch.loaded_models().empty()) observes loaded_models
  8. CHECK(orch.last_used_tier().empty()) observes last_used_tier
  9. CHECK(orch.residency_snapshot_json() .find("\"tier\":\"lead\"") == std::string::npos) observes residency_snapshot_json
  10. REQUIRE(model != nullptr) not attributed
  11. CHECK(log.count( ModelOrchestrator::ResidencyEvent::Loaded) == 1) not attributed
  12. CHECK(orch.loaded_models().size() == 1) observes loaded_models
  13. CHECK(again == ENTROPIC_OK) observes release_models via again
  14. CHECK(log.events.empty()) not attributed
  15. CHECK(rc == ENTROPIC_OK) observes release_models via rc
  16. CHECK(log.count(ModelOrchestrator::ResidencyEvent::Evicted) == 1) not attributed
  17. CHECK(orch.loaded_models().empty()) observes loaded_models

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

gh#164: release evicts the model and the next use brings it back→small_model→one_tier→REQUIRE→initialize→loaded_models→observe→WHEN→release_models→last_used_tier→residency_snapshot_json→clear→ensure_model→shutdown

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.

gh#164: release evicts the model and the next use brings it back · 17 checksWHENfailure_detailREQ-API-012 · inferredshutdownREQ-INFER-002 · inferredinitializeload_bundled_grammarsload_bundledREQ-INFER-007 · inferredinitializecreate_tier_backendscreate_adapterREQ-INFER-012 · inferredensure_modelREQ-INFER-019 · inferredshutdownREQ-INFER-020 · inferredrelease_modelsrelease_backendrelease_handles_for_modelREQ-INFER-023 · inferred
Also reaches 7 requirements

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