Changed datetime.now(datetime.UTC) to datetime.now(UTC) since UTC
is imported separately. This fixes AttributeError when error
responses are generated.
- Re-enabled edge_gpu and multi_modal_rl routers
- Added blockchain RPC proxy endpoints:
- GET /blocks/{height}
- GET /blocks/hash/{hash}
- GET /transactions/{tx_hash}
- GET /accounts/{address}
- GET /validators
- GET /supply
- GET /state/dump
- GET /blocks/{height} - Get block by height
- GET /blocks/hash/{hash} - Get block by hash
- GET /transactions/{tx_hash} - Get transaction by hash
- GET /accounts/{address} - Get account balance and state
- GET /validators - List validators
- GET /supply - Get token supply
- GET /state/dump - Get state dump
- Add blockchain, edge_gpu, multi_modal_rl to router imports
- Add include_router calls for edge_gpu and multi_modal_rl
- Remove conditional imports since files now exist
- Add configure_logging function to aitbc_logging.py for root logging level configuration
- Update coordinator-api import to use aitbc_logging.configure_logging instead of deprecated aitbc.logging module
- Add nosec B104 comments to 4 uvicorn.run() and 1 api_host binding using 0.0.0.0 (api-gateway, coordinator-api, exchange, wallet)
- Replace datetime.UTC with datetime.timezone.utc in 10 locations across agent SDK (agent.py, compute_provider.py, swarm_coordinator.py)
- Add Union and Callable to contract_integration.py imports
- Changed datetime.UTC to timezone.utc in advanced_ai.py
- Changed datetime.UTC to timezone.utc in realtime_learning.py
- Changed datetime.UTC to timezone.utc in jwt_handler.py
- Changed datetime.UTC to timezone.utc in distributed_consensus.py
- Changed datetime.UTC to timezone.utc in exceptions.py
- Changed datetime.UTC to timezone.utc in alerting.py
- Changed datetime.UTC to timezone.utc in communication.py
- Changed datetime.UTC to timezone.utc in message_types.py
- Updated imports from `datetime import
- 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
- Removed edge_gpu import from main.py
- Removed app.include_router(edge_gpu) from main.py
- Deleted edge_gpu.py router file
GPU endpoints now handled by gpu-service on port 8101
This is Phase 4.3d: Update coordinator-api to remove GPU code
- Updated aitbc-core pyproject.toml with structlog and starlette dependencies
- Created middleware directory with 4 middleware files:
- RequestIDMiddleware for request correlation
- PerformanceLoggingMiddleware for performance tracking
- RequestValidationMiddleware for size validation
- ErrorHandlerMiddleware for standardized error responses
- Added structlog logging functions (configure_logging, get_logger) to aitbc-core
- Updated coordinator-api main.py to use aitbc-core middleware and logging
- Removed local middleware files from coordinator-api
- Removed app_logging.py from coordinator-api
- Added aitbc-core as workspace package to root pyproject.toml
This completes Phase 4.1: Extract shared utilities to aitbc-core
- Created RequestValidationMiddleware for request/response size validation
- Created ErrorHandlerMiddleware for standardized error responses
- Added both middlewares to FastAPI app
- Created validation patterns documentation
- Configured 10MB default size limits for requests and responses
This completes Phase 6: Request Validation Middleware
- Created PerformanceLoggingMiddleware to track request timing
- Added performance logging to main.py
- Logs request duration in milliseconds
- Adds X-Process-Time header to responses
This is Phase 5.4: Add performance logging
- Updated app_logging.py to use structlog for structured logging
- Added configure_logging function with JSON output format
- Updated main.py to call configure_logging during startup
- Created RequestIDMiddleware for request correlation
- Added request ID middleware to FastAPI app
- Updated web_vitals.py to use structured logging
This is Phase 5.1-5.3: Configure structlog, add request ID correlation, update routers
- Fixed monitoring_dashboard.py: replaced bare except with ValueError, AttributeError
- Fixed cross_chain_bridge_enhanced.py: replaced bare except with Exception (with logging)
- Fixed enterprise_integration.py: replaced bare except with specific exceptions
This starts Phase 3: Exception Handling Improvement
Added __init__.py files to directories with Python files that were
missing them to fix imports and pytest discovery:
- apps/agent-coordinator/src/app and subdirectories (auth, monitoring, protocols, routing)
- apps/coordinator-api/src/app/agent_identity, reputation, utils
- apps/wallet/src/app/keystore, crypto, receipts
- apps/pool-hub/src/poolhub/services
- Test directories for agent-coordinator, blockchain-node, coordinator-api, pool-hub, wallet
- Source directories for agent-services and ai-engine
- blockchain-node subdirectories (contracts, economics, network, rpc)
- Migration directories for blockchain-node, coordinator-api, pool-hub
This improves import reliability and reduces the need for sys.path
manipulation in conftest.py.
Fixed hardcoded IP addresses in production code by replacing them with
environment variables or config settings:
- apps/blockchain-node/src/aitbc_chain/sync_cli.py: Use AITBC_SYNC_SOURCE
and AITBC_SYNC_IMPORT_URL env vars for RPC URLs
- apps/blockchain-node/src/aitbc_chain/app.py: Use AITBC_TRUSTED_IPS
env var for rate limiting bypass
- apps/coordinator-api/src/app/routers/client.py: Use settings.blockchain_rpc_url
for RPC endpoint
- dev/scripts/dev_heartbeat.py: Use AITBC_LOCAL_RPC and AITBC_GENESIS_RPC
env vars for RPC URLs
- cli/aitbc_cli.py: Use AITBC_FOLLOWER_HOST and AITBC_FOLLOWER_PORT
env vars for network peer display
This makes the codebase more portable and configurable for different
deployment environments.
Fixed Python 3.12+ deprecation warning by replacing all 357 occurrences
of datetime.utcnow() with datetime.now(datetime.UTC) across 49 files.
This change ensures timezone-aware datetime objects and fixes the deprecation
warning introduced in Python 3.12 (target version is 3.13).
- Add return type annotations to all async functions
- Add argument type annotations to functions missing them
- Add missing imports for typing (Any, Annotated, etc.)
- Add missing imports for FastAPI components (Query, Body, HTTPException)
- Fix validator functions in bounty.py and staking.py
- Fix dependency injection functions in agent_identity.py
- All 236 Ruff ANN001/ANN201 errors resolved across 26 files
- Add return type annotation to create_agent_network in client.py
- Add return type annotation to get_execution_receipt in client.py
- Add return type annotation to create_agent_network in admin.py
- Add return type annotation to get_execution_receipt in admin.py
- Addresses ruff ANN201 warnings in critical router files
- Add AsyncIterator, Callable, Awaitable imports from typing
- Add return type annotation to lifespan function (AsyncIterator[None])
- Add return type annotation to request_metrics_middleware (Response)
- Add type annotation to call_next parameter (Callable[[Request], Awaitable[Response]])
- Add return type annotation to rate_limit_metrics function (Response)
- Addresses ruff ANN001, ANN201, ANN202 warnings in main entrypoint
- Fix app.py to properly import FastAPI app from main.py
- Remove unused python_13_optimized.py variant
- Ensure single clean entrypoint for coordinator-api service
- Systemd wrapper uses app.main:app which now properly resolves
- Fixed bare except clauses in blockchain-node p2p_network.py
- Fixed bare except clauses in blockchain-node rpc/router.py
- Fixed bare except clauses in coordinator-api migration scripts
- Fixed bare except clause in coordinator-api agent_integration_router.py
- Addresses ruff E722 warnings in critical application code
- Note: 170 bare except clauses remain in tests/dev/plugins (lower priority)
- Remove host.docker.internal from api-endpoint-tests.yml CI workflow
- Remove Docker build/push commands from production-deploy.sh
- Remove Docker prerequisite checks from deploy.sh
- Remove Docker from CLI deployment instructions
- Remove Docker from marketplace_scaler.py scaling comment
- Remove Docker from agent_security.py sandbox config and comments
- Remove Docker from developer_platform.py skills list
- Remove Dockerfile/docker-compose.yml from final-cleanup.sh output
- Addresses request to remove all Docker support references
- Replace all 2,087 uses of datetime.utcnow() across 294 files
- Add UTC import to datetime statements where needed
- Addresses Python 3.12+ deprecation warning (report item #3)