hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERROR

Tests › tests/unit/core/engine_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/core/engine_test.cpp:1718 · its file's page

What it checks (12)

  1. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_START)) observes has
  2. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_END)) observes has
  3. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_ITERATION)) observes has
  4. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_CONTEXT_ASSEMBLE)) observes has
  5. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_STATE_CHANGE)) observes has
  6. REQUIRE(mock.generate_call_count == 0) not attributed
  7. REQUIRE(engine.last_loop_metrics().iterations < 5) observes last_loop_metrics
  8. REQUIRE(result.back().content == "rewritten by hook") observes run via result
  9. REQUIRE(v2310::has(cap.post, ENTROPIC_HOOK_POST_GENERATE)) observes has
  10. REQUIRE(result.back().content.find("\xC3\x28") == std::string::npos) observes run via result
  11. REQUIRE_NOTHROW(arr.dump()) not attributed
  12. REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_ERROR)) observes has

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

hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERROR→make_mock_interface→set_hooks→make_hooks→run→make_messages→REQUIRE→has→last_loop_metrics→set_tier_resolution→run_loop

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.

hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERROR · 12 checksrunloopexecute_iterationcheck_compactionREQ-COMPACT-001 · inferredrunREQ-COMPACT-002 · inferredrun… 4 calls …execute_pending_pipelineREQ-DELEG-001 · inferredruninit_session_conversationREQ-DELEG-002 · inferredrun… 5 calls …finalize_delegation_resultREQ-DELEG-003 · inferredrun… 4 calls …execute_pending_pipelineREQ-DELEG-004 · inferredrun… 5 calls …resolve_session_rootREQ-DELEG-005 · inferredrun… 5 calls …resolve_resume_delegationREQ-DELEG-006 · inferredset_hooksREQ-HOOK-002 · inferredrunREQ-IDEN-001 · inferredrun… 4 calls …try_auto_chainREQ-IDEN-003 · inferredrun… 4 calls …handle_terminal_finish_reasonsREQ-INFER-026 · inferred

and 8 more requirement paths, listed below.

Also reaches 20 requirements

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