findings
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Scheduled task handlers.
findings-analysis.ts
- Batched Processing: Analyzes transcripts using enhanced two-stage consensus analysis and generates rich findings reports with:- Batch Size: Processes 5 questions per cron run to avoid timeouts
- State Management: Uses question status tracking ("Not started" → "Working..." → "Done"/"Error")
- Resume Logic: Automatically continues from where previous runs left off
- Per-transcript individual analysis
- Cross-transcript consensus synthesis
- Confidence scores and consensus levels
- Disagreement tracking and evidence summaries
- Rich Notion formatting with callouts, tables, and structured sections
- Initialization: When a new report is found, all questions are reset to "Not started"
- Batch Selection: Each cron run picks up to 5 questions with "Not started" status
- Processing: Selected questions are marked "Working..." then processed individually
- Completion: Successfully processed questions are marked "Done", failed ones marked "Error"
- Resume: Subsequent cron runs continue with remaining "Not started" questions
- Finalization: When all questions are complete, the report is marked "Done"
- Per Question: ~30 seconds average processing time
- Per Batch: ~3-4 minutes total (5 questions + overhead)
- Safety Margin: Well under timeout limits with room for variability