Skip to content

fix(docs): fix vercel cron path - #1093

Closed
sarinali wants to merge 5 commits into
trycua:mainfrom
sarinali:slack-docs-prompts
Closed

fix(docs): fix vercel cron path#1093
sarinali wants to merge 5 commits into
trycua:mainfrom
sarinali:slack-docs-prompts

Conversation

@sarinali

Copy link
Copy Markdown
Contributor
  • feat(docs): add Slack reporting for interesting docs bot prompts
  • refactor(docs): decouple Slack reporting into hourly batch cron
  • fix(docs): fix PostHog API host detection and add hours param
  • fix thundering herd problem
  • fix cron api path on prod

sarinali and others added 5 commits February 18, 2026 00:59
Analyze each user prompt with Haiku to score on actionability,
traction signal, and use case insight. Post interesting prompts
(score >= 7/10) to a Slack channel via incoming webhook.

- prompt-analyzer.ts: Haiku classification, threshold filtering
- slack-reporter.ts: Slack Block Kit formatting, webhook posting
- route.ts: fire-and-forget async hook, hoisted categorization
- .env.example: added SLACK_WEBHOOK_URL
- typescript-typecheck.js: fix lockfile restore to prevent
  pre-commit "files were modified" false failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the inline fire-and-forget approach with a Vercel cron job
that queries PostHog as a derived data source. This decouples
prompt reporting from the request path and makes the data source
swappable.

- Revert inline hook from copilotkit route.ts
- Refactor prompt-analyzer.ts for batch analysis (one Haiku call)
- Refactor slack-reporter.ts for batch digest format
- Add posthog-query.ts to fetch events via PostHog API
- Add cron route at /api/cron/prompt-digest (hourly)
- Add vercel.json with cron schedule
- Add POSTHOG_PERSONAL_API_KEY, POSTHOG_PROJECT_ID, CRON_SECRET
  to .env.example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Auto-derive API host from NEXT_PUBLIC_POSTHOG_HOST by stripping
  the ingestion subdomain (eu.i. → eu., us.i. → us.)
- Add ?hours=N query param to cron endpoint for testing
- Add debug logging for PostHog query URL and error bodies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

@sarinali is attempting to deploy a commit to the Cua Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • rabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

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