ISSUE-24: Automate milestone release with backend oracle#175
Closed
Bug-Hunter-X wants to merge 1 commit intoNOVUS-X:mainfrom
Closed
ISSUE-24: Automate milestone release with backend oracle#175Bug-Hunter-X wants to merge 1 commit intoNOVUS-X:mainfrom
Bug-Hunter-X wants to merge 1 commit intoNOVUS-X:mainfrom
Conversation
|
@Bug-Hunter-X Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Overview
This PR automates milestone release execution for high-confidence jobs so clients no longer need to manually approve final payment when the AI result is trusted. It adds a backend oracle flow that enforces the Issue-23 confidence threshold, constructs and submits the Soroban
releasetransaction, records the release in the backend, and notifies the client with the automated release result and test output.Related Issue
Closes #165
Changes
⚙️ Backend Oracle Auto-Release
[MODIFY]
backend/app/api/v1/endpoints/payments.py> 0.90confidence threshold before triggering auto-release.X-Oracle-Token.[MODIFY]
backend/app/services/payments.py🔐 Soroban Oracle Signing
[MODIFY]
backend/app/services/soroban.pyreleasecontract invocation.[MODIFY]
backend/app/core/config.py🧾 Client Notification
backend/app/services/email.py⛓️ Escrow Contract Automation
[MODIFY]
contracts/escrow/src/lib.rsreleaseto succeed when called by either the client or the configured oracle.[MODIFY]
contracts/escrow/src/test.rs🧪 Tests
backend/app/tests/test_payments_oracle.py🛠️ Repo Boot Fixes Needed For Testing
[MODIFY]
backend/app/api/v1/api.pystatsimport so the backend API loads correctly.[MODIFY]
backend/app/schemas/user.pyEnumimport so backend schema imports do not fail at startup.Verification Results
How to Test
Screenshots
✅ Backend oracle tests pass
A screenshot of:
cd backend DEBUG=False SECRET_KEY=test-secret-key DATABASE_URL=sqlite:///./test.db REQUIRE_EMAIL_VERIFICATION=False .venv314/bin/pytest app/tests/test_payments_oracle.py app/tests/test_main.py -q✅ Escrow oracle-release contract test passes
A screenshot of: