5454 NON_AUTHORITATIVE_TEST_EVIDENCE_MAX_TOTAL_BYTES as _ANALYSIS_MAX_TOTAL_BYTES ,
5555)
5656from .scanner_config import (
57- default_style_guide_user_paths as _config_default_style_guide_user_paths ,
58- load_section_display_titles as _config_load_section_display_titles ,
5957 refresh_policy as _config_refresh_policy ,
6058 resolve_default_style_guide_source as _config_resolve_default_style_guide_source ,
61- resolve_section_selector as _config_resolve_section_selector ,
6259)
6360from .scanner_io import (
6461 collect_yaml_parse_failures as _dataload_collect_yaml_parse_failures ,
6562 iter_role_yaml_candidates as _dataload_iter_role_yaml_candidates ,
66- parse_yaml_candidate as _dataload_parse_yaml_candidate ,
6763 map_argument_spec_type as _dataload_map_argument_spec_type ,
6864)
6965from .scanner_extract import (
70- build_collection_compliance_notes as _requirements_build_collection_compliance_notes ,
7166 build_requirements_display as _runbook_report_build_requirements_display ,
7267 iter_role_argument_spec_entries as _dataload_iter_role_argument_spec_entries ,
7368 iter_role_variable_map_candidates as _scan_discovery_iter_role_variable_map_candidates ,
@@ -240,15 +235,6 @@ def _refresh_policy(override_path: str | None = None) -> None:
240235 _ve ._refresh_policy_derived_state (_POLICY )
241236
242237
243- def _default_style_guide_user_paths () -> list [Path ]:
244- """Return user-level style guide paths honoring XDG conventions."""
245- return _config_default_style_guide_user_paths (
246- xdg_data_home_env = XDG_DATA_HOME_ENV ,
247- style_guide_data_dirname = STYLE_GUIDE_DATA_DIRNAME ,
248- style_guide_source_filename = DEFAULT_STYLE_GUIDE_SOURCE_FILENAME ,
249- )
250-
251-
252238def resolve_default_style_guide_source (explicit_path : str | None = None ) -> str :
253239 """Resolve default style guide source path using Linux-aware precedence.
254240
@@ -350,26 +336,6 @@ def _collect_yaml_parse_failures(
350336 )
351337
352338
353- def _iter_role_yaml_candidates (
354- role_root : Path ,
355- * ,
356- exclude_paths : list [str ] | None ,
357- ):
358- """Yield role-local YAML files while honoring ignored and excluded paths."""
359- yield from _dataload_iter_role_yaml_candidates (
360- role_root ,
361- exclude_paths = exclude_paths ,
362- ignored_dirs = IGNORED_DIRS ,
363- is_relpath_excluded_fn = _is_relpath_excluded ,
364- is_path_excluded_fn = _is_path_excluded ,
365- )
366-
367-
368- def _parse_yaml_candidate (candidate : Path , role_root : Path ) -> dict [str , object ] | None :
369- """Parse one YAML candidate and return a failure payload when parsing fails."""
370- return _dataload_parse_yaml_candidate (candidate , role_root )
371-
372-
373339load_meta = _scan_discovery_load_meta
374340
375341
@@ -416,9 +382,6 @@ def load_variables(
416382normalize_requirements = _requirements_normalize_requirements
417383
418384
419- _build_collection_compliance_notes = _requirements_build_collection_compliance_notes
420-
421-
422385def collect_role_contents (
423386 role_path : str ,
424387 exclude_paths : list [str ] | None = None ,
@@ -472,26 +435,6 @@ def _load_role_variable_maps(
472435 )
473436
474437
475- def _collect_dynamic_task_include_tokens (
476- role_path : str ,
477- exclude_paths : list [str ] | None ,
478- ) -> set [str ]:
479- """Collect unresolved Jinja identifier tokens from dynamic task includes."""
480- return _variable_pipeline .collect_dynamic_task_include_tokens (
481- role_path = role_path ,
482- exclude_paths = exclude_paths ,
483- )
484-
485-
486- def _collect_dynamic_include_var_tokens (
487- dynamic_include_vars_refs : list [str ],
488- ) -> set [str ]:
489- """Collect unresolved Jinja identifier tokens from dynamic include_vars refs."""
490- return _variable_pipeline .collect_dynamic_include_var_tokens (
491- dynamic_include_vars_refs = dynamic_include_vars_refs ,
492- )
493-
494-
495438def _build_static_variable_rows (
496439 * ,
497440 role_root : Path ,
@@ -510,148 +453,6 @@ def _build_static_variable_rows(
510453 )
511454
512455
513- def _append_include_vars_rows (
514- * ,
515- role_path : str ,
516- role_root : Path ,
517- rows : list [dict ],
518- rows_by_name : dict [str , dict ],
519- exclude_paths : list [str ] | None ,
520- ) -> set [str ]:
521- """Merge include_vars-derived values into variable insight rows."""
522- return _variable_pipeline .append_include_vars_rows (
523- role_path = role_path ,
524- role_root = role_root ,
525- rows = rows ,
526- rows_by_name = rows_by_name ,
527- exclude_paths = exclude_paths ,
528- )
529-
530-
531- def _collect_include_var_sources (
532- * ,
533- role_path : str ,
534- role_root : Path ,
535- exclude_paths : list [str ] | None ,
536- ) -> dict [str , list [dict ]]:
537- """Collect include_vars value sources keyed by variable name."""
538- return _variable_pipeline .collect_include_var_sources (
539- role_path = role_path ,
540- role_root = role_root ,
541- exclude_paths = exclude_paths ,
542- )
543-
544-
545- def _mark_existing_row_as_include_vars_ambiguous (
546- row : dict , entries : list [dict ]
547- ) -> None :
548- """Downgrade confidence for rows that can be overridden by include_vars."""
549- _variable_pipeline .mark_existing_row_as_include_vars_ambiguous (row , entries )
550-
551-
552- def _build_include_vars_row (name : str , entries : list [dict ]) -> dict :
553- """Build a variable insight row for include_vars-discovered variables."""
554- return _variable_pipeline .build_include_vars_row (name = name , entries = entries )
555-
556-
557- def _append_set_fact_rows (
558- * ,
559- role_path : str ,
560- rows : list [dict ],
561- known_names : set [str ],
562- exclude_paths : list [str ] | None ,
563- ) -> None :
564- """Append computed variable placeholders discovered from set_fact usage."""
565- _variable_pipeline .append_set_fact_rows (
566- role_path = role_path ,
567- rows = rows ,
568- known_names = known_names ,
569- exclude_paths = exclude_paths ,
570- )
571-
572-
573- def _append_register_rows (
574- * ,
575- role_path : str ,
576- rows : list [dict ],
577- known_names : set [str ],
578- exclude_paths : list [str ] | None ,
579- ) -> None :
580- """Append runtime placeholders for task-level register variables."""
581- _variable_pipeline .append_register_rows (
582- role_path = role_path ,
583- rows = rows ,
584- known_names = known_names ,
585- exclude_paths = exclude_paths ,
586- )
587-
588-
589- def _append_readme_documented_rows (
590- * ,
591- role_path : str ,
592- rows : list [dict ],
593- known_names : set [str ],
594- style_readme_path : str | None = None ,
595- ) -> None :
596- """Enrich existing variable rows with README documentation.
597-
598- README is used for enrichment only - it does NOT create new variable rows.
599- Variables must exist in defaults/vars/meta/references to be tracked.
600- """
601- _variable_pipeline .append_readme_documented_rows (
602- role_path = role_path ,
603- rows = rows ,
604- style_readme_path = style_readme_path ,
605- )
606-
607-
608- def _append_argument_spec_rows (
609- * ,
610- role_path : str ,
611- rows : list [dict ],
612- known_names : set [str ],
613- ) -> set [str ]:
614- """Append argument_specs-declared inputs not yet present in row set."""
615- return _variable_pipeline .append_argument_spec_rows (
616- role_path = role_path ,
617- rows = rows ,
618- known_names = known_names ,
619- map_argument_spec_type = _dataload_map_argument_spec_type ,
620- )
621-
622-
623- def _append_referenced_variable_rows (
624- * ,
625- role_path : str ,
626- rows : list [dict ],
627- known_names : set [str ],
628- seed_values : dict ,
629- seed_secrets : set [str ],
630- seed_sources : dict ,
631- dynamic_include_vars_refs : list [str ],
632- dynamic_include_var_tokens : set [str ],
633- dynamic_task_include_tokens : set [str ],
634- ignore_unresolved_internal_underscore_references : bool ,
635- exclude_paths : list [str ] | None ,
636- ) -> None :
637- """Append rows for referenced-but-undefined variable names."""
638- _variable_pipeline .append_referenced_variable_rows (
639- role_path = role_path ,
640- rows = rows ,
641- known_names = known_names ,
642- seed_values = seed_values ,
643- seed_secrets = seed_secrets ,
644- seed_sources = seed_sources ,
645- dynamic_include_vars_refs = dynamic_include_vars_refs ,
646- dynamic_include_var_tokens = dynamic_include_var_tokens ,
647- dynamic_task_include_tokens = dynamic_task_include_tokens ,
648- ignore_unresolved_internal_underscore_references = (
649- ignore_unresolved_internal_underscore_references
650- ),
651- exclude_paths = exclude_paths ,
652- )
653-
654-
655456def _collect_variable_reference_context (
656457 * ,
657458 role_path : str ,
@@ -704,11 +505,6 @@ def _populate_variable_rows(
704505 )
705506
706507
707- def _refresh_known_names (rows : list [dict ]) -> set [str ]:
708- """Return a set of known variable names from row payloads."""
709- return _variable_pipeline .refresh_known_names (rows )
710-
711-
712508def _redact_secret_defaults (rows : list [dict ]) -> None :
713509 """Mask secret defaults in-place before rendering/output."""
714510 _variable_pipeline .redact_secret_defaults (rows )
@@ -752,18 +548,6 @@ def build_variable_insights(
752548 )
753549
754550
755- _resolve_section_selector = partial (
756- _config_resolve_section_selector ,
757- all_section_ids = ALL_SECTION_IDS ,
758- style_section_aliases = STYLE_SECTION_ALIASES ,
759- normalize_heading_fn = normalize_style_heading ,
760- )
761-
762-
763- def _load_section_display_titles () -> dict [str , str ]:
764- return _config_load_section_display_titles (DEFAULT_SECTION_DISPLAY_TITLES_PATH )
765-
766-
767551load_readme_marker_prefix = partial (
768552 _load_readme_marker_prefix ,
769553 default_prefix = DEFAULT_DOC_MARKER_PREFIX ,
0 commit comments