test_run_json_carries_the_tool_identity

Tests › tests/test_acceptance_identity.py

passed Passed in the packaged run.

What this test is for

Why it exists

A reader holding only `answers/` must still be able to attribute the numbers. Provisioning records the same fields, but its file sits beside a gitignored database and a run assembled over several windows may be re-provisioned between them.

Given

  1. monkeypatch.setattr(cli, "check_revision", lambda *_a, **_k: None)
  2. monkeypatch.setattr(cli, "check_tool_tree", lambda *_a, **_k: None)
4 more
  1. monkeypatch.setattr( cli, "run_cell", lambda cell, *_a, **_k: execute.CellResult( cell.stem(), cell.arm, cell.model, True, tool_calls=1 ), )
  2. rubric = Path(__file__).resolve().parent.parent / "acceptance/targets/freertos/questions.yaml"
  3. out = tmp_path / "answers"
  4. args = cli.argparse.Namespace( rubric=rubric, ## FIXTURE, NOT BEHAVIOUR. This said `m` (resp. `sonnet`) until `--models` began ## refusing an alias. What this test guards is unchanged; only the example string ## had to become a real pinned id to reach the code under test. models=["claude-sonnet-4-5-20250929"], replicates=1, seed=7, repo=tmp_path, out=out, mcp_config=None, timeout=60, resume=False, )
→

When

  1. cli.cmd_generate(args)
  2. got = json.loads((out / "run.json").read_text())
→

Then

  1. ✓ cli.cmd_generate(args) equals 0
  2. ✓ got["clew_build_version"] equals str(identity.CLEW_BUILD_VERSION)
  3. ✓ got contains "substrate_languages"

tests/test_acceptance_identity.py:116 · its file's page

What it checks (3)

  1. assert cli.cmd_generate(args) == 0 observes cmd_generate
  2. assert got["clew_build_version"] == str(identity.CLEW_BUILD_VERSION) not attributed
  3. assert "substrate_languages" in got 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

test_run_json_carries_the_tool_identity→cmd_generate

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.

test_run_json_carries_the_tool_identity · 3 checkscmd_generatetool_identity_substratecompiled_languagesREQ-DDB-PIPE-012 · inferred
Also reaches 1 requirement

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