Moderation: hide unreviewable rows, add Reject and diffs; fix scraper discovery - #52
Merged
Merged
Conversation
The moderation queue now omits rows with no name or type, attaches a field-level preview (the diff approval would produce, via shared applyContributionToThing) to each card, and supports POST /contributions/:thingId/:sk/reject. approve refuses nameless rows.
Also adds reject:unreviewable, a dry-run-by-default script that rejects such rows already in the pending queue.
Documents the new queue behaviour in architecture.md.
Trending rows render with a leading blank line, so the parser dropped every
row and its link fallback scraped the Google footer ("Terms", "Privacy",
"Sign in") as trends. Parse the first non-blank line, remove the fallback
(fail loudly instead), and denylist page chrome.
Trending Now is mostly sports and news, so its terms pass a per-topic
triage before research, and a search-driven source (hazard-news seed
queries) now finds toxic substances directly. A Trends outage no longer
stops the run.
Research each topic with three searches (dogs, cats, symptoms) merged by
URL. The classifier moves to Sonnet 4.6 with a system prompt (facts from
the sources only, one specific named hazard, severity per pet type,
confidence). Low-confidence and nameless reports are not filed.
reject:unreviewable also catches rows scraped from Trends page chrome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moderation queue
approverefuses them.POST /contributions/:thingId/:sk/rejectand a Reject button; rejects the whole card including folded siblings.preview: the field-level diff approval would produce, built by the sameapplyContributionToThingthatapproveuses.pnpm --filter @btfp/seed reject:unreviewable(dry run unless--apply) rejects existing nameless rows and rows scraped from Google page chrome.Scraper
Live logs showed the only "trends" ever researched were
terms,privacy,sign in,about,help,send feedback. Rendered Trends rows begin with a blank line, so the parser dropped every row and its<a>fallback scraped the page footer.categoryparam is ignored), so its terms pass a per-topic triage. A search-driven source (hazard-news seed queries) finds toxic substances directly. A Trends outage no longer stops the run.SCRAPER_BEDROCK_INFERENCE_PROFILE_ID, scraper only; the BFF stays on Haiku) with a system prompt, a per-pet-type severity and a confidence level. Nameless and low-confidence reports are not filed.Deploy notes
Test plan