test_run_json_carries_the_tool_identity¶
Tests › tests/test_acceptance_identity.py
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
monkeypatch.setattr(cli, "check_revision", lambda *_a, **_k: None)monkeypatch.setattr(cli, "check_tool_tree", lambda *_a, **_k: None)
4 more
monkeypatch.setattr( cli, "run_cell", lambda cell, *_a, **_k: execute.CellResult( cell.stem(), cell.arm, cell.model, True, tool_calls=1 ), )rubric = Path(__file__).resolve().parent.parent / "acceptance/targets/freertos/questions.yaml"out = tmp_path / "answers"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
cli.cmd_generate(args)got = json.loads((out / "run.json").read_text())
Then
- ✓ cli.cmd_generate(args) equals 0
- ✓ got["clew_build_version"] equals str(identity.CLEW_BUILD_VERSION)
- ✓ got contains "substrate_languages"
tests/test_acceptance_identity.py:116 · its file's page
What it checks (3)
assert cli.cmd_generate(args) == 0observescmd_generateassert got["clew_build_version"] == str(identity.CLEW_BUILD_VERSION)not attributedassert "substrate_languages" in gotnot 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_generateWhat 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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-012 inferred