fix: populate feature_flags.json and remove sys.path bootstrap inserts
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

- 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.
This commit is contained in:
aitbc
2026-05-25 10:18:14 +02:00
parent fd6ade31dc
commit 9609924d56
5 changed files with 50 additions and 22 deletions

View File

@@ -1,14 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""AITBC Agent Management Service""" """AITBC Agent Management Service"""
import sys
from pathlib import Path
# Add project root to path
project_root = Path(__file__).parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
import uvicorn import uvicorn
from fastapi import FastAPI from fastapi import FastAPI
from aitbc import get_logger from aitbc import get_logger

View File

@@ -5,11 +5,6 @@ Runs both the main blockchain node, P2P placeholder service, and HTTP RPC server
""" """
import asyncio import asyncio
import sys
from pathlib import Path
# Add src to path
sys.path.insert(0, str(Path(__file__).parent.parent))
from aitbc import get_logger from aitbc import get_logger
from aitbc_chain.main import BlockchainNode, _run as run_node from aitbc_chain.main import BlockchainNode, _run as run_node

View File

@@ -3,11 +3,6 @@ Marketplace Service main application
Manages GPU marketplace operations Manages GPU marketplace operations
""" """
import sys
from pathlib import Path
# Add aitbc package to Python path
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent.parent))
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
from typing import AsyncIterator from typing import AsyncIterator

View File

@@ -3,9 +3,6 @@ from __future__ import annotations
from fastapi import FastAPI from fastapi import FastAPI
import uvicorn import uvicorn
import sys
sys.path.insert(0, "/opt/aitbc")
from aitbc.rate_limiting import RateLimitMiddleware from aitbc.rate_limiting import RateLimitMiddleware
from .api_jsonrpc import router as jsonrpc_router from .api_jsonrpc import router as jsonrpc_router

View File

@@ -1 +1,50 @@
{} {
"use_shared_agent_integration_service": {
"enabled": false,
"description": "Route agent integration calls through the shared aitbc-agent-core service instead of per-app implementations. Enable gradually after migration testing.",
"rollout_percentage": 0.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": null
},
"use_structlog": {
"enabled": false,
"description": "Use structlog-based structured logging instead of per-app logging implementations. Enable after logging standardisation migration.",
"rollout_percentage": 0.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": null
},
"strict_cors_enforcement": {
"enabled": true,
"description": "Enforce strict CORS origin allowlists on all services. Disabling falls back to permissive wildcard (dev only).",
"rollout_percentage": 100.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": "2026-05-24T00:00:00"
},
"trust_x_wallet_address_header": {
"enabled": false,
"description": "Trust the X-Wallet-Address header for authentication without JWT verification. Only for internal trusted networks; requires TRUST_X_WALLET_ADDRESS=true env var as well.",
"rollout_percentage": 0.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": null
},
"enable_zk_proof_verification": {
"enabled": false,
"description": "Enable real zero-knowledge proof verification for agent executions. Currently uses mock implementation.",
"rollout_percentage": 0.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": null
},
"enable_marketplace_rate_limiting": {
"enabled": true,
"description": "Enable rate limiting on marketplace API endpoints.",
"rollout_percentage": 100.0,
"whitelisted_users": [],
"blacklisted_users": [],
"enabled_since": "2026-05-24T00:00:00"
}
}