Commit Graph

22 Commits

Author SHA1 Message Date
aitbc
83ca64f7b8 feat: add /v1 API prefix to all business logic endpoints and create CLI test suite
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Production Tests / Production Integration Tests (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Failing after 3s
- Added /v1 prefix to all business logic routers in coordinator-api (analytics, portfolio, reputation, rewards, staking)
- Updated agent-coordinator to include /v1 prefix for all routers
- Changed agent-management API prefix from /api/v1 to /v1
- Updated api-gateway service prefixes to include /v1 for all proxied services
- Fixed coordinator-api routers to use correct service imports (AgentServiceMarketplace instead
2026-05-19 12:46:59 +02:00
aitbc
fdd057cbf8 Fix agent identity database queries to use execute() and scalars() pattern
Some checks failed
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Changed all session.exec(stmt).first() to session.execute(stmt).scalars().first()
- Changed all session.exec(stmt).all() to session.execute(stmt).scalars().all()
- Updated count() queries to use execute().scalar() pattern
- Fixed request.metadata to request.meta_data in AgentIdentityCore
- Removed unused __table_args__ from AgentIdentity model
- Added detailed error traceback to create_agent_identity endpoint
- Fixed ML ZK proof verification response keys (computation_correct, privacy_preserved)
2026-05-15 14:32:48 +02:00
aitbc
4a1e39dd3c Fix async issues in seed_profiles and resolve GPU service port conflict
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Make seed_profiles async to match AsyncSession and await session operations
- Disable aitbc-gpu.service to resolve port 8101 conflict with gpu-service
- GPU service now runs successfully without coroutine warnings
2026-05-14 18:38:35 +02:00
aitbc
3ac3674dc4 Fix edge GPU endpoints for marketplace integration
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Add error handling to list_profiles, list_metrics, and seed_profiles methods
- Add logger and GPURegistry imports to edge_gpu_service.py
- Fix discover_and_register_edge_gpus to query GPURegistry instead of returning empty placeholder
- Make all EdgeGPUService methods async to match AsyncSession
- Add await to edge GPU endpoint calls in main.py
- Remove User=aitbc directive from gpu-service.service (user doesn't exist)
- Install and enable gpu-service as systemd service

All edge GPU endpoints now return proper responses instead of 500 errors:
- /v1/marketplace/edge-gpu/profiles - returns profiles or empty array
- /v1/marketplace/edge-gpu/scan/{miner_id} - returns registered GPUs from GPURegistry
- /v1/marketplace/edge-gpu/metrics/{gpu_id} - returns metrics or empty array
2026-05-14 18:35:03 +02:00
aitbc
fd7a04cc27 Fix cross-chain bridge web3 import and RPC URL configuration
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Move web3 import to top of web3_utils.py to resolve import context issue
- Add direct Web3Client import to aitbc/__init__.py for early loading
- Replace all mock RPC URLs with actual AITBC blockchain RPC endpoint (http://localhost:8006)
- Note: Bridge service still has fundamental incompatibility - uses Ethereum web3 but AITBC is not Ethereum-compatible
- This blocks Scenario 27 cross-chain trading test until AITBC-specific adapter is implemented
2026-05-14 12:07:11 +02:00
aitbc
745f791eda refactor: improve error handling and remove hardcoded credentials
- Changed bare except clauses to specific exception types in web3_utils.py, testing.py, messages.py, and message_storage.py
- Replaced print() calls with logger in testing.py, agent_discovery.py, compliance_agent.py, coordinator.py, trading_agent.py, keys.py, escrow.py, persistent_spending_tracker.py, sync_cli.py, and client.py
- Added logger initialization using get_logger(__name__) in compliance_agent.py, coordinator.py, trading_agent.py, keys.py, escrow.py, persistent_spending_tracker.py, and client.py
- Removed hardcoded secret
2026-05-12 17:01:57 +02:00
aitbc
e4f1a96172 ci: standardize pytest invocation and add security scanning
Some checks failed
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 5s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 5s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 5s
Deploy to Testnet / deploy-testnet (push) Successful in 1m14s
Contract Performance Benchmarks / compare-benchmarks (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 10s
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
Smart Contract Tests / test-foundry (push) Has been cancelled
Smart Contract Tests / lint-solidity (push) Has been cancelled
Smart Contract Tests / deploy-contracts (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Failing after 45s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Failing after 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Production Tests / Production Integration Tests (push) Failing after 7s
Python Tests / test-python (push) Failing after 46s
Staking Tests / test-staking-service (push) Failing after 2s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Successful in 21s
API Endpoint Tests / test-api-endpoints (push) Failing after 12m19s
- Changed pytest calls to use `venv/bin/python -m pytest` with explicit config
- Added `--rootdir "$PWD"` and `--import-mode=importlib` for consistent imports
- Fixed PYTHONPATH to use absolute paths with $PWD prefix
- Added smart contract security scanning for Solidity files
- Added Circom circuit security checks for ZK proof circuits
- Added ZK proof implementation security validation
- Added contracts/** to security scanning workflow
2026-05-11 13:46:42 +02:00
aitbc
95ca110d0a docs: update SETUP.md path to docs/deployment/ directory in README
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 4s
Deploy to Testnet / deploy-testnet (push) Successful in 1m32s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Failing after 49s
Multi-Node Stress Testing / stress-test (push) Successful in 3s
Node Failover Simulation / failover-test (push) Failing after 3s
Security Scanning / security-scan (push) Successful in 41s
2026-05-09 11:25:10 +02:00
aitbc1
302e9c650c Update dependencies and clean pycache 2026-05-07 14:34:01 +02:00
aitbc
07f988bc1f fix: address gateway resilience and readiness review items
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 10s
Deploy to Testnet / deploy-testnet (push) Successful in 1m13s
Integration Tests / test-service-integration (push) Successful in 1m37s
Multi-Node Stress Testing / stress-test (push) Successful in 1s
Node Failover Simulation / failover-test (push) Failing after 3s
Python Tests / test-python (push) Successful in 20s
Security Scanning / security-scan (push) Failing after 26s
2026-05-02 16:17:15 +02:00
aitbc
0784080465 fix: address post-push review issues - security, resilience, and code quality
Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Cross-Node Transaction Testing / transaction-test (push) Successful in 10s
Deploy to Testnet / deploy-testnet (push) Successful in 1m8s
Deploy to Testnet / notify-deployment (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 2m7s
Python Tests / test-python (push) Successful in 15s
Security Scanning / security-scan (push) Has been cancelled
- Fix hardcoded DATABASE_URL in 4 new microservices (gpu-service, governance-service, trading-service, marketplace-service) - now use os.getenv() with SQLite fallback
- Move httpx.AsyncClient to API gateway lifespan for connection pooling
- Add 30-second timeout to API gateway proxy calls
- Move hardcoded service URLs to environment variables in API gateway (GPU_SERVICE_URL, MARKETPLACE_SERVICE_URL, etc.)
- Add cli/build/ and cli/dist/ to .gitignore and remove 42 stale build artifacts from git
- Fix version pinning conflicts in 4 new service pyproject.toml files (align with root: fastapi >=0.115.6, sqlmodel >=0.0.38, pytest >=9.0.3)
- Fix 18 remaining datetime.utcnow() calls in monitoring-service and ai-service (replace with datetime.now(timezone.utc))
- Add retries (3 attempts), authentication (Bearer token), rate limiting (100/min via slowapi), and circuit breaker to API gateway
- Add /ready and /live endpoints to 4 new microservices for production readiness/liveness probes
- Audit debug logging - confirmed no sensitive data (passwords, keys, secrets, tokens) is logged; cache keys and masked API keys are safe
2026-05-02 14:51:13 +02:00
aitbc
f8297a52b3 Update gpu service DATABASE_URL to point to aitbc1 PostgreSQL 2026-05-02 10:24:48 +02:00
aitbc
fd8a516ba5 Add gpu-service data directory to git and update .gitignore
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 11s
Deploy to Testnet / deploy-testnet (push) Successful in 1m28s
Integration Tests / test-service-integration (push) Successful in 1m7s
Multi-Node Stress Testing / stress-test (push) Successful in 4s
Node Failover Simulation / failover-test (push) Failing after 2s
Python Tests / test-python (push) Failing after 12s
Deploy to Testnet / notify-deployment (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
2026-05-02 10:22:52 +02:00
aitbc
8602732d46 Convert API gateway to old Poetry format and add service routing for new microservices
Some checks failed
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Successful in 1m55s
Blockchain Synchronization Verification / sync-verification (push) Failing after 11s
CLI Tests / test-cli (push) Failing after 8s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 12s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 13s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 13s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
P2P Network Verification / p2p-verification (push) Successful in 6s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 32s
Package Tests / Python package - aitbc-core (push) Successful in 15s
Package Tests / Python package - aitbc-crypto (push) Successful in 11s
Package Tests / Python package - aitbc-sdk (push) Successful in 11s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 26s
Package Tests / JavaScript package - aitbc-token (push) Successful in 25s
Production Tests / Production Integration Tests (push) Failing after 1m15s
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Failing after 2m5s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 31s
Smart Contract Tests / test-foundry (push) Failing after 19s
Smart Contract Tests / lint-solidity (push) Successful in 17s
Smart Contract Tests / deploy-contracts (push) Successful in 1m24s
Staking Tests / test-staking-service (push) Failing after 14s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Successful in 22s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 14m13s
- Convert api-gateway pyproject.toml to old Poetry format for workspace compatibility
- Add routing configuration for AI service (port 8106)
- Add routing configuration for Monitoring service (port 8107)
- Add routing configuration for OpenClaw service (port 8108)
- Add routing configuration for Plugin service (port 8109)
- Remove duplicate middleware implementations from coordinator-api (app_logging.py, error
2026-04-30 16:15:05 +02:00
aitbc
85034afbb9 Fix datetime.now() calls to use lambda for default_factory in all services
- Fixed datetime.now() calls in gpu_marketplace.py to use lambda wrapper
- Fixed datetime.now() calls in global_marketplace.py to use lambda wrapper
- Fixed datetime.now() calls in marketplace.py to use lambda wrapper
- Fixed datetime.now() calls in trading.py to use lambda wrapper
- This fixes AttributeError when FieldInfo tries to access 'utc' attribute
2026-04-30 12:20:37 +02:00
aitbc
5a454e7efd Fix aitbc-core middleware and GPU service datetime issues
- Add missing Response import to request_id.py, performance.py, validation.py
- Fix datetime.UTC to timezone.utc in gpu_marketplace.py
- Fix validation middleware to handle streaming responses without body attribute
- Convert service pyproject.toml files to use old Poetry format for workspace compatibility
2026-04-30 12:17:15 +02:00
aitbc
f6900d6bf6 Add pytest test files for microservices
- Created test files for GPU service (tests/test_main.py)
- Created test files for Marketplace service (tests/test_main.py)
- Created test files for Trading service (tests/test_main.py)
- Created test files for Governance service (tests/test_main.py)
- Created integration tests for API gateway (tests/test_gateway.py)
- Added pytest dependencies to all service pyproject.toml files
- Created TEST_COVERAGE_REQUIREMENTS.md documenting coverage targets and best practices

This completes Phase 8: Create pytest test files for microservices
2026-04-30 11:57:09 +02:00
aitbc
1315884dec Add comprehensive testing documentation for microservices
- Created MICROSERVICES_TESTING_GUIDE.md with detailed testing procedures
- Updated GPU service README with detailed testing steps and expected responses
- Updated Marketplace service README with detailed testing steps and expected responses
- Updated Trading service README with detailed testing steps and expected responses
- Updated Governance service README with detailed testing steps and expected responses
- Updated API gateway README with detailed testing steps and routing tests

This completes Phase 7b: Update service READMEs with detailed testing steps
2026-04-30 11:50:20 +02:00
aitbc
6f2dba1ebe Update GPU service README with testing instructions and migration status
- Added database setup command using setup-database.sql
- Added testing instructions for end-to-end testing with gateway
- Added migration status section documenting completed and remaining tasks
- Documented that actual testing requires running services

This completes Phase 4.3e: Test end-to-end with gateway (documentation provided)
2026-04-30 11:24:58 +02:00
aitbc
1a9564568f Add database setup script for GPU service
- Created scripts/setup-database.sql to create aitbc_gpu database
- Database configured with aitbc_gpu user and privileges

This is Phase 4.3c: Setup separate database for GPU service
2026-04-30 11:23:30 +02:00
aitbc
d838c77a5f Extract GPU domain models and services to gpu-service
- Created domain directory with gpu_marketplace.py containing GPU domain models:
  - GPUArchitecture enum
  - GPURegistry
  - ConsumerGPUProfile
  - EdgeGPUMetrics
  - GPUBooking
  - GPUReview
- Created data directory with consumer_gpu_profiles.py
- Created services directory with edge_gpu_service.py
- Created storage.py for database session management
- Updated main.py to include database initialization and GPU router endpoints:
  - GET /v1/marketplace/edge-gpu/profiles
  - GET /v1/marketplace/edge-gpu/metrics/{gpu_id}
  - POST /v1/marketplace/edge-gpu/scan/{miner_id}
  - POST /v1/marketplace/edge-gpu/optimize/inference/{gpu_id}

This completes Phase 4.3a-4.3b: Extract GPU domain models and services
2026-04-30 11:23:04 +02:00
aitbc
6f6b66cef5 Create GPU service foundation
- Created gpu-service application structure
- Added pyproject.toml with FastAPI, SQLModel, asyncpg, and aitbc-core dependencies
- Implemented main.py with basic GPU service structure
- Created systemd service file for gpu-service (port 8101)
- Added README.md with installation and configuration instructions
- Documented future work needed for full GPU extraction

This starts Phase 4.3: Extract GPU Service (foundation created, full extraction requires additional work)
2026-04-30 11:19:10 +02:00