🐛 Critical Bug Fixes: 1. Database Schema - Missing memory_store Table (HIGH PRIORITY) - Fixed: src/utils/Database.ts - Added missing memory_store table - Issue: MemoryManager tried to use table that was never created - Impact: Fleet initialization now works with persistent agent memory - Added proper indexes for namespace and expires_at columns 2. MCP Server Startup Failure (HIGH PRIORITY) - Fixed: Created standalone aqe-mcp binary for Claude Code - Fixed: Updated mcp:start script to use compiled JS (not ts-node) - Impact: MCP server now reliably exposes all 52 tools ✅ Verification: - Clean TypeScript build - MCP server: 52 tools loading successfully - Database schema: Complete and verified 📦 New Files: - bin/aqe-mcp - Standalone MCP server binary - user-reported-issues/FIXES-Oct-25-2024.md - Complete fix docs 📚 Migration Guide: Users upgrading from v1.3.2: 1. npm run build 2. rm -rf ./data/*.db ./.agentic-qe/*.db 3. aqe init 4. Update Claude Code MCP config to use aqe-mcp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
8.2 KiB
AQE Database & MCP Server Fixes - October 25, 2024
Issues Reported by User (Lyle)
Issue 1: Missing memory_store Database Table
Symptom: aqe start was failing with error:
SqliteError: no such table: memory_store
Root Cause: The Database.ts file's createTables() method was missing the memory_store table definition. The MemoryManager was trying to use this table for persistent memory storage, but it was never created during database initialization.
Fix Applied:
- Added
memory_storetable to/workspaces/agentic-qe-cf/src/utils/Database.tsat line 235-245:
// Memory store for persistent agent memory
`CREATE TABLE IF NOT EXISTS memory_store (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key TEXT NOT NULL,
value TEXT NOT NULL,
namespace TEXT NOT NULL DEFAULT 'default',
ttl INTEGER DEFAULT 0,
metadata TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
expires_at DATETIME,
UNIQUE(key, namespace)
)`
- Added indexes for performance:
'CREATE INDEX IF NOT EXISTS idx_memory_store_namespace ON memory_store (namespace)',
'CREATE INDEX IF NOT EXISTS idx_memory_store_expires_at ON memory_store (expires_at)'
Location: src/utils/Database.ts:235-245 and src/utils/Database.ts:267-268
Issue 2: MCP Server Startup Failure
Symptom: Claude Code MCP connection failing with:
Status: ✘ failed
Command: npx
Args: agentic-qe mcp:start
Root Cause: The command npx agentic-qe mcp:start was incorrect. The agentic-qe binary doesn't have an mcp:start command. The MCP server is meant to be started via npm run mcp:start or directly with the standalone binary.
Fix Applied:
- Created new standalone MCP binary:
/workspaces/agentic-qe-cf/bin/aqe-mcp - Updated
package.jsonto include the new binary:
"bin": {
"agentic-qe": "./bin/agentic-qe",
"aqe": "./bin/aqe",
"aqe-mcp": "./bin/aqe-mcp"
}
- Fixed
mcp:startscript to use compiled JavaScript instead of ts-node:
"mcp:start": "node dist/mcp/start.js"
This resolves module resolution issues with ESM imports in CommonJS mode.
How to Apply Fixes
For Local Development (Your Environment)
- Pull the latest changes (if using git):
git pull origin testing-with-qe
- Rebuild the project:
npm run build
- Clean old databases (IMPORTANT - this will reset your fleet):
rm -rf ./data/*.db ./.agentic-qe/*.db
- Reinitialize AQE:
aqe init
- Test the fleet:
aqe start
You should NO LONGER see the no such table: memory_store error!
For Users Installing from NPM
Once version 1.3.3 is published (which includes these fixes), users should:
- Update to the latest version:
npm install -g agentic-qe@latest
- Clean old configuration:
rm -rf ./.agentic-qe
- Reinitialize:
aqe init
MCP Server Configuration for Claude Code
Option 1: Using the Standalone Binary (Recommended)
Update your .claude.json (or claude_desktop_config.json) to use the new standalone binary:
{
"mcpServers": {
"agentic-qe": {
"command": "aqe-mcp",
"args": []
}
}
}
Option 2: Using NPM Script
If you prefer to use the npm script:
{
"mcpServers": {
"agentic-qe": {
"command": "npm",
"args": ["--prefix", "/path/to/agentic-qe-project", "run", "mcp:start"]
}
}
}
Option 3: Using npx with the Binary
{
"mcpServers": {
"agentic-qe": {
"command": "npx",
"args": ["aqe-mcp"]
}
}
}
Testing the Fixes
1. Test Database Initialization
# Clean slate
rm -rf ./data ./agentic-qe
# Initialize
aqe init
# Start the fleet
aqe start
Expected: No memory_store table errors. You should see:
✅ Fleet Manager initialized successfully
✅ MemoryManager initialized successfully
2. Test MCP Server
# Start the MCP server standalone
aqe-mcp
Expected: MCP server starts and listens for connections from Claude Code.
3. Test Memory Persistence
# Start fleet
aqe start
# In another terminal, check memory
aqe memory stats
Expected: Should show memory statistics without errors.
Files Changed
-
src/utils/Database.ts
- Added
memory_storetable definition (line 235-245) - Added indexes for
memory_store(line 267-268)
- Added
-
bin/aqe-mcp (NEW FILE)
- Standalone MCP server binary
- Handles Claude Code MCP connections
-
package.json
- Added
aqe-mcptobinsection (line 10) - Fixed
mcp:startscript to use compiled JS (line 67) - Fixed
mcp:devscript for development (line 68)
- Added
-
dist/ (rebuilt)
- All compiled JavaScript with the fixes
Known Limitations
User's Local Environment Issue
Based on your error logs, there appears to be a separate issue with your local environment:
❌ Your local node_modules are broken due to missing workspace dependencies
❌ npm install is failing because workspace dependencies aren't resolved
This is NOT an agentic-qe issue. This is a workspace configuration problem in your project. To fix:
- If you're using npm workspaces:
rm -rf node_modules package-lock.json
npm install --workspaces --include-workspace-root
- If that fails:
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps
- Check for broken workspace packages:
npm ls @saasgen/api @saasgen/auth @saasgen/database
Version History
- v1.3.2 (current): Has the database schema bug
- v1.3.3 (upcoming): Will include these fixes
Support
If you continue to experience issues:
- Check the troubleshooting section above
- Enable debug mode:
DEBUG=1 aqe start - Report issues at: https://github.com/proffesor-for-testing/agentic-qe/issues
Summary
✅ Fixed: Missing memory_store database table
✅ Fixed: MCP server startup with new aqe-mcp binary
✅ Fixed: Database schema now complete and matches MemoryManager expectations
📋 Action Required: Users need to rebuild and reinitialize after updating
MCP Server Verification
The MCP server has been tested and is working correctly. It exposes 52 tools including:
Core Fleet Tools (9 tools)
mcp__agentic_qe__fleet_init- Initialize QE fleet with topologymcp__agentic_qe__fleet_status- Get fleet status and healthmcp__agentic_qe__agent_spawn- Spawn specialized QE agentsmcp__agentic_qe__task_orchestrate- Orchestrate tasks across agents- And more...
Test Tools (14 tools)
mcp__agentic_qe__test_generate- Generate comprehensive testsmcp__agentic_qe__test_execute- Execute test suitesmcp__agentic_qe__test_execute_stream- Streaming test executionmcp__agentic_qe__coverage_analyze_stream- Real-time coverage analysis- And more...
Quality Tools (10 tools)
mcp__agentic_qe__quality_gate_execute- Execute quality gatesmcp__agentic_qe__quality_risk_assess- Risk assessmentmcp__agentic_qe__deployment_readiness_check- Deployment validation- And more...
Memory & Coordination (10 tools)
mcp__agentic_qe__memory_store- Store agent memorymcp__agentic_qe__memory_retrieve- Retrieve shared memorymcp__agentic_qe__blackboard_post- Post to coordination blackboardmcp__agentic_qe__workflow_create- Create multi-agent workflows- And more...
Advanced QE (9 tools)
mcp__agentic_qe__flaky_test_detect- ML-based flaky test detectionmcp__agentic_qe__predict_defects_ai- AI defect predictionmcp__agentic_qe__mutation_test_execute- Mutation testingmcp__agentic_qe__api_breaking_changes- API contract validation- And more...
Verified: All 52 tools are loading and available for Claude Code to use!
Generated: October 25, 2024 Fixed by: Claude Code Version: 1.3.3-rc