Feature: YAML engine direct coverage As a developer I want YAMLTemplateEngine directly exercised So that all code paths are covered Scenario: Engine construction registers filters and globals When I construct a new YAMLTemplateEngine for direct testing Then the direct engine should have yaml indent sum selectattr filters And the direct engine globals should include builtins Scenario: load_file reads and parses YAML from a temp file Given I construct a new YAMLTemplateEngine for direct testing And I write a temp YAML file with mapping content When I call load_file on the direct engine without context Then the direct load_file result should be a dict with app key Scenario: load_string parses plain YAML mapping Given I construct a new YAMLTemplateEngine for direct testing When I call load_string with plain mapping YAML on direct engine Then the direct result should have key server Scenario: load_string raises for plain YAML list Given I construct a new YAMLTemplateEngine for direct testing When I call load_string with plain list YAML on direct engine Then a direct ValueError mentioning dict should be raised Scenario: load_string with context renders and parses template Given I construct a new YAMLTemplateEngine for direct testing When I call load_string with template and context on direct engine Then the direct rendered result should have substituted values Scenario: load_string without context defers rendering Given I construct a new YAMLTemplateEngine for direct testing When I call load_string with template but no context on direct engine Then the direct deferred result should be a dict or raise YAMLError Scenario: preprocess inserts indent hints for for loops Given I construct a new YAMLTemplateEngine for direct testing When I call preprocess on content with a for loop Then the direct preprocessed result should contain indent hint Scenario: postprocess removes blank lines before unindented content Given I construct a new YAMLTemplateEngine for direct testing When I call postprocess on content with blank lines before unindented Then blank lines before unindented content should be gone Scenario: fix_common_yaml_issues splits multi-colon lines Given I construct a new YAMLTemplateEngine for direct testing When I call fix_common_yaml_issues on multi-colon content Then the fixed content should have multiple lines Scenario: analyze_yaml_structure finds blocks and inline templates Given I construct a new YAMLTemplateEngine for direct testing When I call analyze_yaml_structure on mixed content Then template_blocks and inline_templates should be populated And hierarchy should have root key Scenario: yaml_filter converts dict to YAML string When I call the static yaml_filter with a dict Then the yaml_filter result should contain key colon Scenario: indent_filter indents lines When I call the static indent_filter with 4 spaces Then each direct line should start with 4 spaces Scenario: sum_filter returns numeric sum When I call the static sum_filter on a number list Then the direct sum should be 10 Scenario: selectattr_filter extracts with defaults When I call the static selectattr_filter for score Then items with score return their value and others return 0 Scenario: create_render_context merges nested and top-level When I call the static create_render_context with nested data Then the direct context should have both nested and explicit keys Scenario: render_and_parse falls back on initial YAML error Given I construct a new YAMLTemplateEngine for direct testing When I call render_and_parse with colon-heavy value Then the direct engine should attempt fix or raise Scenario: render_and_parse raises ValueError for non-dict result Given I construct a new YAMLTemplateEngine for direct testing When I call render_and_parse that produces a list Then a direct ValueError mentioning dict should be raised Scenario: simple_template_extraction raises YAMLError for invalid Given I construct a new YAMLTemplateEngine for direct testing When I call simple_template_extraction with invalid YAML Then a direct YAML error should be raised Scenario: simple_template_extraction raises ValueError for non-dict Given I construct a new YAMLTemplateEngine for direct testing When I call simple_template_extraction with list YAML Then a direct ValueError mentioning dict should be raised Scenario: load_file with context renders templates from disk Given I construct a new YAMLTemplateEngine for direct testing And I write a temp YAML file with template content When I call load_file with template context on direct engine Then the direct file result should contain rendered values