Skip to content

feat: normalize toxicity and add pet-safe filter#340

Open
hualuoz wants to merge 2 commits into
mergeos-bounties:masterfrom
hualuoz:agent/plantguide-pet-safe
Open

feat: normalize toxicity and add pet-safe filter#340
hualuoz wants to merge 2 commits into
mergeos-bounties:masterfrom
hualuoz:agent/plantguide-pet-safe

Conversation

@hualuoz

@hualuoz hualuoz commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • normalize legacy missing, string, and list toxicity values into a canonical tag list
  • add plantguide species list --pet-safe with conservative filtering and a veterinary disclaimer
  • test normalization precedence, the full catalog schema, CLI filtering, and disclaimer output
  • replace the invalid toxicity CLI draft with user-facing schema and safety documentation

Bounty

Why

The catalog currently mixes three toxicity shapes, so callers cannot reliably filter it. Some records also contain both safe and toxic wording. Normalization now guarantees exactly one pet-safety state (pet_safe, toxic_to_pets, or unknown), with toxicity warnings taking precedence and ambiguous records remaining unknown.

User impact

Users can list only explicitly pet-safe catalog entries while uncertain entries are excluded. The output makes clear that catalog flags are informational and should be verified with a veterinarian or trusted toxicology source.

Validation

  • pytest -q — 59 passed
  • ruff check — passed
  • ruff format --check — passed
  • plantguide species list --pet-safe — verified against the bundled catalog

No secrets, production keys, or private customer data are included.

Fixes #20

@hualuoz
hualuoz marked this pull request as ready for review July 22, 2026 07:59
@hualuoz

hualuoz commented Jul 22, 2026

Copy link
Copy Markdown
Author

@TUPM96 This implements the 50 MRG bounty in #20 and is ready for review. The full suite passes (59 tests), and ambiguous toxicity records are excluded from the pet-safe filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[50 MRG] Toxicity and pet-safety flag pack across catalog

1 participant