## FAIL ### P2 — Path-like item/catalog metadata can still reach the public contract - **File:** `scripts/health/dashboard_v5/nutrition_mapping_review.py:23-29`, `:172-188` - `_PRIVATE_METADATA` recognizes generic absolute paths only after start, whitespace, `:`, or `|`; it misses delimiters such as `=`. - Reproduced with synthetic metadata: - `Meal=/custom/secret.db` passed `safe_mapping_metadata()`. - `build_review()` emitted it in `examples`, `name`, and `example_name`. - **Fix:** Treat an absolute path after `=` and other punctuation delimiters as unsafe, ideally by detecting path tokens independent of a narrow predecessor allowlist. Add end-to-end tests for item names, catalog fields, and provenance using forms such as `prefix=/custom/private.db`. ### P2 — Alias/canonical namespace collisions remain fail-open - **File:** `scripts/health/dashboard_v5/nutrition_mapping_review.py:191-269`, especially `:228-247` - Catalog rule and alias ambiguity are checked within their own namespaces, but not across them. - Synthetic counterexample: - Canonical rules: `apple → 0`, `banana → 2` - Alias: `Apple → banana` - Item: `Apple` - Preview returned `suggestion_available → banana`; `resolve_catalog_assignment()` also authorized the alias assignment. - This is deterministic and shared between preview and worker, but not collision-aware: an exact identity simultaneously denotes a canonical food and an alias to another food. - **Fix:** Track canonical-rule ambiguity separately from alias/input-identity ambiguity. Mark cross-namespace collisions as conflict and suppress automatic recommendations/alias authorization, while preserving explicit reviewed catalog assignment if that is the intended conflict-resolution path. Add a preview-and-worker regression. ### Verified closed/sound - Preview and worker use the same mapping helper and exact-group resolution. - Target revision includes item mapping state plus latest review action; stale state/target counts fail before mutation. - `BEGIN IMMEDIATE` and the connection transaction cover mappings, recomputation, provenance, and action log; rollback test is sound. - Raw item/support/catalog bounds and public example/day truncation are explicit. - Exact Origin validates configured scheme and effective configured port. - Focused suite: **24 passed**. - Changed Python runtime files: **AST parsing passed**. - `git diff --check`: **passed**. ### Workspace - **Files modified/created by review:** none. - Global `pytest` was unavailable; verification succeeded through `uv run --with pytest`.