chore(repo): add persistent turbo dev task - #1695
Open
Silver36-ship-it wants to merge 1 commit into
Open
Silver36-ship-it wants to merge 1 commit into
Silver36-ship-it wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Closes #1517
PR Template - Ready to Copy/Paste
PR Title
PR Description
Copy everything below this line:
🎯 Summary
Implements a comprehensive manual intervention system for failed oracle jobs. Provides CLI and API tools for operators to rescue stuck randomness requests when automatic retries are exhausted.
📋 Problem
When oracle jobs fail after all automatic retries (5 attempts with exponential backoff), they remain in a failed state with no recovery mechanism. This blocks raffles from being finalized and requires manual intervention.
Current pain points:
✨ Solution
A three-pronged rescue system:
npm run oracle:rescue)🚀 Features
Core Operations
API Endpoints (6)
CLI Commands (6)
Security Features
Smart Features
📦 Files Changed
New Files (22 files, 4,418+ lines)
Source Code (5 files)
Documentation (10 files, 2,500+ lines)
Test Files (2 files)
Modified Files (3 files)
🧪 Testing
✅ All Tests Passed (9/9)
Automated Test Results:
Unit Test Coverage:
reEnqueueJob- Success, job not found, already finalizedforceSubmit- Low-stakes (PRNG), high-stakes (VRF), auto-fetch prize, failuresforceFail- Success, job not foundgetFailedJobs- List retrievalgetRescueLogs- Audit log retrieval and filteringCode Quality:
💡 Usage Examples
Scenario 1: RPC Timeout (Re-enqueue)
npm run oracle:rescue re-enqueue 12345 \ --operator alice \ --reason "RPC timeout, retrying with backup endpoint"Scenario 2: All Retries Exhausted (Force Submit)
npm run oracle:rescue force-submit 42 req_abc123 \ --operator bob \ --reason "All retries exhausted, manual submission required"Scenario 3: Invalid Request (Force Fail)
npm run oracle:rescue force-fail 12345 \ --operator alice \ --reason "Invalid raffle ID - suspected malicious request"Scenario 4: Audit Review
API Usage
📚 Documentation
For Users
For On-Call Engineers
For Developers
For Operations
Navigation
🏗️ Architecture
🔒 Security Considerations
🚀 Deployment
Prerequisites
Configuration
Uses existing environment variables:
REDIS_HOST/REDIS_PORT- Queue accessSOROBAN_RPC_URL- Contract interactionRAFFLE_CONTRACT_ID- Contract addressORACLE_SECRET_KEY- Transaction signingDeployment Steps
npm test src/rescue/rescue.service.spec.tsRollback Plan
If issues arise, simply remove
RescueModulefromapp.module.tsand redeploy. No data migrations to rollback.📊 Impact
Operational Benefits
Technical Benefits
Business Benefits
✅ Checklist
🔗 Related Issues
Closes #[issue-number] (if applicable)
📸 Screenshots
N/A - CLI tool (can add terminal screenshots if needed)
🎓 Training Materials
Complete training materials included:
🔮 Future Enhancements
Potential improvements (not in this PR):
📝 Additional Notes
This is a critical operational tool for handling failed oracle jobs. It provides:
Ready for immediate deployment after code review and approval.
🙏 Reviewers
Please review:
Estimated Review Time: 30-45 minutes
Questions? Check RESCUE_INDEX.md for documentation navigation or RESCUE_GUIDE.md for usage details.