Add bulk QA progress SSE#90
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Summary
This PR adds a second built-in episode QA check for empty recordings and adds realtime bulk QA run progress over SSE for Data Ops bulk QA.
Motivation
Changes
Modified Files
[internal/api/handlers/data_ops.go](internal/api/handlers/data_ops.go)- wires Data Ops bulk action dependencies and bulk run routes.[internal/api/handlers/data_ops_bulk.go](internal/api/handlers/data_ops_bulk.go)- changes bulk QA submission to create a tracked run and process episodes with progress accounting.[internal/api/handlers/data_ops_test.go](internal/api/handlers/data_ops_test.go)- adds coverage for bulk run creation, active-run conflict, progress counts, stale-run interruption, and SSE snapshots.[internal/server/server.go](internal/server/server.go)- interrupts stale queued/running bulk QA runs on service startup.[docs/designs/data-ops-bulk-actions-api.zh.html](docs/designs/data-ops-bulk-actions-api.zh.html)- documents the run snapshot and SSE progress design.Added Files
[internal/api/handlers/data_ops_bulk_run.go](internal/api/handlers/data_ops_bulk_run.go)- implements bulk QA run persistence, current-run lookup, run snapshot API, and SSE streaming.[internal/storage/database/migrations/000006_bulk_runs.up.sql](internal/storage/database/migrations/000006_bulk_runs.up.sql)- creates the bulk run table.[internal/storage/database/migrations/000006_bulk_runs.down.sql](internal/storage/database/migrations/000006_bulk_runs.down.sql)- drops the bulk run table.Deleted Files
Type of Change
Impact Analysis
Breaking Changes
None.
Backward Compatibility
Fully backward compatible. Existing single-episode QA and bulk sync behavior remain unchanged. Bulk QA responses now include a run snapshot so clients can track progress.
Testing
Test Environment
Local Go test environment with
GOCACHE=/tmp/go-cache.Test Cases
Commands run:
Manual Testing Steps
Not performed in browser from this repo.
Test Coverage
Screenshots / Recordings
N/A.
Performance Impact
Documentation
Generated Swagger files were not refreshed locally because the local
swagsetup was unavailable.Related Issues
Additional Notes
bulk_qarun at a time.Reviewers
N/A.
Notes for Reviewers
[internal/api/handlers/data_ops_bulk_run.go](internal/api/handlers/data_ops_bulk_run.go)for run lifecycle, SSE streaming, and reconnect behavior.Checklist for Reviewers