AuditEntry serializes all fields to JSON

Tests › tests/unit/storage/audit_entry_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/storage/audit_entry_test.cpp:37 · its file's page

What it checks (10)

  1. REQUIRE(j["caller_id"] == "eng") observes audit_entry_to_json via j
  2. REQUIRE(j["tool_name"] == "filesystem.write_file") observes audit_entry_to_json via j
  3. REQUIRE(j["params"]["path"] == "/src/main.cpp") observes audit_entry_to_json via j
  4. REQUIRE(j["result"]["status"] == "success") observes audit_entry_to_json via j
  5. REQUIRE(j["result"]["content"] == "Wrote 5 bytes to /src/main.cpp") observes audit_entry_to_json via j
  6. REQUIRE(j["result"]["elapsed_ms"] == Catch::Approx(8.3)) observes audit_entry_to_json via j
  7. REQUIRE(j["directives"].size() == 1) observes audit_entry_to_json via j
  8. REQUIRE(j["delegation_depth"] == 1) observes audit_entry_to_json via j
  9. REQUIRE(j["iteration"] == 5) observes audit_entry_to_json via j
  10. REQUIRE(j["parent_conversation_id"] == "a1b2c3d4-parent") observes audit_entry_to_json via j

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

AuditEntry serializes all fields to JSON→make_test_entry→WHEN→audit_entry_to_json→REQUIRE

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.

AuditEntry serializes all fields to JSON · 10 checksWHENfailure_detailREQ-API-012 · inferredaudit_entry_to_jsonREQ-STOR-008 · inferred
Also reaches 2 requirements

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