test_requirement_links.py¶
tests/test_requirement_links.py
`satisfies:` on a catalogue entry: requirements that satisfy other requirements (GH #68, P6b-2).
test_a_requirement_carries_both_directions_of_satisfies
None test_requirement_links.test_a_requirement_carries_both_directions_of_satisfies(Path tmp_path)
LIB-001 satisfies PRD-001 and PRD-002; PRD-001 is satisfied by LIB-001 and LIB-002.
tests/test_requirement_links.py:62
Checks
assert lib["satisfies"] == ["REQ-PRD-001", "REQ-PRD-002"], libassert lib["satisfied_by"] == []assert prd["satisfied_by"] == ["REQ-LIB-001", "REQ-LIB-002"], prdassert prd["satisfies"] == []
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CLI-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → report_stats |
| REQ-DDB-CLI-002 | inferred | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → _doxygen_or_partial → _doxygen_stage → _run_doxygen_from_args → run_doxygen → doxygen_supports_sqlite3 |
| REQ-DDB-CONFIG-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _apply_declared_document → stated_document_meta |
| REQ-DDB-CONFIG-003 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml → _is_flat_req_list |
| REQ-DDB-CONFIG-004 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_preprocessor |
| REQ-DDB-CONFIG-005 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig |
| REQ-DDB-CONFIG-006 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _recorded_entry_patterns → recorded_explicit |
| REQ-DDB-CONFIG-007 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-CONFIG-009 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _apply_toolchain_exclusions → load_toolchain_config |
| REQ-DDB-GUARD-012 | inferred | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_guard_config → read_guard_config → read_requirements_section |
| REQ-DDB-GUARD-019 | inferred | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → parse_doxygen_tags |
| REQ-DDB-GUARD-024 | inferred | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → apply_autobrief |
| REQ-DDB-INDEX-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _verify_extra_input_is_read → effective_file_patterns |
| REQ-DDB-INDEX-002 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → build_lock |
| REQ-DDB-INDEX-003 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → report_index_coverage |
| REQ-DDB-INDEX-004 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols |
| REQ-DDB-INDEX-005 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → stamp_external_provenance |
| REQ-DDB-INDEX-006 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_code_text → code_text_rows |
| REQ-DDB-INDEX-007 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_owners |
| REQ-DDB-INDEX-008 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_licenses |
| REQ-DDB-INDEX-009 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc |
| REQ-DDB-INDEX-010 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes |
| REQ-DDB-INDEX-011 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_property_keys |
| REQ-DDB-MCP-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _operator_excludes → meta_section |
| REQ-DDB-MCP-003 | measured | |
| REQ-DDB-MCP-004 | measured | |
| REQ-DDB-PIPE-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_database |
| REQ-DDB-PIPE-003 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_call_edges |
| REQ-DDB-PIPE-004 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → python_entry_seeds |
| REQ-DDB-PIPE-005 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-PIPE-006 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → run_rustdoc → _require_nightly_rustdoc → clean_subprocess_env |
| REQ-DDB-PIPE-007 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig_gates |
| REQ-DDB-PIPE-008 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs |
| REQ-DDB-PIPE-009 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → prune_dominated_fuzzy_call_edges |
| REQ-DDB-PIPE-010 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _build_inferred_edges |
| REQ-DDB-PIPE-011 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes → run_harvest → _harvest_one_file → _parseable_file |
| REQ-DDB-PIPE-012 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_harvest_plan → js_symbol_harvester |
| REQ-DDB-PIPE-013 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings |
| REQ-DDB-PIPE-014 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc → within_repo |
| REQ-DDB-PIPE-015 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_config_defaults |
| REQ-DDB-QUERY-001 | measured | |
| REQ-DDB-QUERY-003 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → mark_test_scope |
| REQ-DDB-QUERY-004 | measured | |
| REQ-DDB-QUERY-010 | measured | |
| REQ-DDB-QUERY-011 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads → _ensure_threads_tables |
| REQ-DDB-QUERY-012 | measured | |
| REQ-DDB-QUERY-013 | measured | |
| REQ-DDB-QUERY-014 | measured | |
| REQ-DDB-SCHEMA-001 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads |
| REQ-DDB-SCHEMA-002 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _writer_dispatch_map |
| REQ-DDB-SCHEMA-003 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-004 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest |
| REQ-DDB-SCHEMA-005 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_key_alias_prefixes |
| REQ-DDB-SCHEMA-006 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-SCHEMA-007 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-009 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_event_edges |
| REQ-DDB-SCHEMA-011 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_context_conflicts |
| REQ-DDB-SCHEMA-012 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest → declaration_origin |
| REQ-DDB-SCHEMA-013 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_data_model_keys |
| REQ-DDB-SCHEMA-014 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs → ensure_file_docs_table |
| REQ-DDB-SCHEMA-015 | measured | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-WIKI-054 | inferred | test_a_requirement_carries_both_directions_of_satisfies → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols → _recover_into → all |
Source · 11 lines
def test_a_requirement_carries_both_directions_of_satisfies(tmp_path: Path) -> None:
"""@brief LIB-001 satisfies PRD-001 and PRD-002; PRD-001 is satisfied by LIB-001 and LIB-002."""
tools = _tools(tmp_path)
lib = tools.dossier("REQ-LIB-001")
assert lib["satisfies"] == ["REQ-PRD-001", "REQ-PRD-002"], lib
assert lib["satisfied_by"] == []
prd = tools.dossier("REQ-PRD-001")
assert prd["satisfied_by"] == ["REQ-LIB-001", "REQ-LIB-002"], prd
assert prd["satisfies"] == []
Activity · 7 steps
test_an_index_without_the_layer_leaves_both_keys_absent
None test_requirement_links.test_an_index_without_the_layer_leaves_both_keys_absent(Path tmp_path)
Table dropped (an index from before the layer): no `satisfies`, no `satisfied_by`.
tests/test_requirement_links.py:73
Checks
assert "satisfies" not in reply and "satisfied_by" not in reply, reply
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CLI-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → report_stats |
| REQ-DDB-CLI-002 | inferred | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → _doxygen_or_partial → _doxygen_stage → _run_doxygen_from_args → run_doxygen → doxygen_supports_sqlite3 |
| REQ-DDB-CONFIG-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _apply_declared_document → stated_document_meta |
| REQ-DDB-CONFIG-003 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml → _is_flat_req_list |
| REQ-DDB-CONFIG-004 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_preprocessor |
| REQ-DDB-CONFIG-005 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig |
| REQ-DDB-CONFIG-006 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _recorded_entry_patterns → recorded_explicit |
| REQ-DDB-CONFIG-007 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-CONFIG-009 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _apply_toolchain_exclusions → load_toolchain_config |
| REQ-DDB-GUARD-012 | inferred | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_guard_config → read_guard_config → read_requirements_section |
| REQ-DDB-GUARD-019 | inferred | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → parse_doxygen_tags |
| REQ-DDB-GUARD-024 | inferred | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → apply_autobrief |
| REQ-DDB-INDEX-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _verify_extra_input_is_read → effective_file_patterns |
| REQ-DDB-INDEX-002 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → build_lock |
| REQ-DDB-INDEX-003 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → report_index_coverage |
| REQ-DDB-INDEX-004 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols |
| REQ-DDB-INDEX-005 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → stamp_external_provenance |
| REQ-DDB-INDEX-006 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_code_text → code_text_rows |
| REQ-DDB-INDEX-007 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_owners |
| REQ-DDB-INDEX-008 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_licenses |
| REQ-DDB-INDEX-009 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc |
| REQ-DDB-INDEX-010 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes |
| REQ-DDB-INDEX-011 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_property_keys |
| REQ-DDB-MCP-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _operator_excludes → meta_section |
| REQ-DDB-MCP-003 | measured | |
| REQ-DDB-MCP-004 | measured | |
| REQ-DDB-PIPE-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_database |
| REQ-DDB-PIPE-003 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_call_edges |
| REQ-DDB-PIPE-004 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → python_entry_seeds |
| REQ-DDB-PIPE-005 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-PIPE-006 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → run_rustdoc → _require_nightly_rustdoc → clean_subprocess_env |
| REQ-DDB-PIPE-007 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig_gates |
| REQ-DDB-PIPE-008 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs |
| REQ-DDB-PIPE-009 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → prune_dominated_fuzzy_call_edges |
| REQ-DDB-PIPE-010 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _build_inferred_edges |
| REQ-DDB-PIPE-011 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes → run_harvest → _harvest_one_file → _parseable_file |
| REQ-DDB-PIPE-012 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_harvest_plan → js_symbol_harvester |
| REQ-DDB-PIPE-013 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings |
| REQ-DDB-PIPE-014 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc → within_repo |
| REQ-DDB-PIPE-015 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_config_defaults |
| REQ-DDB-QUERY-001 | measured | |
| REQ-DDB-QUERY-003 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → mark_test_scope |
| REQ-DDB-QUERY-004 | measured | |
| REQ-DDB-QUERY-010 | measured | |
| REQ-DDB-QUERY-011 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads → _ensure_threads_tables |
| REQ-DDB-QUERY-012 | measured | |
| REQ-DDB-QUERY-013 | measured | |
| REQ-DDB-QUERY-014 | measured | |
| REQ-DDB-SCHEMA-001 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads |
| REQ-DDB-SCHEMA-002 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _writer_dispatch_map |
| REQ-DDB-SCHEMA-003 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-004 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest |
| REQ-DDB-SCHEMA-005 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_key_alias_prefixes |
| REQ-DDB-SCHEMA-006 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-SCHEMA-007 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-009 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_event_edges |
| REQ-DDB-SCHEMA-011 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_context_conflicts |
| REQ-DDB-SCHEMA-012 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest → declaration_origin |
| REQ-DDB-SCHEMA-013 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_data_model_keys |
| REQ-DDB-SCHEMA-014 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs → ensure_file_docs_table |
| REQ-DDB-SCHEMA-015 | measured | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-WIKI-054 | inferred | test_an_index_without_the_layer_leaves_both_keys_absent → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols → _recover_into → all |
Source · 11 lines
def test_an_index_without_the_layer_leaves_both_keys_absent(tmp_path: Path) -> None:
"""@brief Table dropped (an index from before the layer): no `satisfies`, no `satisfied_by`."""
tools = _tools(tmp_path)
conn = sqlite3.connect(tmp_path / "clew.db")
conn.execute("DROP TABLE requirement_links")
conn.commit()
conn.close()
reply = tools.dossier("REQ-LIB-001")
assert "satisfies" not in reply and "satisfied_by" not in reply, reply
Activity · 7 steps
test_satisfies_is_read_from_every_spelling_a_catalogue_uses
None test_requirement_links.test_satisfies_is_read_from_every_spelling_a_catalogue_uses(object value, list expected)
One normaliser for the index and the gate.
tests/test_requirement_links.py:103
Checks
assert satisfies_ids(value) == expected
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-SCHEMA-015 | measured | test_satisfies_is_read_from_every_spelling_a_catalogue_uses → satisfies_ids |
Source · 10 lines
def test_satisfies_is_read_from_every_spelling_a_catalogue_uses(
value: object, expected: list
) -> None:
"""A YAML list, one id, a CSV cell, and a list some loader already turned into text.
@brief One normaliser for the index and the gate.
"""
from clew.requirements import satisfies_ids
assert satisfies_ids(value) == expected1 more lines, not shown
Activity · 2 steps
test_the_table_exists_when_no_catalogue_does
None test_requirement_links.test_the_table_exists_when_no_catalogue_does(Path tmp_path)
We looked and found nothing: the table exists, empty.
tests/test_requirement_links.py:84
Checks
assert conn.execute("SELECT COUNT(*) FROM requirement_links").fetchone() == (0,)
Result: passed
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CLI-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → report_stats |
| REQ-DDB-CLI-002 | inferred | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → _doxygen_or_partial → _doxygen_stage → _run_doxygen_from_args → run_doxygen → doxygen_supports_sqlite3 |
| REQ-DDB-CONFIG-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _apply_declared_document → stated_document_meta |
| REQ-DDB-CONFIG-003 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml → _is_flat_req_list |
| REQ-DDB-CONFIG-004 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_preprocessor |
| REQ-DDB-CONFIG-005 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig |
| REQ-DDB-CONFIG-006 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _recorded_entry_patterns → recorded_explicit |
| REQ-DDB-CONFIG-007 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-CONFIG-009 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _apply_toolchain_exclusions → load_toolchain_config |
| REQ-DDB-GUARD-012 | inferred | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_guard_config → read_guard_config → read_requirements_section |
| REQ-DDB-GUARD-019 | inferred | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → parse_doxygen_tags |
| REQ-DDB-GUARD-024 | inferred | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings → summarize → apply_autobrief |
| REQ-DDB-INDEX-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _verify_extra_input_is_read → effective_file_patterns |
| REQ-DDB-INDEX-002 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → build_lock |
| REQ-DDB-INDEX-003 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → report_index_coverage |
| REQ-DDB-INDEX-004 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols |
| REQ-DDB-INDEX-005 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → stamp_external_provenance |
| REQ-DDB-INDEX-006 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_code_text → code_text_rows |
| REQ-DDB-INDEX-007 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → record_owners |
| REQ-DDB-INDEX-008 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_licenses |
| REQ-DDB-INDEX-009 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc |
| REQ-DDB-INDEX-010 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes |
| REQ-DDB-INDEX-011 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_property_keys |
| REQ-DDB-MCP-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _operator_excludes → meta_section |
| REQ-DDB-MCP-004 | measured | |
| REQ-DDB-PIPE-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_database |
| REQ-DDB-PIPE-003 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_call_edges |
| REQ-DDB-PIPE-004 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → python_entry_seeds |
| REQ-DDB-PIPE-005 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → write_build_signature |
| REQ-DDB-PIPE-006 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → run_rustdoc → _require_nightly_rustdoc → clean_subprocess_env |
| REQ-DDB-PIPE-007 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_kconfig_gates |
| REQ-DDB-PIPE-008 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs |
| REQ-DDB-PIPE-009 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → prune_dominated_fuzzy_call_edges |
| REQ-DDB-PIPE-010 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _build_inferred_edges |
| REQ-DDB-PIPE-011 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_ast_includes → run_harvest → _harvest_one_file → _parseable_file |
| REQ-DDB-PIPE-012 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → build_harvest_plan → js_symbol_harvester |
| REQ-DDB-PIPE-013 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → enrich_python_docstrings |
| REQ-DDB-PIPE-014 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_kerneldoc → within_repo |
| REQ-DDB-PIPE-015 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_config_defaults |
| REQ-DDB-QUERY-003 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → mark_test_scope |
| REQ-DDB-QUERY-011 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads → _ensure_threads_tables |
| REQ-DDB-SCHEMA-001 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_threads |
| REQ-DDB-SCHEMA-002 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_shared_key_edges_inferred → _writer_dispatch_map |
| REQ-DDB-SCHEMA-003 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-004 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest |
| REQ-DDB-SCHEMA-005 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → resolve_key_alias_prefixes |
| REQ-DDB-SCHEMA-006 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-SCHEMA-007 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_callback_registration_edges → _ensure_external_boundaries_table |
| REQ-DDB-SCHEMA-009 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_event_edges |
| REQ-DDB-SCHEMA-011 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → extract_context_conflicts |
| REQ-DDB-SCHEMA-012 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → load_dispatch_manifest → declaration_origin |
| REQ-DDB-SCHEMA-013 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → import_data_model_keys |
| REQ-DDB-SCHEMA-014 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_file_docs → ensure_file_docs_table |
| REQ-DDB-SCHEMA-015 | measured | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → ingest_requirements_yaml |
| REQ-DDB-WIKI-054 | inferred | test_the_table_exists_when_no_catalogue_does → _tools → _run_pipeline → _run_pipeline_inner → _build_stages → recover_ast_symbols → _recover_into → all |
Source · 19 lines
def test_the_table_exists_when_no_catalogue_does(tmp_path: Path) -> None:
"""@brief We looked and found nothing: the table exists, empty."""
_tools(tmp_path, catalog="")
conn = sqlite3.connect(tmp_path / "clew.db")
assert conn.execute("SELECT COUNT(*) FROM requirement_links").fetchone() == (0,)
conn.close()
@pytest.mark.parametrize(
("value", "expected"),
[
(["REQ-A-1", "REQ-B-2"], ["REQ-A-1", "REQ-B-2"]),
("REQ-A-1", ["REQ-A-1"]),
("REQ-A-1, REQ-B-2", ["REQ-A-1", "REQ-B-2"]),
("['REQ-A-1', 'REQ-B-2']", ["REQ-A-1", "REQ-B-2"]),
(None, []),
("", []),
],
)