-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Two core pipeline jobs remain untested: ExtractVotesJob (vote extraction from minutes) and Topics::AutoTriageJob (the job wrapper around TriageTool).
What's already covered
ExtractTopicsJob— 8 tests intest/jobs/extract_topics_job_test.rb(skip non-topic-worthy, skip Routine, create topics, document text inclusion, packet context, catch-all refinement)Topics::TriageTool— 3 tests intest/services/topics/triage_tool_test.rb(automated events, tiered thresholds, community context)Topics::TriageTooldescriptions — 1 test intest/services/topics/triage_tool_description_test.rb(enqueues GenerateDescriptionJob on approval)
Jobs still needing tests
ExtractVotesJob (app/jobs/extract_votes_job.rb)
- Extracts motions and voting records from minutes documents
- Creates
MotionandVoterecords - Links votes to
Memberrecords viaMember.resolve
Test scenarios:
- Stub AI response with vote data → creates
Motion+Voterecords - Correctly maps member names to existing
Memberrecords viaMember.resolve - Handles unanimous votes, split votes, abstentions, absences
- Idempotent re-run clears and rebuilds
- Updates
Topic.last_activity_atvia Motion callback - Handles AI service errors gracefully
Topics::AutoTriageJob (app/jobs/topics/auto_triage_job.rb)
- Job wrapper that runs
Topics::TriageToolon proposed topics
Test scenarios:
- Enqueues and runs without error when proposed topics exist
- Handles empty proposed topic queue
- Handles AI service errors gracefully
Approach
- Stub
Ai::OpenAiServiceresponses with realistic JSON fixtures - Follow patterns from existing
extract_topics_job_test.rb
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels