/** * Eval fixtures: synthetic signals written to match the shape and variety of * real factory data. All titles and bodies are invented for this eval, not * copied from real Sentry issues, GitHub repos, customer emails, or internal * logs. Project ids ("kody", "epicweb") match the codebase's own test * fixtures. Company names (ACME Corp) and domains (api.example.com) are * placeholders. No private payload text. */ export type EvalFixture = { id: string title: string body: string source: string labels: string[] severity: string projectId: string expectedLabel: string } export const fixtures: EvalFixture[] = [ // --- Sentry-style errors (should create work items) --- { id: 'sentry-auth-500', title: 'TypeError: Cannot read properties of undefined (reading "session")', body: 'Auth middleware throws on expired refresh token. 142 events in 2h.', source: 'sentry', labels: ['sentry', 'error'], severity: 'critical', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'sentry-db-timeout', title: 'TimeoutError: Connection to database timed out', body: 'Primary DB connection pool exhausted during peak traffic.', source: 'sentry', labels: ['sentry', 'error', 'database'], severity: 'critical', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'sentry-unhandled-rejection', title: 'UnhandledPromiseRejection in payment webhook handler', body: 'Stripe webhook fails silently. 3 missed payment events.', source: 'sentry', labels: ['sentry', 'billing'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, { id: 'sentry-404-noise', title: 'NotFoundError: /wp-admin/login.php', body: 'Bot scanning for WordPress endpoints. Happens 50x/day.', source: 'sentry', labels: ['sentry'], severity: 'low', projectId: 'kody', expectedLabel: 'ignore' }, { id: 'sentry-rate-limit', title: 'RateLimitError: Too many requests to API', body: 'Single user hitting rate limit. Normal behavior.', source: 'sentry', labels: ['sentry'], severity: 'info', projectId: 'kody', expectedLabel: 'ignore' }, // --- GitHub issues (should mostly create work items) --- { id: 'gh-bug-report', title: 'Login button does not work on Safari', body: 'Steps to reproduce: 1. Open Safari 2. Click Login 3. Nothing happens. Expected: redirect to auth page.', source: 'github-issues', labels: ['bug', 'browser'], severity: 'high', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'gh-feature-request', title: 'Add dark mode support', body: 'Many users have requested dark mode. It would improve accessibility.', source: 'github-issues', labels: ['enhancement'], severity: 'medium', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'gh-docs-typo', title: 'Typo in README: "teh" should be "the"', body: 'Simple typo fix on line 42 of README.md.', source: 'github-issues', labels: ['docs', 'good-first-issue'], severity: 'low', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'gh-spam', title: 'Buy cheap watches online!', body: 'Visit our website for amazing deals. www dot spam dot example.', source: 'github-issues', labels: [], severity: 'low', projectId: 'epicweb', expectedLabel: 'ignore' }, { id: 'gh-question', title: 'How do I deploy to Vercel?', body: 'I want to deploy this project to Vercel but cannot find the docs.', source: 'github-issues', labels: ['question'], severity: 'low', projectId: 'epicweb', expectedLabel: 'ignore' }, { id: 'gh-security', title: 'XSS vulnerability in comment rendering', body: 'User-generated HTML is not sanitized in the comments section. Script tags execute.', source: 'github-issues', labels: ['security', 'bug'], severity: 'critical', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'gh-dependency-update', title: 'Update React from 18.2 to 18.3', body: 'New minor version with performance improvements and bug fixes.', source: 'github-issues', labels: ['dependencies'], severity: 'low', projectId: 'epicweb', expectedLabel: 'create_work_item' }, // --- CI failures (should create work items or wake) --- { id: 'ci-test-flake', title: 'CI: Test suite flaky failure in auth.test.ts', body: 'Intermittent timeout in OAuth flow test. Passed on retry.', source: 'ci-failure', labels: ['ci', 'flaky'], severity: 'low', projectId: 'kody', expectedLabel: 'ignore' }, { id: 'ci-build-fail', title: 'CI: TypeScript build failed with 12 errors', body: 'Type errors introduced in latest commit. Blocking merge.', source: 'ci-failure', labels: ['ci', 'build'], severity: 'high', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'ci-lint-fail', title: 'CI: ESLint found 3 new violations', body: 'Unused imports and missing return types in new module.', source: 'ci-failure', labels: ['ci', 'lint'], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'ci-deploy-fail', title: 'CI: Production deploy failed - container health check timeout', body: 'The new container fails to start within 60 seconds. Memory spike on init.', source: 'ci-failure', labels: ['ci', 'deploy', 'production'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, // --- Friction records (should create work items) --- { id: 'friction-slow-build', title: 'Build takes 8 minutes on cold start', body: 'Developer feedback: local build time increased 3x after adding the new bundler plugin.', source: 'friction', labels: ['friction', 'dx'], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'friction-confusing-error', title: 'Unclear error message when API key is missing', body: 'The error says "unexpected null" instead of "missing API key in environment".', source: 'friction', labels: ['friction', 'dx'], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'friction-setup-docs', title: 'Setup instructions are out of date', body: 'The README references Node 16 but the project requires Node 20.', source: 'friction', labels: ['friction', 'docs'], severity: 'medium', projectId: 'epicweb', expectedLabel: 'create_work_item' }, // --- Discord signals --- { id: 'discord-bug-report', title: 'Users reporting broken checkout flow', body: 'Multiple Discord messages about checkout not working since the last deploy. 5+ users affected.', source: 'discord', labels: ['discord', 'user-report'], severity: 'high', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'discord-praise', title: 'User loves the new dashboard', body: 'Great feedback about the recent redesign. No action needed.', source: 'discord', labels: ['discord', 'feedback'], severity: 'info', projectId: 'epicweb', expectedLabel: 'ignore' }, { id: 'discord-off-topic', title: 'What IDE does everyone use?', body: 'General chat about tooling preferences. Not actionable.', source: 'discord', labels: ['discord'], severity: 'info', projectId: 'epicweb', expectedLabel: 'ignore' }, // --- Email signals --- { id: 'email-customer-escalation', title: 'Urgent: Enterprise customer cannot access billing portal', body: 'Customer ACME Corp reports 500 errors on /billing since yesterday. Contract renewal in 2 days.', source: 'email', labels: ['email', 'customer', 'billing'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, { id: 'email-newsletter-reply', title: 'Re: Weekly product update', body: 'Thanks for the update! Looks great. No action needed.', source: 'email', labels: ['email'], severity: 'info', projectId: 'kody', expectedLabel: 'ignore' }, { id: 'email-support-request', title: 'Help: cannot reset my password', body: 'User tried to reset password 3 times, link expired each time.', source: 'email', labels: ['email', 'support'], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, // --- Manual/intent signals --- { id: 'manual-refactor', title: 'Refactor auth module to use new session store', body: 'Technical debt: the auth module still uses the old session store. Move to Redis-backed store.', source: 'manual', labels: ['tech-debt', 'refactor'], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'manual-investigation', title: 'Investigate memory leak in worker pool', body: 'Memory usage grows 10MB/hour. Likely a leak in the connection pool cleanup.', source: 'manual', labels: ['investigation'], severity: 'high', projectId: 'kody', expectedLabel: 'create_work_item' }, // --- Edge cases --- { id: 'edge-empty-body', title: 'Signal with no body', body: '', source: 'generic-webhook', labels: [], severity: 'medium', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'edge-long-title', title: 'A'.repeat(200) + ' very long title that might cause issues', body: 'Testing truncation of long titles.', source: 'generic-webhook', labels: [], severity: 'low', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'edge-xss-attempt', title: '', body: 'Attempting XSS through signal title. Should be treated as data, not actionable.', source: 'generic-webhook', labels: ['spam'], severity: 'low', projectId: 'kody', expectedLabel: 'ignore' }, { id: 'edge-unicode', title: 'Bug in internationalization: Zurucksetzen fails', body: 'German reset button text is not rendered correctly on the settings page.', source: 'github-issues', labels: ['i18n', 'bug'], severity: 'medium', projectId: 'epicweb', expectedLabel: 'create_work_item' }, // --- Run error patterns (from factory health) --- { id: 'runerr-timeout', title: 'run.error: MCP execute timeout in package sweep', body: 'The sweep job timed out after 300 seconds. Likely a slow storage read.', source: 'ci-failure', labels: ['run-error'], severity: 'high', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'runerr-credential', title: 'run.error: Credential "runner" not mapped', body: 'Devin service key is unmapped. All agent starts fail until it is configured.', source: 'ci-failure', labels: ['run-error', 'credential'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, { id: 'runerr-isolate-weather', title: 'run.error: Isolate terminated: out of memory', body: 'Platform weather. The isolate ran out of memory during a large batch.', source: 'ci-failure', labels: ['run-error', 'platform'], severity: 'medium', projectId: 'kody', expectedLabel: 'ignore' }, // --- Webhook-style raw payloads --- { id: 'webhook-stripe', title: 'Stripe payment_intent.failed', body: 'Customer payment failed. Amount: $99. Decline code: insufficient_funds. Not a system error.', source: 'generic-webhook', labels: ['stripe', 'payment'], severity: 'low', projectId: 'kody', expectedLabel: 'ignore' }, { id: 'webhook-pagerduty', title: 'PagerDuty: High CPU alert on web-prod-3', body: 'CPU usage above 90% for 15 minutes. Auto-scaling triggered. Investigating.', source: 'generic-webhook', labels: ['pagerduty', 'infra'], severity: 'high', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'webhook-uptime', title: 'Uptime monitor: api.example.com is DOWN', body: 'Health check failed 3 consecutive times. Last success: 5 minutes ago.', source: 'generic-webhook', labels: ['uptime', 'outage'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, // --- More nuanced cases --- { id: 'nuance-p0-label', title: 'Fix production data corruption', body: 'User data was corrupted during the migration. Need immediate rollback.', source: 'github-issues', labels: ['P0', 'data-loss'], severity: 'critical', projectId: 'kody', expectedLabel: 'wake_grok' }, { id: 'nuance-stale-pr', title: 'PR #42 has been open for 30 days', body: 'The PR for the cache refactor has had no activity in 30 days.', source: 'github-issues', labels: ['stale'], severity: 'low', projectId: 'kody', expectedLabel: 'create_work_item' }, { id: 'nuance-duplicate', title: 'Duplicate of #123: Login button broken', body: 'This is the same issue as #123, already being tracked.', source: 'github-issues', labels: ['duplicate'], severity: 'low', projectId: 'epicweb', expectedLabel: 'ignore' }, { id: 'nuance-wontfix', title: 'Support IE11', body: 'Please add IE11 support. Market share is below 0.5%.', source: 'github-issues', labels: ['wontfix'], severity: 'low', projectId: 'epicweb', expectedLabel: 'ignore' }, { id: 'nuance-performance', title: 'Page load time increased 40% after last deploy', body: 'Lighthouse score dropped from 92 to 55. Main thread blocking increased.', source: 'generic-webhook', labels: ['performance'], severity: 'high', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'nuance-accessibility', title: 'Screen reader cannot navigate the new modal', body: 'VoiceOver users report the modal traps focus and has no close button. WCAG 2.1 AA violation.', source: 'github-issues', labels: ['a11y', 'bug'], severity: 'high', projectId: 'epicweb', expectedLabel: 'create_work_item' }, // --- X (Twitter) signals --- { id: 'x-complaint', title: 'User reports broken API on Twitter', body: '@ourproject the API returns 500 on every request since the update.', source: 'x', labels: ['x', 'user-report'], severity: 'medium', projectId: 'epicweb', expectedLabel: 'create_work_item' }, { id: 'x-mention', title: 'Positive mention on Twitter', body: 'Love using this tool! Best developer experience I have had.', source: 'x', labels: ['x', 'mention'], severity: 'info', projectId: 'epicweb', expectedLabel: 'ignore' }, ]