feat(api): add episode QA and data ops APIs#89
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
Please ensure your PR meets the following requirements:
Summary
This PR adds episode-level MCAP QA checks, a data-ops episode details API, and filtered bulk QA/cloud-sync preview and execution APIs.
Motivation
Changes
Modified Files
internal/server/server.go- Wires QA and data-ops handlers and registers data-ops admin routes.internal/api/handlers/episode_qa_check.go- Adds episode MCAP integrity QA checks and QA run/history APIs.internal/api/handlers/episode.go- Extends episode detail data for QA/sync workflows.internal/api/handlers/data_ops.go- Adds the data details list endpoint and response assembly.internal/api/handlers/data_ops_bulk.go- Adds filtered bulk QA/cloud-sync preview and asynchronous execution endpoints.internal/api/handlers/transfer.go- Enqueues new episodes for QA after upload completion and checks insert ID errors.internal/services/sync_worker.go- Enforces QA approval before manual cloud sync/resync.internal/api/handlers/data_production_statistics.go- Aligns stats filters with data details needs.internal/api/handlers/*_test.go- Adds/updates unit coverage for QA, data-ops filtering, bulk preview, sync eligibility, and stats filters.Added Files
docs/designs/episode-qa-checks-mcap-integrity.zh.html- QA integrity-check design document.docs/designs/data-details-center.zh.html- Data details API/page design document.docs/designs/data-ops-bulk-actions-api.zh.html- Bulk QA/cloud-sync API design document.internal/api/handlers/data_ops.go- Data details handler implementation.internal/api/handlers/data_ops_bulk.go- Bulk action handler implementation.Deleted Files
Type of Change
Impact Analysis
Breaking Changes
None
Backward Compatibility
Fully backward compatible. Existing episode, transfer, and sync APIs remain available.
Testing
Test Environment
/tmp/go-build-cacheTest Cases
Manual Testing Steps
adminlocally and verified data-ops list and bulk-sync preview behavior for QA approved episodes.Test Coverage
Commands run:
GOCACHE=/tmp/go-build-cache go test ./... git diff --checkScreenshots / Recordings
Not applicable for backend-only changes.
Performance Impact
Bulk actions intentionally run asynchronously. The first version does not add a persistent batch job table or progress tracker.
Documentation
Related Issues
Additional Notes
qaanddata-ops; Keystone CONTRIBUTING lists narrower allowed scopes. I did not rewrite history after review because that requires explicit approval.Reviewers
@reviewer1 @reviewer2
Notes for Reviewers
internal/api/handlers/episode_qa_check.go,internal/api/handlers/data_ops.go, andinternal/api/handlers/data_ops_bulk.go.Checklist for Reviewers