main (clew/guard/main.py)

Overview · 357 steps, 7 lanes

  1. steps 1–2 · clew/guard/main.py
  2. steps 3–357 · clew/guard/main.py, other files, clew/guard/config.py +4
program launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesother filesopt (line 733)optloop (line 417)loopalt (line 421)altloop (line 391)looploop (line 267)looptry (line 269)tryopt (line 1336)optloop (line 973)looploop (line 974)looploop (line 287)looploop (line 288)looptry (line 345)tryloop (line 326)looploop (line 69)loopopt (line 400)optloop (line 647)loopopt (line 658)optopt (line 227)opttry (line 241)tryloop (line 143)loopopt (line 1171)optloop (line 181)looploop (line 118)loopopt (line 120)optopt (line 247)optloop (line 631)looploop (line 635)looploop (line 638)loopopt (line 446)optloop (line 361)loopopt (line 374)optopt (line 251)optloop (line 1337)looploop (line 252)looploop (line 1022)loopopt (line 1026)optopt (line 260)optloop (line 1096)loopopt (line 265)optopt (line 482)optopt (line 853)optopt (line 114)optopt (line 116)optopt (line 92)optopt (line 94)optopt (line 98)optloop (line 188)loopopt (line 673)optloop (line 179)looploop (line 182)looploop (line 208)looploop (line 150)loopopt (line 57)optloop (line 77)looptry (line 82)tryloop (line 86)looploop (line 87)loopopt (line 250)optalt (line 608)altloop ×2 (line 625)loop ×2main1–7. main → _check_retired_subcommand1_check_retired_subcommand +6 more8. _add_validate_parser → list8list9. list → link9link10–14. build_parser → _add_impact_parser10_add_impact_parser +4 more15–17. _run → _has_subcommand15_has_subcommand +2 more18. _run → load_config18load_config19–28. load_config → refuse_doxygen_guard_leftovers19refuse_doxygen_guard_leftovers +9 more29. _suggest_key → list29list30. _validate_dict_node → _validate_node30_validate_node31. load_config → _shared_facts31_shared_facts32. _shared_facts → list32list33–46. load_config → read_guard_section33read_guard_section +13 more47. _run → run_precommit47run_precommit48. run_precommit → report_dir48report_dir49. run_precommit → resolve_version_gate49resolve_version_gate50. resolve_version_gate → get_validate50get_validate51. resolve_version_gate → _detect_current_version51_detect_current_version52. _detect_current_version → get_validate52get_validate53–54. run_precommit → _report_violations53_report_violations +1 more55. _validate_files → load_requirements_full55load_requirements_full56. load_requirements_full → _get_requirements_config56_get_requirements_config57. _get_requirements_config → get_requirements57get_requirements58. _get_requirements_config → resolve_contained_path58resolve_contained_path59. load_requirements_full → _validate_requirements59_validate_requirements60. _validate_requirements → get_validate60get_validate61. _validate_requirements → _summarise_id61_summarise_id62. _validate_files → load_external_requirements62load_external_requirements63. load_external_requirements → get_requirements63get_requirements64. load_external_requirements → read_catalog_at64read_catalog_at65–71. read_catalog_at → _refuse_url65_refuse_url +6 more72. _validate_files → get_requirements72get_requirements73. _validate_files → check_satisfies73check_satisfies74. check_satisfies → link_ids74link_ids75. link_ids → satisfies_ids75satisfies_ids76. _validate_files → load_failure_mode_ids76load_failure_mode_ids77–78. load_failure_mode_ids → _get_requirements_config77_get_requirements_config +1 more79. load_failure_mode_ids → modes_of79modes_of80. _validate_files → validate_file80validate_file81. validate_file → get_validate81get_validate82. validate_file → excluded_by82excluded_by83–84. excluded_by → compile_globs83compile_globs +1 more85. validate_file → gate_exclusion85gate_exclusion86–102. gate_exclusion → _gate_matcher86_gate_matcher +16 more103. validate_file → parse_source_file103parse_source_file104–109. parse_source_file → parse_source_file_with_content104parse_source_file_with_content +5 more110. parse_content_for_file → language_for_file110language_for_file111–113. language_for_file → language_for_extension111language_for_extension +2 more114. parse_content_for_file → parse_functions114parse_functions115. parse_functions → parse_functions_ts115parse_functions_ts116. parse_functions_ts → get_parser_for_language116get_parser_for_language117. parse_functions_ts → get_language_spec117get_language_spec118–142. parse_functions_ts → _collect_functions118_collect_functions +24 more143. _find_preceding_doxygen → parse_doxygen_tags143parse_doxygen_tags144. _find_preceding_doxygen → apply_autobrief144apply_autobrief145. _find_preceding_doxygen → _last_row145_last_row146–154. _collect_functions → _qualified_enclosing146_qualified_enclosing +8 more155. validate_file → unconfigured_language155unconfigured_language156. validate_file → check_file_presence156check_file_presence157. check_file_presence → get_validate157get_validate158–163. check_file_presence → _find_file_doxygen_start158_find_file_doxygen_start +5 more164. _check_file_block_tags → parse_doxygen_tags164parse_doxygen_tags165–170. parse_doxygen_tags → _mask_escaped_at165_mask_escaped_at +5 more171. _check_file_block_tags → apply_autobrief171apply_autobrief172–174. apply_autobrief → _mask_escaped_at172_mask_escaped_at +2 more175. validate_file → check_presence175check_presence176. check_presence → get_validate176get_validate177–180. check_presence → _is_void_function177_is_void_function +3 more181. validate_file → check_return_presence181check_return_presence182. check_return_presence → get_validate182get_validate183–184. check_return_presence → _require_return183_require_return +1 more185. validate_file → check_tags185check_tags186. check_tags → get_validate186get_validate187. check_tags → _validate_tag_value187_validate_tag_value188. validate_file → check_req_coverage188check_req_coverage189. check_req_coverage → get_requirements189get_requirements190. check_req_coverage → _has_active_requirements190_has_active_requirements191. _has_active_requirements → load_requirements_full191load_requirements_full192. _has_active_requirements → filter_requirements_by_version192filter_requirements_by_version193. filter_requirements_by_version → get_validate193get_validate194. filter_requirements_by_version → get_requirements194get_requirements195. filter_requirements_by_version → _summarise_id195_summarise_id196. filter_requirements_by_version → parse_version196parse_version197. filter_requirements_by_version → compare_versions197compare_versions198. filter_requirements_by_version → parse_version198parse_version199. check_req_coverage → _has_version_gate199_has_version_gate200. _has_version_gate → get_validate200get_validate201. _has_version_gate → get_requirements201get_requirements202. check_req_coverage → _exemption_hint202_exemption_hint203. validate_file → check_bus_tags203check_bus_tags204. check_bus_tags → get_validate204get_validate205. check_bus_tags → _bus_tags205_bus_tags206. _bus_tags → get_validate206get_validate207. _bus_tags → _event_tags207_event_tags208–210. check_bus_tags → _bus_vocabulary208_bus_vocabulary +2 more211. validate_file → check_unknown_tags211check_unknown_tags212. check_unknown_tags → get_validate212get_validate213–216. check_unknown_tags → _event_tags213_event_tags +3 more217. _edit_distance → list217list218. validate_file → check_removed_tags218check_removed_tags219. validate_file → check_exemption_reasons219check_exemption_reasons220. check_exemption_reasons → get_validate220get_validate221. validate_file → check_duplicate_tags221check_duplicate_tags222. check_duplicate_tags → get_validate222get_validate223. validate_file → check_req_exists223check_req_exists224. check_req_exists → get_validate224get_validate225. check_req_exists → _uncheckable225_uncheckable226. validate_file → check_fails_when_exists226check_fails_when_exists227. validate_file → check_fails_when_markers227check_fails_when_markers228. check_fails_when_markers → marker228marker229. validate_file → get_file_at_revision229get_file_at_revision230–231. get_file_at_revision → run_git230run_git +1 more232. validate_file → parse_content_for_file232parse_content_for_file233. validate_file → check_version_staleness233check_version_staleness234. check_version_staleness → get_validate234get_validate235–239. check_version_staleness → _index_by_identity235_index_by_identity +4 more240. _pair_copies → 240… 1 call not run241–243. check_version_staleness → _pair_by_name241_pair_by_name +2 more244. _validate_files → _report_skips244_report_skips245. run_precommit → report_dir245report_dir246. run_precommit → validate_output_path246validate_output_path247. validate_output_path → resolve_contained_path247resolve_contained_path248. run_precommit → get_requirements248get_requirements249. run_precommit → get_branch_diff_range249get_branch_diff_range250–253. get_branch_diff_range → get_merge_base250get_merge_base +3 more254. run_precommit → impact_base254impact_base255. run_precommit → impact_report255impact_report256. impact_report → get_changed_files256get_changed_files257. get_changed_files → run_git257run_git258–260. impact_report → collect_changes258collect_changes +2 more261. _get_file_diff → get_staged_diff261get_staged_diff262. get_staged_diff → run_git262run_git263. _get_file_diff → get_diff263get_diff264. get_diff → run_git264run_git265. _collect_changed_lines → parse_changed_lines265parse_changed_lines266. _collect_changed_lines → _get_file_diff266_get_file_diff267. _collect_changed_lines → parse_changed_lines267parse_changed_lines268. collect_changes → _extract_changed_functions268_extract_changed_functions269. _extract_changed_functions → parse_source_file269parse_source_file270. impact_report → find_index270find_index271. find_index → registered_index271registered_index272–277. impact_report → build_report272build_report +5 more278. run_precommit → _write_report278_write_report279–280. _write_report → validate_output_path279validate_output_path ×2281. _write_report → format_markdown281format_markdown282–289. format_markdown → _unmapped_markdown282_unmapped_markdown +7 more290. _write_report → format_json290format_json291. run_precommit → git_add291git_add292. git_add → run_git292run_git293. run_precommit → format_markdown293format_markdown294. run_precommit → _coverage_gate294_coverage_gate295. _coverage_gate → get_requirements295get_requirements296. _coverage_gate → analyze_coverage296analyze_coverage297. analyze_coverage → load_requirements_full297load_requirements_full298. analyze_coverage → collect_tagged_functions298collect_tagged_functions299. collect_tagged_functions → find_source_files299find_source_files300. find_source_files → get_validate300get_validate301–306. find_source_files → _git_ls_files301_git_ls_files +5 more307. collect_tagged_functions → _process_source_file307_process_source_file308. _process_source_file → parse_source_file_with_content308parse_source_file_with_content309. _process_source_file → _extract_tagged_function309_extract_tagged_function310–312. analyze_coverage → _collect_req_ids310_collect_req_ids +2 more313. _exempt → get_requirements313get_requirements314. _exempt → exemption314exemption315. exemption → list315list316. analyze_coverage → traceability316traceability317. traceability → is_test_path317is_test_path318. is_test_path → _matcher318_matcher319. analyze_coverage → covered_via319covered_via320. covered_via → get_requirements320get_requirements321. covered_via → read_catalog_at321read_catalog_at322. covered_via → _realised322_realised323. _realised → link_ids323link_ids324. _realised → _tagged_at_pin324_tagged_at_pin325. _tagged_at_pin → git_text325git_text326. _realised → exemption326exemption327. _coverage_gate → coverage_gaps327coverage_gaps328. _coverage_gate → format_coverage_text328format_coverage_text329–331. format_coverage_text → traceability_line329traceability_line +2 more332. _coverage_gate → traceability_line332traceability_line333–341. _run → build_parser333build_parser +8 more342. _run_impact_command → impact_report342impact_report343. _run_impact_command → format_report343format_report344. format_report → 344… 1 call not run345. _run_impact_command → 345… 2 calls not run346. _dispatch_subcommand → _run_coverage_command346_run_coverage_command347. _run_coverage_command → run_coverage347run_coverage348–349. run_coverage → analyze_coverage348analyze_coverage +1 more350. _dispatch_subcommand → _run_config_command350_run_config_command351. _run_config_command → build_effective_contract351build_effective_contract352. _run_config_command → build_schema_contract352build_schema_contract353. _dispatch_subcommand → _run_files_command353_run_files_command354. _run_files_command → build_files_contract354build_files_contract355. _dispatch_subcommand → _run_doxyfile_command355_run_doxyfile_command356. _run_doxyfile_command → build_fragment356build_fragment357. _run → load_config357load_config
All 357 steps
#callercalleewhat it doesrequirementsframescall site
1main_check_retired_subcommandReject retired subcommands loudly instead of treating them as file paths.REQ-DDB-GUARD-013—clew/guard/main.py:712
2_check_retired_subcommand_first_positionalReturn the first positional arg, ignoring flags and their values.——clew/guard/main.py:557
3main_runLoad config and dispatch, letting GuardError propagate to the CLI boundary.—try (line 717)clew/guard/main.py:717
4_run_has_subcommandDetect whether the first positional arg is a known subcommand.——clew/guard/main.py:729
5_has_subcommand_first_positionalReturn the first positional arg, ignoring flags and their values.——clew/guard/main.py:530
6_runbuild_parserCreate argparse parser with validate/impact/coverage subcommands.—if (line 730)clew/guard/main.py:730
7build_parser_add_validate_parserAdd the validate subcommand to the parser.——clew/guard/main.py:92
8_add_validate_parserlist———clew/guard/main.py:114
9listlink———clew/wiki/themes/clew/static/web.js:85
10build_parser_add_impact_parserAdd the impact subcommand to the parser.——clew/guard/main.py:93
11build_parser_add_coverage_parserAdd the coverage subcommand to the parser.——clew/guard/main.py:94
12build_parser_add_config_parserAdd the config subcommand exposing the machine-readable consumer contract.——clew/guard/main.py:95
13build_parser_add_files_parserAdd the files subcommand exposing the exact post-exclude file set.——clew/guard/main.py:96
14build_parser_add_doxyfile_parserAdd the doxyfile subcommand emitting a Doxyfile fragment.——clew/guard/main.py:97
15_run_has_subcommandDetect whether the first positional arg is a known subcommand.——clew/guard/main.py:732
16_run_parse_precommit_argsParse pre-commit mode args (no subcommand) into components.—if (line 733)clew/guard/main.py:733
17_run_setup_loggingConfigure logging based on verbosity flag.—if (line 733)clew/guard/main.py:734
18_runload_configLoad the guard: section of .clew.yaml and merge with built-in defaults.REQ-DDB-GUARD-012if (line 733)clew/guard/main.py:735
19load_configrefuse_doxygen_guard_leftoversRefuse to run while a doxygen-guard leftover is in the repository, naming it.REQ-DDB-GUARD-012—clew/guard/config.py:702
20load_config_fresh_defaultsDeep-copy the built-in defaults so callers cannot mutate module state.REQ-DDB-GUARD-012if (line 705)clew/guard/config.py:706
21load_configread_requirements_sectionRead and validate the top-level requirements: section of a .clew.yaml .REQ-DDB-GUARD-012—clew/guard/config.py:710
22read_requirements_section_validate_nodeValidate a single config node against its schema spec.REQ-DDB-GUARD-012—clew/guard/config.py:585
23_validate_node_validate_map_ofValidate a mapping of user-named entries against the schema every entry follows.—if (line 445)clew/guard/config.py:445
24_validate_map_of_config_pathBuild a dotted config path from parent path and key.—loop (line 470)clew/guard/config.py:471
25_validate_map_of_validate_nodeValidate a single config node against its schema spec.REQ-DDB-GUARD-012loop (line 470)clew/guard/config.py:471
26_validate_node_validate_dict_nodeValidate dict keys against schema, recursing into sub-nodes.REQ-DDB-GUARD-012—clew/guard/config.py:458
27_validate_dict_node_config_pathBuild a dotted config path from parent path and key.—loop (line 417)clew/guard/config.py:418
28_validate_dict_node_suggest_keySuggest the closest known schema key for a misspelled one.—loop (line 417), if (line 420)clew/guard/config.py:420
29_suggest_keylist———clew/guard/config.py:431
30_validate_dict_node_validate_nodeValidate a single config node against its schema spec.REQ-DDB-GUARD-012loop (line 417), else (line 421)clew/guard/config.py:422
31load_config_shared_factsThe facts the gate reads from the rest of .clew.yaml : the event vocabulary and sources.——clew/guard/config.py:711
32_shared_factslist———clew/guard/config.py:751
33load_configread_guard_sectionRead the raw guard: mapping out of a .clew.yaml .REQ-DDB-GUARD-012—clew/guard/config.py:713
34load_config_fresh_defaultsDeep-copy the built-in defaults so callers cannot mutate module state.REQ-DDB-GUARD-012if (line 715)clew/guard/config.py:716
35load_configvalidate_config_schemaValidate user config keys and types against CONFIG_SCHEMA.REQ-DDB-GUARD-012—clew/guard/config.py:718
36validate_config_schema_moved_keysSplit out the keys that moved in 2.0.0, each with a pointer to its new home.——clew/guard/config.py:538
37validate_config_schema_exclude_errorsRefuse a 1.x regex-shaped validate.exclude entry, naming the two 2.0.0 forms.——clew/guard/config.py:541
38validate_config_schema_ratio_errorsRefuse a coverage.min_req_ratio that is not a number in (0, 1].——clew/guard/config.py:542
39validate_config_schema_reason_errorsRefuse an exemption_reason setting other than required or optional .——clew/guard/config.py:543
40validate_config_schema_validate_nodeValidate a single config node against its schema spec.REQ-DDB-GUARD-012—clew/guard/config.py:544
41load_config_log_declared_sectionsLog which top-level sections the user declared versus which are defaulted.REQ-DDB-GUARD-012—clew/guard/config.py:724
42load_config_fresh_defaultsDeep-copy the built-in defaults so callers cannot mutate module state.REQ-DDB-GUARD-012—clew/guard/config.py:725
43load_configapply_opt_in_languagesFill a declared opt-in language (e.g.REQ-DDB-GUARD-024—clew/guard/config.py:725
44apply_opt_in_languagesdeep_mergeRecursively merge two dicts; override values win for non-dict leaves.—loop (line 793), if (line 795)clew/guard/config.py:795
45deep_mergedeep_mergeRecursively merge two dicts; override values win for non-dict leaves.—loop (line 651), if (line 653)clew/guard/config.py:653
46load_configdeep_mergeRecursively merge two dicts; override values win for non-dict leaves.——clew/guard/config.py:725
47_runrun_precommitRun all configured checks in pre-commit mode (no subcommand).REQ-DDB-GUARD-001if (line 733)clew/guard/main.py:735
48run_precommitreport_dirThe directory the impact report is written to and read from.——clew/guard/main.py:470
49run_precommitresolve_version_gateResolve the version gate in place, failing if it is declared but unresolvable.REQ-DDB-GUARD-014—clew/guard/main.py:472
50resolve_version_gateget_validateAccess the validate section of config.——clew/guard/main.py:438
51resolve_version_gate_detect_current_versionResolve the current project version from config, git tag, or CMake.——clew/guard/main.py:443
52_detect_current_versionget_validateAccess the validate section of config.——clew/guard/main.py:425
53run_precommit_report_violationsPrint violations and return exit code.——clew/guard/main.py:474
54run_precommit_validate_filesValidate a list of files and report violations.——clew/guard/main.py:474
55_validate_filesload_requirements_fullLoad full requirement rows from the configured catalog.REQ-DDB-GUARD-011—clew/guard/main.py:316
56load_requirements_full_get_requirements_configExtract requirements config, raising if a declared catalog is unusable.REQ-DDB-GUARD-011—clew/guard/impact.py:291
57_get_requirements_configget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/impact.py:215
58_get_requirements_configresolve_contained_pathResolve a config-supplied path and require it to stay inside the repo.REQ-DDB-GUARD-016—clew/guard/impact.py:232
59load_requirements_full_validate_requirementsEnforce the name field and the configured ID pattern across a catalog.REQ-DDB-GUARD-011—clew/guard/impact.py:318
60_validate_requirementsget_validateAccess the validate section of config.——clew/guard/impact.py:388
61_validate_requirements_summarise_idRender a catalog key for an error message, truncated and single-line.REQ-DDB-GUARD-016loop (line 391)clew/guard/impact.py:392
62_validate_filesload_external_requirementsThe requirement ids of the external catalogues this repository names (GH #68).REQ-DDB-GUARD-027—clew/guard/main.py:319
63load_external_requirementsget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/impact.py:265
64load_external_requirementsread_catalog_atRead a requirements catalogue from a local path or a pinned revision of a local checkout.REQ-DDB-GUARD-027loop (line 267), try (line 269)clew/guard/impact.py:269
65read_catalog_at_refuse_urlRefuse a source that is a URL.—if (line 1336)clew/requirements.py:1339
66read_catalog_atgit_textRun git in a local checkout through the hardened environment.REQ-DDB-GUARD-027if (line 1336)clew/requirements.py:1340
67git_textgit_argvOne git argv with every command-valued configuration key disarmed.REQ-DDB-CONFIG-001try (line 1306)clew/requirements.py:1307
68git_argv_no_ext_diffInsert --no-ext-diff after a diff-family subcommand.REQ-DDB-CONFIG-001—clew/gitenv.py:110
69git_argvlist———clew/gitenv.py:110
70read_catalog_at_refuse_urlRefuse a source that is a URL.—else (line 1344)clew/requirements.py:1345
71read_catalog_at_catalog_rowsThe rows of a parsed catalogue, in either shape.—try (line 1352)clew/requirements.py:1352
72_validate_filesget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/main.py:321
73_validate_filescheck_satisfiesA catalogue entry's satisfies ids that no catalogue holds (GH #68).REQ-DDB-SCHEMA-015—clew/guard/main.py:322
74check_satisfieslink_idsThe ids an entry links upward to, through satisfies or serves .REQ-DDB-SCHEMA-015loop (line 973), loop (line 974)clew/guard/checks.py:974
75link_idssatisfies_idsThe requirement ids a satisfies value names, in every spelling a catalogue uses.REQ-DDB-SCHEMA-015loop (line 287), loop (line 288)clew/requirements.py:288
76_validate_filesload_failure_mode_idsEvery failure-mode id the local catalogue declares.REQ-DDB-GUARD-001—clew/guard/main.py:324
77load_failure_mode_ids_get_requirements_configExtract requirements config, raising if a declared catalog is unusable.REQ-DDB-GUARD-011—clew/guard/impact.py:340
78load_failure_mode_ids_raw_entriesA catalogue's entries as (id, raw fields), in either catalogue shape.—try (line 345)clew/guard/impact.py:347
79load_failure_mode_idsmodes_ofThe failure modes one catalog entry declares.REQ-DDB-SCHEMA-006try (line 345)clew/guard/impact.py:348
80_validate_filesvalidate_fileOrchestrate presence, staleness, and tag checks for one file.REQ-DDB-GUARD-001loop (line 326)clew/guard/main.py:331
81validate_fileget_validateAccess the validate section of config.——clew/guard/main.py:209
82validate_fileexcluded_byThe validate.exclude entry that excludes a path, or None.REQ-DDB-GUARD-013—clew/guard/main.py:210
83excluded_bycompile_globsCompile globs into the substrate's matcher, dropping any that do not compile.—loop (line 69)clew/guard/filters.py:74
84excluded_bymatchesWhether a repo-relative path matches, as a file or as a directory.—loop (line 69)clew/guard/filters.py:76
85validate_filegate_exclusionWhy the gate should not read a file, or None when it should.REQ-DDB-CONFIG-009—clew/guard/main.py:218
86gate_exclusion_gate_matcherThe toolchain config and compiled gate matcher for one working directory.——clew/guard/filters.py:91
87_gate_matcherload_toolchain_configLocate and read a repository's toolchain.toml and suppress.toml.REQ-DDB-CONFIG-009—clew/guard/filters.py:32
88load_toolchain_config_read_tomlRead a TOML file into a mapping, recording rather than raising on failure.—if (line 178)clew/toolchain.py:178
89_read_tomlrequire_toml_moduleReturn a TOML-parsing module, raising when none is importable.—try (line 118)clew/toolchain.py:119
90require_toml_moduletoml_moduleReturn a TOML-parsing module, or None when none is importable.——clew/tomlcompat.py:87
91load_toolchain_config_string_listThe string list at table[key] , or () when absent or malformed.—if (line 178)clew/toolchain.py:179
92_string_listallEvery comment, oldest first, with its status.REQ-DDB-WIKI-054—clew/toolchain.py:139
93all_events——loop (line 135)clew/mcp_server/comments.py:135
94all_publicA stored event's public fields.—loop (line 135), if (line 137)clew/mcp_server/comments.py:137
95alllist———clew/mcp_server/comments.py:140
96load_toolchain_config_string_listThe string list at table[key] , or () when absent or malformed.—if (line 178)clew/toolchain.py:181
97load_toolchain_config_read_tomlRead a TOML file into a mapping, recording rather than raising on failure.—if (line 184)clew/toolchain.py:184
98load_toolchain_config_entry_globsThe globs of one [[suppress]] entry that suppresses whole files.—if (line 184), loop (line 186), if (line 189)clew/toolchain.py:189
99load_toolchain_config_entry_globsThe globs of one [[suppress]] entry that suppresses whole files.—if (line 184), loop (line 186), elif (line 191)clew/toolchain.py:191
100_gate_matchercompile_globsCompile globs into the substrate's matcher, dropping any that do not compile.——clew/guard/filters.py:33
101gate_exclusionmatchesWhether a repo-relative path matches, as a file or as a directory.—if (line 98)clew/guard/filters.py:102
102gate_exclusionbinary_fileThe binary classification of one file, or None when it is text or unreadable.REQ-DDB-PIPE-011—clew/guard/filters.py:106
103validate_fileparse_source_fileParse all functions from a source file using language-aware settings.REQ-DDB-GUARD-018—clew/guard/main.py:225
104parse_source_fileparse_source_file_with_contentParse functions and return both the function list and file content.REQ-DDB-GUARD-018—clew/guard/config.py:949
105parse_source_file_with_contentparse_content_for_fileParse functions out of arbitrary content using a file path's language config.REQ-DDB-GUARD-018—clew/guard/config.py:964
106parse_content_for_fileget_language_configMatch a file path to its language config by extension.REQ-DDB-GUARD-013—clew/guard/config.py:985
107get_language_configget_validateAccess the validate section of config.——clew/guard/config.py:902
108parse_content_for_fileresolve_parse_settingsResolve comment style and body style for a given language config.REQ-DDB-GUARD-013—clew/guard/config.py:989
109resolve_parse_settingsget_validateAccess the validate section of config.——clew/guard/config.py:1014
110parse_content_for_filelanguage_for_fileResolve a file path to a language name using config extensions.REQ-DDB-GUARD-020—clew/guard/config.py:990
111language_for_filelanguage_for_extensionResolve a file extension to a language name.REQ-DDB-GUARD-020—clew/guard/ts_languages.py:162
112language_for_file_looks_like_cpp_headerDetect C++ constructs in a .h file to route to cpp grammar.——clew/guard/ts_languages.py:163
113language_for_file_language_from_configLook up language name from user config extensions.—if (line 168)clew/guard/ts_languages.py:168
114parse_content_for_fileparse_functionsParse source code to find functions and their associated doxygen comments.REQ-DDB-GUARD-018—clew/guard/config.py:998
115parse_functionsparse_functions_tsParse functions from source content using tree-sitter.REQ-DDB-GUARD-020—clew/guard/parser.py:223
116parse_functions_tsget_parser_for_languageGet a tree-sitter Parser for a named language.REQ-DDB-GUARD-020—clew/guard/ts_parser.py:588
117parse_functions_tsget_language_specGet the LanguageSpec for a named language.REQ-DDB-GUARD-020—clew/guard/ts_parser.py:593
118parse_functions_ts_collect_functionsVersion 2: the payload carries typed class members ( variables ).REQ-DDB-GUARD-020—clew/guard/ts_parser.py:601
119_collect_functions_is_rust_test_itemWhether a Rust item is test code: a test function or the #[cfg(test)] module.REQ-DDB-GUARD-024loop (line 647)clew/guard/ts_parser.py:648
120_is_rust_test_item_rust_attributesThe attribute texts written directly above a Rust item, e.g.——clew/guard/ts_parser.py:492
121_collect_functions_enclosing_class_forResolve enclosing class name when entering a class/struct node.—loop (line 647)clew/guard/ts_parser.py:650
122_enclosing_class_for_rust_impl_self_typeThe self type an impl block is for, without generic arguments: Foo for impl Trait for Foo .—if (line 786)clew/guard/ts_parser.py:786
123_collect_functions_declared_functionThe function declarator a C/C++ declaration declares, or None for anything else.—loop (line 647)clew/guard/ts_parser.py:651
124_collect_functions_append_declarationRecord a documented C/C++ declaration as a Function (2.0.0, PG2).REQ-DDB-GUARD-020loop (line 647), if (line 652)clew/guard/ts_parser.py:652
125_append_declaration_extract_function_nameExtract function name from an AST function node.——clew/guard/ts_parser.py:729
126_append_declaration_find_preceding_doxygenFind the doxygen comment block preceding a function node.REQ-DDB-GUARD-020—clew/guard/ts_parser.py:730
127_append_declaration_qualified_enclosingExtract enclosing class from a qualified function declarator (Foo::bar).——clew/guard/ts_parser.py:741
128_append_declaration_extract_signatureExtract a normalized parameter-list signature from a function node.REQ-DDB-GUARD-020—clew/guard/ts_parser.py:742
129_collect_functions_resolve_function_nodeResolve a child node to a function_definition, handling wrappers.REQ-DDB-GUARD-020loop (line 647)clew/guard/ts_parser.py:656
130_resolve_function_node_unwrap_decoratedUnwrap a decorated_definition to get the inner definition.——clew/guard/ts_parser.py:199
131_resolve_function_node_bound_functionVersion 1.1 sees through forwardRef / memo , so a wrapped React component is a function: without it a component declared that way had no definition and every that rendered it resolved to nothing.REQ-DDB-GUARD-025—clew/guard/ts_parser.py:202
132_collect_functions_extract_function_nameExtract function name from an AST function node.—loop (line 647), if (line 658)clew/guard/ts_parser.py:658
133_extract_function_name_name_from_declaratorExtract the identifier from a C/C++ function_declarator node.——clew/guard/ts_parser.py:251
134_collect_functions_function_carrierThe node that carries a function's body and parameters .—loop (line 647), if (line 658)clew/guard/ts_parser.py:661
135_function_carrier_bound_functionVersion 1.1 sees through forwardRef / memo , so a wrapped React component is a function: without it a component declared that way had no definition and every that rendered it resolved to nothing.REQ-DDB-GUARD-025—clew/guard/ts_parser.py:188
136_collect_functions_find_preceding_doxygenFind the doxygen comment block preceding a function node.REQ-DDB-GUARD-020loop (line 647), if (line 658)clew/guard/ts_parser.py:664
137_find_preceding_doxygen_preceding_nodeFind the node preceding a definition, stepping out of an enclosing body.REQ-DDB-GUARD-019—clew/guard/ts_parser.py:373
138_find_preceding_doxygen_collect_rust_docCollect the rustdoc outer doc comment ending at prev .REQ-DDB-GUARD-024if (line 377)clew/guard/ts_parser.py:377
139_find_preceding_doxygen_skip_rust_attributesStep back over the #[...] attributes between a Rust item and its doc comment.REQ-DDB-GUARD-024if (line 377)clew/guard/ts_parser.py:377
140_find_preceding_doxygen_collect_python_commentsCollect Python-style doxygen comment lines preceding a node.REQ-DDB-GUARD-019elif (line 379)clew/guard/ts_parser.py:379
141_find_preceding_doxygen_collect_c_commentCollect C-style doxygen comment block preceding a node.—else (line 380)clew/guard/ts_parser.py:381
142_find_preceding_doxygen_find_python_docstring_blockFind a docstring inside a Python function body and parse doxygen tags.REQ-DDB-GUARD-021if (line 383), if (line 384)clew/guard/ts_parser.py:384
143_find_preceding_doxygenparse_doxygen_tagsParse all doxygen tag entries from comment text.REQ-DDB-GUARD-019—clew/guard/ts_parser.py:398
144_find_preceding_doxygenapply_autobriefSupply @brief from a rustdoc block's summary paragraph when none is written.REQ-DDB-GUARD-024if (line 400)clew/guard/ts_parser.py:400
145_find_preceding_doxygen_last_rowThe last row a node occupies.——clew/guard/ts_parser.py:403
146_collect_functions_qualified_enclosingExtract enclosing class from a qualified function declarator (Foo::bar).—loop (line 647), if (line 658)clew/guard/ts_parser.py:665
147_collect_functions_extract_signatureExtract a normalized parameter-list signature from a function node.REQ-DDB-GUARD-020loop (line 647), if (line 658)clew/guard/ts_parser.py:673
148_extract_signature_function_carrierThe node that carries a function's body and parameters .——clew/guard/ts_parser.py:262
149_collect_functions_js_returns_voidWhether a JS/TS function returns no value, as far as its annotation says.REQ-DDB-GUARD-025loop (line 647), if (line 658)clew/guard/ts_parser.py:674
150_js_returns_void_function_carrierThe node that carries a function's body and parameters .——clew/guard/ts_parser.py:760
151_collect_functions_produced_classThe mixin class a bound function produces, or None.—loop (line 647), if (line 658)clew/guard/ts_parser.py:679
152_produced_class_function_carrierThe node that carries a function's body and parameters .——clew/guard/ts_parser.py:614
153_collect_functions_collect_functionsVersion 2: the payload carries typed class members ( variables ).REQ-DDB-GUARD-020loop (line 647), if (line 658), if (line 681), if (line 683)clew/guard/ts_parser.py:683
154_collect_functions_collect_functionsVersion 2: the payload carries typed class members ( variables ).REQ-DDB-GUARD-020loop (line 647), else (line 684)clew/guard/ts_parser.py:685
155validate_fileunconfigured_languageName a language the gate ships but this config did not enable, for one file.REQ-DDB-GUARD-013if (line 227)clew/guard/main.py:233
156validate_filecheck_file_presenceCheck for file-level doxygen documentation block.REQ-DDB-GUARD-006try (line 241)clew/guard/main.py:242
157check_file_presenceget_validateAccess the validate section of config.——clew/guard/checks.py:1124
158check_file_presence_find_file_doxygen_startFind the line index of the file-level doxygen block start.REQ-DDB-GUARD-006—clew/guard/checks.py:1131
159check_file_presence_first_code_lineFind the first non-blank, non-preprocessor line number.—if (line 1133)clew/guard/checks.py:1133
160check_file_presence_suggest_file_skeletonBuild a language-appropriate file-level doxygen skeleton suggestion.—if (line 1133)clew/guard/checks.py:1141
161check_file_presence_check_file_block_tagsCheck required tags in a file-level doxygen block.REQ-DDB-GUARD-006—clew/guard/checks.py:1146
162_check_file_block_tags_extract_file_block_text———clew/guard/checks.py:1154
163_extract_file_block_text_docstring_blockA module docstring's text, from its opening quotes to its closing ones.—if (line 1198)clew/guard/checks.py:1198
164_check_file_block_tagsparse_doxygen_tagsParse all doxygen tag entries from comment text.REQ-DDB-GUARD-019—clew/guard/checks.py:1157
165parse_doxygen_tags_mask_escaped_atMask escaped at-signs so they are not detected as tags.—loop (line 143)clew/guard/parser.py:145
166parse_doxygen_tags_split_inline_tagsSplit a line into segments at inline tag boundaries.—loop (line 143), loop (line 146)clew/guard/parser.py:146
167parse_doxygen_tags_finalize_tagStore the current tag's value and reset state.—loop (line 143), loop (line 146), if (line 149)clew/guard/parser.py:149
168_finalize_tag_unmask_escaped_atRestore masked at-signs to a single literal at-sign.—if (line 125)clew/guard/parser.py:125
169parse_doxygen_tags_finalize_tagStore the current tag's value and reset state.—loop (line 143), loop (line 146), elif (line 153)clew/guard/parser.py:153
170parse_doxygen_tags_finalize_tagStore the current tag's value and reset state.——clew/guard/parser.py:159
171_check_file_block_tagsapply_autobriefSupply @brief from a rustdoc block's summary paragraph when none is written.REQ-DDB-GUARD-024if (line 1171)clew/guard/checks.py:1173
172apply_autobrief_mask_escaped_atMask escaped at-signs so they are not detected as tags.—loop (line 181)clew/guard/parser.py:182
173apply_autobrief_split_inline_tagsSplit a line into segments at inline tag boundaries.—loop (line 181)clew/guard/parser.py:190
174apply_autobrief_unmask_escaped_atRestore masked at-signs to a single literal at-sign.—if (line 195)clew/guard/parser.py:195
175validate_filecheck_presenceVerify every function has a doxygen comment with @brief and the revision tag.REQ-DDB-GUARD-001—clew/guard/main.py:245
176check_presenceget_validateAccess the validate section of config.——clew/guard/checks.py:105
177check_presence_is_void_functionCheck if a function returns void based on its definition lines.REQ-DDB-GUARD-005loop (line 118), if (line 120)clew/guard/checks.py:121
178_is_void_function_is_rust_unit_fnWhether a Rust function returns unit, read from its signature text.REQ-DDB-GUARD-005if (line 268)clew/guard/checks.py:268
179check_presence_suggest_skeletonBuild a language-appropriate doxygen skeleton suggestion.—loop (line 118), if (line 120)clew/guard/checks.py:131
180check_presence_brief_hintHow to supply a missing brief, in the file's own convention.—loop (line 118), if (line 138)clew/guard/checks.py:146
181validate_filecheck_return_presenceVerify non-void functions have @return or @returns tag.REQ-DDB-GUARD-005if (line 247)clew/guard/main.py:247
182check_return_presenceget_validateAccess the validate section of config.——clew/guard/checks.py:187
183check_return_presence_require_returnWhether @return is required for this file: the language's own setting, else the global one.REQ-DDB-GUARD-005—clew/guard/checks.py:188
184check_return_presence_is_void_functionCheck if a function returns void based on its definition lines.REQ-DDB-GUARD-005loop (line 193)clew/guard/checks.py:203
185validate_filecheck_tagsCheck that doxygen tags match configured patterns, prefixes, and markers.REQ-DDB-GUARD-003—clew/guard/main.py:248
186check_tagsget_validateAccess the validate section of config.——clew/guard/checks.py:623
187check_tags_validate_tag_valueCheck one tag value against pattern, prefix, and contains rules.—loop (line 631), loop (line 635), loop (line 638)clew/guard/checks.py:639
188validate_filecheck_req_coverageVerify functions have requirement or exemption tags when requirements are configured.REQ-DDB-GUARD-004—clew/guard/main.py:249
189check_req_coverageget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/checks.py:351
190check_req_coverage_has_active_requirementsCheck if any requirements pass the version gate filter.——clew/guard/checks.py:356
191_has_active_requirementsload_requirements_fullLoad full requirement rows from the configured catalog.REQ-DDB-GUARD-011—clew/guard/checks.py:335
192_has_active_requirementsfilter_requirements_by_versionFilter requirements to those active at the configured current version.REQ-DDB-GUARD-009—clew/guard/checks.py:336
193filter_requirements_by_versionget_validateAccess the validate section of config.——clew/guard/impact.py:432
194filter_requirements_by_versionget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/impact.py:434
195filter_requirements_by_version_summarise_idRender a catalog key for an error message, truncated and single-line.REQ-DDB-GUARD-016if (line 446)clew/guard/impact.py:446
196filter_requirements_by_versionparse_versionParse a version string like "v1.8.2" into a comparable tuple.REQ-DDB-GUARD-014—clew/guard/impact.py:456
197filter_requirements_by_versioncompare_versionsCompare two version tuples, padding shorter one with zeros.——clew/guard/impact.py:460
198filter_requirements_by_versionparse_versionParse a version string like "v1.8.2" into a comparable tuple.REQ-DDB-GUARD-014—clew/guard/impact.py:460
199check_req_coverage_has_version_gateCheck if version gate is configured.——clew/guard/checks.py:356
200_has_version_gateget_validateAccess the validate section of config.——clew/guard/checks.py:324
201_has_version_gateget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/checks.py:325
202check_req_coverage_exemption_hintRender the exemption tags for an error message, derived from the set.—loop (line 361), if (line 374)clew/guard/checks.py:383
203validate_filecheck_bus_tagsVerify that functions crossing a bus carry a bus tag naming a known bus.REQ-DDB-GUARD-026if (line 251)clew/guard/main.py:251
204check_bus_tagsget_validateAccess the validate section of config.——clew/guard/checks.py:1328
205check_bus_tags_bus_tagsThe bus tags a configuration enforces; empty when no validate.bus section exists.——clew/guard/checks.py:1331
206_bus_tagsget_validateAccess the validate section of config.——clew/guard/checks.py:1304
207_bus_tags_event_tagsThe event vocabulary: the declaration's event_tags: , else the index's built-in one.——clew/guard/checks.py:1306
208check_bus_tags_bus_vocabularyViolations for bus tags naming a bus outside the vocabulary.—loop (line 1337)clew/guard/checks.py:1341
209check_bus_tags_crosses_busWhether a function is in the bus rule's scope.—loop (line 1337)clew/guard/checks.py:1344
210check_bus_tags_exemption_hintRender the exemption tags for an error message, derived from the set.—loop (line 1337), if (line 1345)clew/guard/checks.py:1354
211validate_filecheck_unknown_tagsCheck for unknown tags with Levenshtein-based suggestions.REQ-DDB-GUARD-001loop (line 252)clew/guard/main.py:253
212check_unknown_tagsget_validateAccess the validate section of config.——clew/guard/checks.py:766
213check_unknown_tags_event_tagsThe event vocabulary: the declaration's event_tags: , else the index's built-in one.——clew/guard/checks.py:775
214check_unknown_tags_suggest_tagFind the closest known tag name using edit distance.—loop (line 780), if (line 788)clew/guard/checks.py:788
215_suggest_tag_edit_distanceCompute Levenshtein edit distance between two strings.—loop (line 911)clew/guard/checks.py:912
216_edit_distance_edit_distanceCompute Levenshtein edit distance between two strings.—if (line 924)clew/guard/checks.py:924
217_edit_distancelist———clew/guard/checks.py:925
218validate_filecheck_removed_tagsRefuse a tag removed in 2.0.0, naming its replacement.REQ-DDB-GUARD-001loop (line 252)clew/guard/main.py:254
219validate_filecheck_exemption_reasonsWhen validate.exemption_reason is required , refuse an exemption tag with no reason.REQ-DDB-GUARD-001loop (line 252)clew/guard/main.py:255
220check_exemption_reasonsget_validateAccess the validate section of config.——clew/guard/checks.py:836
221validate_filecheck_duplicate_tagsFlag single-valued doxygen tags that appear more than once in one block.REQ-DDB-GUARD-007loop (line 252)clew/guard/main.py:256
222check_duplicate_tagsget_validateAccess the validate section of config.——clew/guard/checks.py:876
223validate_filecheck_req_existsCross-validate requirement tag references against the requirements file.REQ-DDB-GUARD-001loop (line 252)clew/guard/main.py:257
224check_req_existsget_validateAccess the validate section of config.——clew/guard/checks.py:1016
225check_req_exists_uncheckableA tag that cannot be checked because no catalogue is declared (GH #68).REQ-DDB-GUARD-027loop (line 1022), if (line 1026)clew/guard/checks.py:1026
226validate_filecheck_fails_when_existsEach @fails_when id must be a failure mode the catalogue declares.REQ-DDB-GUARD-001loop (line 252)clew/guard/main.py:258
227validate_filecheck_fails_when_markersEach inline fails_when: marker in a function's body must name a declared mode.REQ-DDB-GUARD-001loop (line 252), if (line 260)clew/guard/main.py:261
228check_fails_when_markersmarkerThe failure-mode id an inline marker on this source line names.—loop (line 1096)clew/guard/checks.py:1097
229validate_fileget_file_at_revisionGet a file's content as of a given revision.REQ-DDB-GUARD-023if (line 265)clew/guard/main.py:265
230get_file_at_revisionrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:216
231run_gitgit_argvOne git argv with every command-valued configuration key disarmed.REQ-DDB-CONFIG-001—clew/guard/git.py:73
232validate_fileparse_content_for_fileParse functions out of arbitrary content using a file path's language config.REQ-DDB-GUARD-018if (line 265)clew/guard/main.py:267
233validate_filecheck_version_stalenessDetect stale @version tags when function bodies have changed since HEAD.REQ-DDB-GUARD-002if (line 265)clew/guard/main.py:272
234check_version_stalenessget_validateAccess the validate section of config.——clew/guard/checks.py:580
235check_version_staleness_index_by_identityBuild a lookup of HEAD functions keyed by (enclosing_class, name, signature).——clew/guard/checks.py:598
236check_version_staleness_index_by_identityBuild a lookup of HEAD functions keyed by (enclosing_class, name, signature).——clew/guard/checks.py:599
237check_version_staleness_pair_copiesPair one identity's current copies with its HEAD copies.—loop (line 602)clew/guard/checks.py:603
238_pair_copies_body_textExtract a function's definition-through-body source text.—loop (line 458)clew/guard/checks.py:459
239_pair_copies_body_textExtract a function's definition-through-body source text.—loop (line 458)clew/guard/checks.py:460
240_pair_copies… 1 not run————
241check_version_staleness_pair_by_namePair a function left unmatched by identity with its HEAD self, by name, if unambiguous.REQ-DDB-GUARD-002—clew/guard/checks.py:604
242check_version_staleness_check_one_versionCheck one function's @version against its HEAD counterpart.—loop (line 607)clew/guard/checks.py:608
243_check_one_version_body_textExtract a function's definition-through-body source text.——clew/guard/checks.py:522
244_validate_files_report_skipsReport, on the default surface, the files the gate did not check.——clew/guard/main.py:340
245run_precommitreport_dirThe directory the impact report is written to and read from.——clew/guard/main.py:476
246run_precommitvalidate_output_pathReject output paths containing directory traversal or absolute components.——clew/guard/main.py:477
247validate_output_pathresolve_contained_pathResolve a config-supplied path and require it to stay inside the repo.REQ-DDB-GUARD-016—clew/guard/config.py:874
248run_precommitget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/main.py:479
249run_precommitget_branch_diff_rangeBuild a diff range string from merge-base to HEAD.REQ-DDB-GUARD-023if (line 482)clew/guard/main.py:482
250get_branch_diff_rangeget_merge_baseDetect the merge-base between current HEAD and a target branch.REQ-DDB-GUARD-023—clew/guard/git.py:187
251get_merge_baserun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:171
252get_branch_diff_range_rev_parse_headGet the current HEAD commit SHA.——clew/guard/git.py:190
253_rev_parse_headrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:200
254run_precommitimpact_baseThe ref the impact report diffs against ( guard.impact.base ).—if (line 482)clew/guard/main.py:482
255run_precommitimpact_reportThe full report: entries with covering tests and via , and the unmapped lists.REQ-DDB-GUARD-010if (line 482)clew/guard/main.py:483
256impact_reportget_changed_filesThe files a revision range (or the index) changed.REQ-DDB-GUARD-023if (line 853)clew/guard/impact.py:855
257get_changed_filesrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:122
258impact_reportcollect_changesThe changed functions, and the changed files that hold none of them.REQ-DDB-GUARD-010—clew/guard/impact.py:856
259collect_changes_collect_changed_linesCollect all changed lines for a file from branch diff and/or staged changes.—loop (line 188)clew/guard/impact.py:196
260_collect_changed_lines_get_file_diffGet raw diff output for a single file.——clew/guard/impact.py:90
261_get_file_diffget_staged_diffRun git diff cached for a single file.REQ-DDB-GUARD-023if (line 114)clew/guard/impact.py:114
262get_staged_diffrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:89
263_get_file_diffget_diffRun git diff for a file over a given revision range.REQ-DDB-GUARD-023if (line 116)clew/guard/impact.py:116
264get_diffrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:105
265_collect_changed_linesparse_changed_linesExtract the set of modified line numbers from a unified diff.REQ-DDB-GUARD-023if (line 92)clew/guard/impact.py:92
266_collect_changed_lines_get_file_diffGet raw diff output for a single file.—if (line 94)clew/guard/impact.py:94
267_collect_changed_linesparse_changed_linesExtract the set of modified line numbers from a unified diff.REQ-DDB-GUARD-023if (line 94), if (line 98)clew/guard/impact.py:98
268collect_changes_extract_changed_functionsFind changed functions in a single file given changed line numbers.REQ-DDB-GUARD-008loop (line 188)clew/guard/impact.py:198
269_extract_changed_functionsparse_source_fileParse all functions from a source file using language-aware settings.REQ-DDB-GUARD-018—clew/guard/impact.py:129
270impact_reportfind_indexThe existing index for a repository.REQ-DDB-GUARD-010—clew/guard/impact.py:859
271find_indexregistered_indexThe database the MCP target registry has allocated for a repository.——clew/indexlocate.py:30
272impact_reportbuild_reportGroup changes by requirement, and with a reach step, add tests, via and unmapped.REQ-DDB-GUARD-010—clew/guard/impact.py:860
273build_reportload_requirementsLoad requirement id -> name mapping (convenience wrapper).REQ-DDB-GUARD-009—clew/guard/impact.py:580
274load_requirements_get_requirements_configExtract requirements config, raising if a declared catalog is unusable.REQ-DDB-GUARD-011—clew/guard/impact.py:414
275load_requirementsload_requirements_fullLoad full requirement rows from the configured catalog.REQ-DDB-GUARD-011—clew/guard/impact.py:418
276build_report_place_untaggedFile an untagged change under the requirements its callers reach, else as unmapped.—loop (line 583), if (line 587)clew/guard/impact.py:587
277build_report_reviewersThe owners of a requirement's changed files, first-seen order, each once.——clew/guard/impact.py:594
278run_precommit_write_reportWrite the impact report's markdown and JSON into the report directory.—if (line 482)clew/guard/main.py:492
279_write_reportvalidate_output_pathReject output paths containing directory traversal or absolute components.——clew/guard/main.py:625
280_write_reportvalidate_output_pathReject output paths containing directory traversal or absolute components.——clew/guard/main.py:626
281_write_reportformat_markdownRender impact entries as a markdown table with summary.REQ-DDB-GUARD-010—clew/guard/main.py:628
282format_markdown_unmapped_markdownThe unmapped sections: changes and files that reach no requirement.—if (line 673)clew/guard/impact.py:673
283format_markdown_markdown_rowOne requirement's table row.—loop (line 684)clew/guard/impact.py:686
284_markdown_row_cellMake one table cell out of repo-controlled text.——clew/guard/impact.py:699
285_markdown_row_cellMake one table cell out of repo-controlled text.——clew/guard/impact.py:701
286_markdown_row_cellMake one table cell out of repo-controlled text.——clew/guard/impact.py:705
287_markdown_row_cellMake one table cell out of repo-controlled text.——clew/guard/impact.py:706
288_markdown_row_cellMake one table cell out of repo-controlled text.——clew/guard/impact.py:707
289format_markdown_unmapped_markdownThe unmapped sections: changes and files that reach no requirement.——clew/guard/impact.py:691
290_write_reportformat_jsonRender impact entries as a versioned JSON object.REQ-DDB-GUARD-010—clew/guard/main.py:629
291run_precommitgit_addStage files for the next git commit.—if (line 482)clew/guard/main.py:492
292git_addrun_gitRun a git command through the injectable runner, returning None on failure.REQ-DDB-GUARD-023—clew/guard/git.py:161
293run_precommitformat_markdownRender impact entries as a markdown table with summary.REQ-DDB-GUARD-010if (line 482)clew/guard/main.py:493
294run_precommit_coverage_gateRun the coverage gate for the pre-commit hook.REQ-DDB-GUARD-022—clew/guard/main.py:498
295_coverage_gateget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/main.py:512
296_coverage_gateanalyze_coverageAnalyze requirement coverage across all documented functions.REQ-DDB-GUARD-022—clew/guard/main.py:514
297analyze_coverageload_requirements_fullLoad full requirement rows from the configured catalog.REQ-DDB-GUARD-011—clew/guard/coverage.py:37
298analyze_coveragecollect_tagged_functionsWalk source directories and collect every documented function.REQ-DDB-GUARD-022—clew/guard/coverage.py:38
299collect_tagged_functionsfind_source_filesFind source files for configured languages, applying validate.exclude patterns.REQ-DDB-GUARD-013loop (line 179)clew/guard/tags.py:180
300find_source_filesget_validateAccess the validate section of config.——clew/guard/tags.py:107
301find_source_files_git_ls_filesList tracked source files under a directory via git ls-files.——clew/guard/tags.py:114
302_git_ls_filesgit_argvOne git argv with every command-valued configuration key disarmed.REQ-DDB-CONFIG-001try (line 60)clew/guard/tags.py:61
303_git_ls_filesgit_envThe current environment with git's hook-repository overrides removed.REQ-DDB-CONFIG-001try (line 60)clew/guard/tags.py:70
304find_source_files_rglob_source_filesFallback source discovery via filesystem glob.——clew/guard/tags.py:115
305find_source_filesexcluded_byThe validate.exclude entry that excludes a path, or None.REQ-DDB-GUARD-013—clew/guard/tags.py:124
306find_source_filesgate_exclusionWhy the gate should not read a file, or None when it should.REQ-DDB-CONFIG-009—clew/guard/tags.py:124
307collect_tagged_functions_process_source_fileParse one source file into its documented functions.—loop (line 179), loop (line 182)clew/guard/tags.py:183
308_process_source_fileparse_source_file_with_contentParse functions and return both the function list and file content.REQ-DDB-GUARD-018—clew/guard/tags.py:160
309_process_source_file_extract_tagged_functionBuild a TaggedFunction for a documented function, or None if undocumented.——clew/guard/tags.py:165
310analyze_coverage_collect_req_idsCollect all requirement IDs referenced across tagged functions.REQ-DDB-GUARD-022—clew/guard/coverage.py:41
311analyze_coverage_collect_unmapped_functionsFind documented functions with no requirement mapping, skipping exempt ones.REQ-DDB-GUARD-022—clew/guard/coverage.py:42
312analyze_coverage_exemptThe untagged requirements whose declared status exempts them from coverage.REQ-DDB-GUARD-022—clew/guard/coverage.py:43
313_exemptget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/coverage.py:205
314_exemptexemptionWhy a catalogue row is exempt from coverage, or None: its status, or a named field.REQ-DDB-GUARD-022loop (line 208)clew/guard/coverage.py:209
315exemptionlist———clew/guard/config.py:854
316analyze_coveragetraceabilityThe requirement ratio: functions with a req tag among those with a req tag or an exemption.REQ-DDB-GUARD-022—clew/guard/coverage.py:53
317traceabilityis_test_pathWhether one repo-relative path is test code under the given patterns.—loop (line 150)clew/guard/coverage.py:151
318is_test_path_matcherOne compiled regex equivalent to "any of these globs matches".——clew/testscope.py:135
319analyze_coveragecovered_viaThe uncovered requirements a pinned dependency realises: implemented or exempt at its pin.REQ-DDB-GUARD-022if (line 57)clew/guard/coverage.py:57
320covered_viaget_requirementsAccess the requirements catalog section (the top-level requirements: ).——clew/guard/coverage.py:75
321covered_viaread_catalog_atRead a requirements catalogue from a local path or a pinned revision of a local checkout.REQ-DDB-GUARD-027loop (line 77), try (line 82)clew/guard/coverage.py:82
322covered_via_realisedThe uncovered requirements one dependency row realises, and how.—loop (line 77), loop (line 86), loop (line 87)clew/guard/coverage.py:87
323_realisedlink_idsThe ids an entry links upward to, through satisfies or serves .REQ-DDB-SCHEMA-015—clew/guard/coverage.py:106
324_realised_tagged_at_pinWhether a dependency's code tags a requirement at its pinned revision.——clew/guard/coverage.py:109
325_tagged_at_pingit_textRun git in a local checkout through the hardened environment.REQ-DDB-GUARD-027—clew/guard/coverage.py:123
326_realisedexemptionWhy a catalogue row is exempt from coverage, or None: its status, or a named field.REQ-DDB-GUARD-022—clew/guard/coverage.py:111
327_coverage_gatecoverage_gapsWhether a coverage report fails the gate.REQ-DDB-GUARD-022—clew/guard/main.py:515
328_coverage_gateformat_coverage_textFormat coverage report as text.REQ-DDB-GUARD-022—clew/guard/main.py:517
329format_coverage_texttraceability_lineOne line stating the requirement ratio, its per-tag counts and the floor.—if (line 250)clew/guard/coverage.py:250
330format_coverage_text_whyWhy one exempt requirement is exempt: its reason, else its status.——clew/guard/coverage.py:255
331format_coverage_text_viaOne requirement covered through a dependency, as a report line.——clew/guard/coverage.py:257
332_coverage_gatetraceability_lineOne line stating the requirement ratio, its per-tag counts and the floor.——clew/guard/main.py:517
333_runbuild_parserCreate argparse parser with validate/impact/coverage subcommands.——clew/guard/main.py:737
334_run_setup_loggingConfigure logging based on verbosity flag.——clew/guard/main.py:739
335_run_dispatch_subcommandDispatch an explicit subcommand to its handler.——clew/guard/main.py:740
336_dispatch_subcommandrun_validateRun validation checks on all specified files and report violations.REQ-DDB-GUARD-001—clew/guard/main.py:693
337run_validate_report_violationsPrint violations and return exit code.—if (line 368)clew/guard/main.py:370
338run_validateresolve_version_gateResolve the version gate in place, failing if it is declared but unresolvable.REQ-DDB-GUARD-014—clew/guard/main.py:373
339run_validate_report_violationsPrint violations and return exit code.——clew/guard/main.py:379
340run_validate_validate_filesValidate a list of files and report violations.——clew/guard/main.py:380
341_dispatch_subcommand_run_impact_commandExecute the impact subcommand.REQ-DDB-GUARD-010—clew/guard/main.py:694
342_run_impact_commandimpact_reportThe full report: entries with covering tests and via , and the unmapped lists.REQ-DDB-GUARD-010—clew/guard/main.py:599
343_run_impact_commandformat_reportDispatch to the appropriate formatter based on config.—else (line 608)clew/guard/main.py:609
344format_report… 1 not run————
345_run_impact_command… 2 not run————
346_dispatch_subcommand_run_coverage_commandRun the coverage subcommand.——clew/guard/main.py:695
347_run_coverage_commandrun_coverageRun coverage analysis and return exit code.REQ-DDB-GUARD-022—clew/guard/main.py:647
348run_coverageanalyze_coverageAnalyze requirement coverage across all documented functions.REQ-DDB-GUARD-022—clew/guard/coverage.py:335
349run_coveragecoverage_gapsWhether a coverage report fails the gate.REQ-DDB-GUARD-022—clew/guard/coverage.py:344
350_dispatch_subcommand_run_config_commandEmit the consumer contract as JSON.REQ-DDB-GUARD-015—clew/guard/main.py:696
351_run_config_commandbuild_effective_contractBuild the effective-config contract for the config currently in force.REQ-DDB-GUARD-015—clew/guard/main.py:661
352_run_config_commandbuild_schema_contractBuild the full config contract: schema, defaults, and catalog constants.REQ-DDB-GUARD-015—clew/guard/main.py:661
353_dispatch_subcommand_run_files_commandEmit the exact post-exclude file set the gate walks, as JSON.REQ-DDB-GUARD-015—clew/guard/main.py:697
354_run_files_commandbuild_files_contractBuild the exact post-exclude file set the gate walks for the given roots.REQ-DDB-GUARD-015—clew/guard/main.py:673
355_dispatch_subcommand_run_doxyfile_commandEmit the Doxyfile fragment for the current config.REQ-DDB-GUARD-017—clew/guard/main.py:698
356_run_doxyfile_commandbuild_fragmentBuild the Doxyfile fragment for the given config.REQ-DDB-GUARD-017—clew/guard/main.py:684
357_runload_configLoad the guard: section of .clew.yaml and merge with built-in defaults.REQ-DDB-GUARD-012—clew/guard/main.py:740

Functions

234 functions

This diagram as Mermaid · PlantUML · Graphviz DOT

Quick views

234 functions, each with its quick view