GBNF grammar constrains output to valid JSON

Tests › tests/model/test_grammar_constraint.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/model/test_grammar_constraint.cpp:21 · its file's page

What it checks (4)

  1. REQUIRE(g_ctx.initialized) not attributed
  2. REQUIRE_FALSE(parsed.is_discarded()) not attributed
  3. CHECK(parsed.contains("name")) not attributed
  4. CHECK(parsed.contains("age")) 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

GBNF grammar constrains output to valid JSON→REQUIRE→start_test_log→grammar_registry→test_gen_params→make_messages→WHEN→generate→end_test_log

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.

GBNF grammar constrains output to valid JSON · 4 checksgenerate… 8 calls …entropic_versionREQ-ABI-001 · inferredgenerate… 10 calls …entropic_session_bind_workspaceREQ-ABI-002 · inferredgenerate… 10 calls …entropic_last_errorREQ-API-003 · inferredgenerate… 10 calls …entropic_session_bind_workspaceREQ-API-005 · inferredgenerate… 10 calls …entropic_last_errorREQ-API-007 · inferredgenerate… 8 calls …entropic_versionREQ-API-008 · inferredWHENfailure_detailREQ-API-012 · inferredgenerate… 6 calls …dispatchREQ-BRIDGE-001 · inferredgenerate… 3 calls …unloadREQ-INFER-002 · inferredgenerate… 4 calls …generate_mtpREQ-INFER-005 · inferredgenerate… 7 calls …to_common_samplingREQ-INFER-006 · inferredgeneraterefuse_unresolved_tier_grammarREQ-INFER-007 · inferred

and 19 more requirement paths, listed below.

Also reaches 55 requirements

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