- 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
- Changed bid_data provider from .get('wallet', 'unknown') to .get('wallet') or 'unknown'
- Ensures None values from get() are properly handled with fallback to 'unknown'
Plugin model:
- Renamed 'metadata' field to 'plugin_metadata'
- 'metadata' is reserved in SQLAlchemy Declarative API
- Updated database column: ALTER TABLE plugin RENAME COLUMN metadata TO plugin_metadata
Fixes marketplace service startup error
Marketplace service:
- Added Plugin model to database schema (id, name, description, author, type, version, ipfs_cid, metadata, status, created_at, updated_at, download_count, rating)
- Added list_plugins() service method with type and status filters
- Added register_plugin() service method
- Updated GET /v1/marketplace/plugins to use database instead of mock data
- Added POST /v1/marketplace/plugins endpoint for plugin registration
- Created plugin table in aitbc_marketplace database
Replaces mock plugin data with real database-backed plugin marketplace
Marketplace service:
- Changed provider field to nullable in MarketplaceOffer model
- Removed default-provider logic since router has no auth context
- Allows offer creation without provider when auth not available
- Fix TradingService: convert all methods to async to match AsyncSession
- Fix router: await all async service method calls in trading main.py
- Auto-generate request_id/match_id/agreement_id in create methods
- Enhance marketplace analytics: real counts, avg price, total capacity
- Enhance trading analytics: real request/match/agreement counts
- All trading endpoints now return data instead of 500 errors
- 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
- Update list_offers to return dict instead of SQLAlchemy model objects
- Fixes ValueError and TypeError in FastAPI jsonable_encoder
- Converts all offer fields to dictionaries with proper datetime serialization
- Added logging for conversion tracking
- Change created_at and submitted_at fields to use datetime.utcnow instead of datetime.now(timezone.utc)
- Fixes TypeError: can't subtract offset-naive and offset-aware datetimes
- Database column is TIMESTAMP WITHOUT TIME ZONE, so timezone-naive datetime is required
- Convert MarketplaceService methods to async (list_offers, get_offer, create_offer, list_bids, create_bid)
- Add await to all database operations (execute, commit, refresh)
- Change Session to AsyncSession in MarketplaceService constructor
- Add try-except blocks with detailed logging to all service methods
- Add logging for method entry, database queries, result counts, and errors
- Add try-except with logging to get_session generator
- Simpl
- 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
- 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
- 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
- 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
- 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
- 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 marketplace service is very large (~130K lines) and full removal requires careful coordination
This completes Phase 4.4: Extract Marketplace Service (foundation created, full removal from coordinator-api requires additional work)
- Created scripts/setup-database.sql to create aitbc_marketplace database
- Database configured with aitbc_marketplace user and privileges
This completes Phase 4.4d: Setup separate database for marketplace service
- Created MarketplaceService with basic CRUD operations
- Created storage.py for database session management
- Updated main.py to include database initialization and marketplace endpoints:
- GET /v1/marketplace/offers
- GET /v1/marketplace/offers/{offer_id}
- POST /v1/marketplace/offers
- GET /v1/marketplace/bids
- POST /v1/marketplace/bids
- GET /v1/marketplace/analytics
This completes Phase 4.4c: Extract marketplace services
- Created domain directory with marketplace and global_marketplace models
- Extracted MarketplaceOffer and MarketplaceBid from coordinator-api
- Extracted global marketplace models:
- MarketplaceStatus and RegionStatus enums
- MarketplaceRegion
- GlobalMarketplaceConfig
- GlobalMarketplaceOffer
- GlobalMarketplaceTransaction
- Updated domain __init__.py to export all models
This completes Phase 4.4b: Extract marketplace domain models
- Created marketplace-service application structure
- Added pyproject.toml with FastAPI, SQLModel, asyncpg, and aitbc-core dependencies
- Implemented main.py with basic marketplace service structure
- Created systemd service file for marketplace-service (port 8102)
- Added README.md with installation and configuration instructions
This starts Phase 4.4: Extract Marketplace Service (foundation created)