[codex] add chat template conformance tests
Summary
Adds focused chat-template conformance fixtures for modern instruct templates without model inference. The new cases load existing template fixtures and compare golden output for Qwen3 and Bielik coverage across empty and repeated system messages, Unicode, reasoning tags/content, tool calls/tool responses, BOS handling, and trailing assistant prefixes.
Also sets the test-chat-template CTest working directory to the repository root so fixture-backed tests can load models/templates reliably.
Validation
Before changes:
./build/bin/test-chat-templatepassed after configuring the local CLT libc++ include workaround.
After changes:
CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX26.2.sdk/usr/include/c++/v1 cmake --build build --target test-chat-template -j 8./build/bin/test-chat-templatectest --test-dir build -R test-chat-template -Vgit diff --check
Note: this local macOS CLT installation requires CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX26.2.sdk/usr/include/c++/v1 because clang's default libc++ header path is empty.
Wave 1 evidence bundle update:
PR: ggml-org/llama.cpp#22449
Linked issue: N/A
Base SHA: 665abc609740d397d30c0d8ef4157dbf900bd1a3
Current PR-head SHA: e16eedbcca1eb8a463c6a85e6c68ab4af8c14b6f
Fixed-head SHA, if changed: N/A
Exact commands recorded in the PR body:
CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX26.2.sdk/usr/include/c++/v1 cmake --build build --target test-chat-template -j 8
./build/bin/test-chat-template
ctest --test-dir build -R test-chat-template -V
git diff --check
Environment: CPU template/CTest environment from the PR validation notes; A100/GPU is irrelevant.
A100 category: A100_IRRELEVANT.
Base result: existing test-chat-template passed before changes after the local CLT include workaround.
Current PR-head result: added fixture-backed chat-template conformance coverage and set the CTest working directory to repo root.
Tests added/changed: tests/test-chat-template.cpp, tests/CMakeLists.txt.
Tests passed: test-chat-template, CTest test-chat-template, git diff --check per PR body.
Side-effect controls: synthetic fixtures only; no model inference or runtime quality claim.
Raw logs/artifacts: PR body contains commands/results; no separate raw log file is attached in this comment.
Remaining risks: synthetic/template-only coverage; no model runtime behavior is validated or claimed.
Can say “Fixes #issue”: no linked issue closure claimed.
Safe wording: “Adds synthetic chat-template conformance coverage; does not claim a runtime/model fix.”
Readiness status: ready-now for synthetic conformance coverage if PR-body log excerpts are accepted; otherwise standalone CTest raw logs remain to attach.
Marked ready for review. Validation evidence and narrowed claim wording are already attached in the PR discussion/body. This PR is ready under the scoped claim described in the PR.
Ready for maintainer review as synthetic/test-only coverage. This does not claim a runtime/model fix.