gh#212: a completion call written as text is never the answer¶
Tests › tests/unit/api/final_text_test.cpp
What this test is for
Why it exists
The test says nothing about why.
tests/unit/api/final_text_test.cpp:330 · its file's page
What it checks (12)
CHECK(extract_final_text(convo, "What changed in the last commit?") == "The last commit locked down git.")observesextract_final_textCHECK(facade_text::is_completion_imitation( R"({"action":"complete","summary":"x"})"))observesis_completion_imitationCHECK_FALSE(facade_text::is_completion_imitation( "The action was complete."))observesis_completion_imitationCHECK_FALSE(facade_text::is_completion_imitation( R"({"action":"read","path":"x"})"))observesis_completion_imitationCHECK(extract_final_text(convo, nullptr, &names) == "Red")observesextract_final_textCHECK(facade_text::is_completion_imitation("git.log", &names))observesis_completion_imitationCHECK_FALSE(facade_text::is_completion_imitation( "Run git.log to see it.", &names))observesis_completion_imitationCHECK_FALSE(facade_text::is_completion_imitation("git.status", &names))observesis_completion_imitationCHECK(text.rfind("REASON", 0) == 0)observesfailure_detailviatextCHECK(text.find("did not complete") != std::string::npos)observesfailure_detailviatextCHECK(text.find("draft answer to Q2") != std::string::npos)observesfailure_detailviatextCHECK(text.find("\"action\"") == std::string::npos)observesfailure_detailviatext
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#212: a completion call written as text is never the answer→extract_final_text→is_completion_imitation→tool_names_of→WHEN→failure_detailWhat 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.