feat(sync): persist cloud sync queue state#77
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 makes Keystone cloud sync enqueue state durable by persisting queued work as
sync_logs.status = 'pending'before worker execution. It also includes the existing seed script cleanup already present on this branch.Motivation
failedtoin_progress.Changes
Modified Files
in_progresswith attempt counting handled at claim time.skill_sequenceseed payload entries already present on this branch.Added Files
Deleted Files
Type of Change
Impact Analysis
Breaking Changes
None
Backward Compatibility
Fully backward compatible. The implementation reuses the existing
sync_logs.status = 'pending'state and does not require a database migration.Testing
Test Environment
GOCACHE=/tmp/go-buildTest Cases
Manual Testing Steps
Manual UI testing was not performed in this pass. The backend behavior was covered with targeted SyncWorker tests and the full Go test suite with race detection.
Test Coverage
Commands run:
env GOCACHE=/tmp/go-build go test -cover -race -v ./...Screenshots / Recordings
Not applicable.
Performance Impact
Documentation
Related Issues
Additional Notes
KEYSTONE_SYNC_MAX_CONCURRENT=2, retrying four failed episodes should now expose two active uploads and two queued rows before completion, assuming uploads are long enough for the UI to observe the transition.in_progressrecovery as a follow-up hardening item, as documented in the design note.Reviewers
No specific reviewers requested.
Notes for Reviewers
persistPendingSyncLog()and thepending -> in_progressclaim path.Checklist for Reviewers