Files
aitbc/apps/wallet/src/app/main.py
aitbc 9609924d56
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 27s
Blockchain Synchronization Verification / sync-verification (push) Failing after 8s
CLI Tests / test-cli (push) Failing after 4s
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Failing after 16s
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Failing after 14s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 4s
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Failing after 5s
Integration Tests / test-service-integration (push) Successful in 1m24s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 3s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 2s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Failing after 5s
Security Scanning / security-scan (push) Failing after 1m43s
Cross-Chain Functionality Tests / aggregate-results (push) Successful in 11s
fix: populate feature_flags.json and remove sys.path bootstrap inserts
- feature_flags.json: populated with 6 well-described flags reflecting
  current system state (DI migration, structlog, CORS enforcement,
  X-Wallet-Address trust, ZK proof, marketplace rate limiting)

- Remove sys.path.insert bootstrap from app main.py files:
  - apps/agent-management/src/app/main.py
  - apps/marketplace-service/src/marketplace_service/main.py
  - apps/wallet/src/app/main.py
  - apps/blockchain-node/src/aitbc_chain/combined_main.py
  PYTHONPATH is set correctly by the wrapper scripts in scripts/wrappers/
  so the inserts are redundant and misleading.

Wrapper scripts (scripts/wrappers/*.py) and lazy cross-app imports in
blockchain-event-bridge are intentionally left unchanged.
2026-05-25 10:18:14 +02:00

43 lines
933 B
Python
Executable File

from __future__ import annotations
from fastapi import FastAPI
import uvicorn
from aitbc.rate_limiting import RateLimitMiddleware
from .api_jsonrpc import router as jsonrpc_router
from .api_rest import router as receipts_router
from .settings import settings
def create_app() -> FastAPI:
app = FastAPI(title=settings.app_name, debug=settings.debug)
# Add rate limiting middleware
app.add_middleware(
RateLimitMiddleware,
rate=100,
per=60
)
app.include_router(receipts_router, prefix="/v1")
app.include_router(jsonrpc_router, prefix="/v1")
# Add health check endpoint
@app.get("/health")
async def health_check():
return {
"status": "ok",
"env": "dev",
"python_version": "3.13.5"
}
return app
app = create_app()
if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=8015)