Skip to content

Auto-approve submissions from our own crawlers (0.3.1) - #71

Merged
sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
auto-approve-crawler
Oct 28, 2026
Merged

sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
auto-approve-crawler

Conversation

@sh1pt-actions-fleet

Copy link
Copy Markdown
Contributor

Anthony: auto approve submissions unless it's a manual submission, not our crawler.

  • New src/lib/crawler-submit.ts: CRAWLER_TOKENS (name:token,...), header x-crawler-token, timing-safe compare. A UA alone earns nothing.
  • /api/submit: a valid crawler token sets submitted_by = crawler:<name> and skips the 20/hour per-address budget.
  • resolveSubmission: a passing feed whose row source is crawler:* is approved immediately via decideSubmission (no re-read, reviewed_by = auto:crawler:<name>), no reviewer email. Works for batches drained later too, since it keys on the row.
  • Manual submissions (form, MCP, signed-in, OpenAccess) are unchanged: review queue + email.
  • Tests: test/crawler-submit.test.mjs; bun test 77 pass, tsc clean.

🤖 Generated with Claude Code

A POST /api/submit carrying x-crawler-token that matches CRAWLER_TOKENS
(name:token pairs) is recorded as submitted_by = crawler:<name>, skips the
hourly per-address limit, and a feed that passes the rules is listed at once
by resolveSubmission (reviewed_by auto:crawler:<name>), with no admin email.
Manual submissions (form, MCP, signed-in, OpenAccess) still wait for review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sh1pt-actions-fleet
sh1pt-actions-fleet Bot merged commit 4899016 into master Oct 28, 2026
1 check passed
@sh1pt-actions-fleet
sh1pt-actions-fleet Bot deleted the auto-approve-crawler branch October 28, 2026 22:41
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.

1 participant