test_a_refresh_under_strip_from_path_keeps_inheritance

Tests › tests/integration/test_splice_inheritance.py

passed Passed in the packaged run.

What this test is for

Why it exists

ENTROPIC'S RERUN OF 314e4696 (7ea9724): through the real pipeline a doc-only edit to adapter_base.h still took compoundref 133 -> 125 and reimplements 248 -> 221, and reverting it left 128 / 228. entropic's Doxyfile declares `STRIP_FROM_PATH = include src`, so the cached master spells `include/x/base.h` as `x/base.h`; `_incremental_plan` ran `xref_closure` on that RAW master, where no row can match the changed file — the closure was the changed file alone, for xrefs too. The two-header test above has no stripping and could not see it.

Given

  1. root = tmp_path / "repo"
  2. (root / "include" / "x").mkdir(parents=True)
4 more
  1. (root / "src" / "x").mkdir(parents=True)
  2. (root / "include" / "x" / "base.h").write_text( "/** @brief A base. */\nstruct Base {\n /** @brief Area. */\n virtual int area() const;\n" " virtual ~Base() {}\n};\n", encoding="utf-8", )
  3. (root / "src" / "x" / "derived.h").write_text( '#include "x/base.h"\n/** @brief A derived. */\nstruct Derived : Base {\n' " /** @brief Area. */\n int area() const override;\n};\n", encoding="utf-8", )
  4. (root / "Doxyfile").write_text( "PROJECT_NAME = strip\nINPUT = include src\nRECURSIVE = YES\nEXTRACT_ALL = YES\n" "FULL_PATH_NAMES = YES\nSTRIP_FROM_PATH = include src\nSTRIP_FROM_INC_PATH = include\n", encoding="utf-8", )
→

When

  1. subprocess.run(git_argv("init", "-q"), cwd=root, check=True)
  2. subprocess.run(git_argv("add", "-A"), cwd=root, check=True)
  3. subprocess.run( git_argv("-c", "user.email=t@t", "-c", "user.name=t", "commit", "-qm", "base"), cwd=root, check=True, )
9 more
  1. live = tmp_path / "live" / "clew.db"
  2. live.parent.mkdir()
  3. want = _inheritance(_pipeline(root, live))
  4. base = root / "include" / "x" / "base.h"
  5. original = base.read_text(encoding="utf-8")
  6. base.write_text(original.replace("A base.", "A base, reworded."), encoding="utf-8")
  7. fresh = tmp_path / "fresh" / "clew.db"
  8. fresh.parent.mkdir()
  9. base.write_text(original, encoding="utf-8")
→

Then

  1. ✓ want contains ("compoundref", "Base>Derived")
  2. ✓ _inheritance(_pipeline(root, live)) equals _inheritance(_pipeline(root, fresh))
  3. ✓ _inheritance(_pipeline(root, live)) equals want

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

clew — `main` (clew/cli.py) · 31 of 400 steps

… 10 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesalt (line 1171)altopt (line 485)optmain11. propose → build_context11build_context12. build_context → derive_scope12derive_scope13. derive_scope → _declared_index_scope13_declared_index_scope▶ test enters14. _declared_index_scope → load_declaration_located14load_declaration_located15. load_declaration_located → _read_mapping15_read_mapping16. _read_mapping → _parsed_declaration16_parsed_declaration17. load_declaration_located → _checked_sections17_checked_sections

… 26 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesother filesopt (line 696)opttry (line 1003)tryopt (line 847)optloop (line 746)looploop (line 1055)loopopt (line 1075)optmain44. _declared_index_scope → _existing_paths44_existing_paths45. derive_scope → whole_repo_scope45whole_repo_scope46. whole_repo_scope → _gitignored_paths46_gitignored_paths47. _gitignored_paths → git_argv47git_argv48–49. git_argv → _no_ext_diff48_no_ext_diff +1 more50. _gitignored_paths → git_env50git_env51. whole_repo_scope → list51list52–56. whole_repo_scope → nested_repo_roots52nested_repo_roots +4 more57. nested_repo_roots → _nested_repos_under57_nested_repos_under58. whole_repo_scope → _gitignored_paths58_gitignored_paths59–60. whole_repo_scope → _pruned_dirs59_pruned_dirs +1 more61. _pruned_dirs → _skip_dir61_skip_dir62–64. _pruned_dirs → _descendable62_descendable +2 more65–68. whole_repo_scope → _declaration_note65_declaration_note +3 more69. derive_scope → whole_repo_scope69whole_repo_scope▶ test enters70–72. build_context → repo_source_files70repo_source_files +2 more73. _ts_language_for → _grammar_available73_grammar_available▶ test enters74–75. _grammar_available → has_language74has_language +1 more76. _ts_language_for → _try_import_ts_module76_try_import_ts_module77–78. build_context → scope_membership77scope_membership +1 more

… 4 steps between

command-line usercommand-line usercommand-line usercommand-line userother filesother filesother filesother filesopt (line 288)optopt (line 385)optmain83. _cached_parser → _try_import_ts_module83_try_import_ts_module84. _ast_parse_one_file → _parseable_file84_parseable_file85. _parseable_file → binary_file85binary_file▶ test enters86–87. _ast_parse_one_file → _disambiguate_header86_disambiguate_header +1 more

… 23 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/propose/astdefs.pyclew/propose/astdefs.pyclew/propose/astdefs.pyclew/propose/astdefs.pyother filesother filesother filesother filesmain111. _accessor_site → callee_name111callee_name112. build_context → load_declaration112load_declaration113. load_declaration → load_declaration_located113load_declaration_located▶ test enters114–115. propose → _sections114_sections +1 more

… 57 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyother filesother filesother filesother filesloop (line 312)looploop (line 314)loopmain173. diagnose → _check_doxygen173_check_doxygen174. _check_doxygen → uses_rustdoc174uses_rustdoc175. uses_rustdoc → discover_doxyfile175discover_doxyfile▶ test enters176. uses_rustdoc → has_cargo_manifest176has_cargo_manifest177. _check_doxygen → _needs_doxygen177_needs_doxygen178. _needs_doxygen → claims178claims

… 27 steps between

command-line usercommand-line usercommand-line usercommand-line userother filesother filesother filesother filestry (line 155)trymain206–207. _locate → target_for206target_for +1 more208. target_for → state_home208state_home▶ test enters209–210. query_main → _payload209_payload +1 more

… 190 later steps

6 more

tests/integration/test_splice_inheritance.py:134 · its file's page

What it checks (3)

  1. assert ("compoundref", "Base>Derived") in want, f"vacuous: {want}" observes _inheritance via want
  2. assert _inheritance(_pipeline(root, live)) == _inheritance(_pipeline(root, fresh)), "edit" observes _inheritance
  3. assert _inheritance(_pipeline(root, live)) == want, "revert" observes _inheritance

Where the product reaches it

  • build_wiki → _build_site → _commit → git_argv (flow)

Call flow

test_a_refresh_under_strip_from_path_keeps_inheritance→_inheritance→git_argv→_pipeline

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_a_refresh_under_strip_from_path_keeps_inheritance · 3 checks_pipeline_run_pipeline_run_pipeline_innerreport_statsREQ-DDB-CLI-001 · measured_pipeline… 7 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferredgit_argvREQ-DDB-CONFIG-001 · measured_pipeline… 4 calls …_is_flat_req_listREQ-DDB-CONFIG-003 · inferred_pipeline… 3 calls …resolve_preprocessorREQ-DDB-CONFIG-004 · measured_pipeline… 3 calls …import_kconfigREQ-DDB-CONFIG-005 · measured_pipeline… 3 calls …recorded_explicitREQ-DDB-CONFIG-006 · measured_pipeline… 3 calls …write_build_signatureREQ-DDB-CONFIG-007 · measured_pipeline… 3 calls …load_toolchain_configREQ-DDB-CONFIG-009 · measured_pipeline… 5 calls …read_requirements_sectionREQ-DDB-GUARD-012 · inferred_pipeline… 5 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferred_pipeline… 5 calls …apply_autobriefREQ-DDB-GUARD-024 · inferred

and 42 more requirement paths, listed below.

Also reaches 55 requirements

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