hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERROR¶
Tests › tests/unit/core/engine_test.cpp
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)
REQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_START))observeshasREQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_END))observeshasREQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_LOOP_ITERATION))observeshasREQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_CONTEXT_ASSEMBLE))observeshasREQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_STATE_CHANGE))observeshasREQUIRE(mock.generate_call_count == 0)not attributedREQUIRE(engine.last_loop_metrics().iterations < 5)observeslast_loop_metricsREQUIRE(result.back().content == "rewritten by hook")observesrunviaresultREQUIRE(v2310::has(cap.post, ENTROPIC_HOOK_POST_GENERATE))observeshasREQUIRE(result.back().content.find("\xC3\x28") == std::string::npos)observesrunviaresultREQUIRE_NOTHROW(arr.dump())not attributedREQUIRE(v2310::has(cap.info, ENTROPIC_HOOK_ON_ERROR))observeshas
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_loopWhat 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.
and 8 more requirement paths, listed below.
Also reaches 20 requirements
Its run touches their code; that is reach, not proof.
- REQ-COMPACT-001 inferred
- REQ-COMPACT-002 inferred
- REQ-DELEG-001 inferred
- REQ-DELEG-002 inferred
- REQ-DELEG-003 inferred
- REQ-DELEG-004 inferred
- REQ-DELEG-005 inferred
- REQ-DELEG-006 inferred
- REQ-HOOK-002 inferred
- REQ-IDEN-001 inferred
- REQ-IDEN-003 inferred
- REQ-INFER-026 inferred
- REQ-LOOP-001 inferred
- REQ-LOOP-002 inferred
- REQ-LOOP-003 inferred
- REQ-LOOP-004 inferred
- REQ-LOOP-005 inferred
- REQ-LOOP-006 inferred
- REQ-LOOP-007 inferred
- REQ-SAFE-001 inferred