{% extends "data_hub/base_data_hub.html" %} {% block data_hub_content %}

USDA Shadow Entry Audit

{% if show_all %}Show Candidates Only{% else %}Show All USDA ({{ usda_total }}){% endif %}
Total USDA SR Legacy
{{ usda_total }}
Shadow Candidates
{{ shadow_count }}
Clean Entries
{{ usda_total - shadow_count }}
Shadow entries are over-specific USDA products (branded items, snacks, candy bars) that intercept ingredient matching before the generic canonical can match. Remove unused ones to improve pipeline accuracy.
{% if not candidates %}
{% if show_all %}No USDA entries found.{% else %}No shadow candidates detected.{% endif %}
{% else %}
{% if show_all %}All USDA Entries{% else %}Shadow Candidates{% endif %} ({{ total }} shown)
{% for c in candidates %} {% set ing = c.ingredient %} {% set used = ing.recipe_details | length if ing.recipe_details is defined else 0 %} {% endfor %}
Name Reason Flagged Recipes
{{ ing.name }} {% if c.reasons %} {{ c.reasons | join(' · ') }} {% else %} ✓ clean {% endif %}
{# Pagination #} {% if pages > 1 %} {% endif %} {% endif %} {% endblock %}