Commit Graph

2 Commits

Author SHA1 Message Date
Profa 96389efde3 feat: CI/CD best-in-class Phase 1+2 with crypto-secure randomness
Phase 1 — CLI CI-native flags:
- Add --format (text/json/sarif/junit/markdown) and --output to all
  output-producing commands: test, coverage, security, quality, code,
  fleet, task, status
- SARIF v2.1.0 output for security scans (GHAS integration)
- JUnit XML output for test results
- Synchronous --gate mode for quality assess with exit code 0/1

Phase 2 — First-class CI/CD config:
- New `aqe ci run` command reading .aqe-ci.yml config
- Phase pipeline: test → coverage → security → quality-gate
- Per-phase artifacts, thresholds, and continue_on_failure support
- Reusable GitHub Action (.github/actions/aqe/) for external consumers

Security — Replace all Math.random() with crypto-secure alternatives:
- New shared/utils/crypto-random.ts utility (secureRandom, secureRandomInt,
  secureRandomFloat, secureRandomPick, secureRandomShuffle, secureRandomGaussian)
- 136 Math.random() calls replaced across 50 source files
- Covers RL algorithms, neural networks, chaos engineering, benchmarks,
  optimizers, MCP tools, validation, and all domain services

Additional fixes:
- Real V8/istanbul coverage data reader (no more fabricated metrics)
- Dynamic version in SARIF output (no hardcoded strings)
- 32 new unit tests for CI output formatters and config parser
- Test isolation fixes for dream-cycle and reasoning-bank tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:38:00 +00:00
Dragan Spiridonov 6dbc1c377b fix: critical memory/learning system fixes for v1.9.4 (#89)
* SwarmMemoryManager Refactoring Plan

* fix: add missing directories to npm package (v1.9.3)

Added templates/, .claude/helpers/, and docs/reference/ to package.json
files array. These were missing from the npm distribution, causing
`aqe init` to fail with "Template file not found" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* checkpoint improvements

* fix: critical memory/learning system fixes for v1.9.4

## Critical Fixes
- Vector embeddings now stored correctly (was storing NULL)
- SQL parameter style fixed for agentdb's SqlJsDatabase wrapper
- HNSW index schema mismatch resolved with pattern_id column
- Hooks now save to correct database (.agentic-qe/agentdb.db)

## New Features
- Added 5 SwarmMemoryManager methods for learning data retrieval:
  - getBestAction() - Q-learning best action selection
  - getRecentLearningExperiences() - Recent experience retrieval
  - getLearningExperiencesByTaskType() - Task-filtered experiences
  - getHighRewardExperiences() - Successful experience extraction
  - getLearningStats() - Aggregate learning statistics
- Added comprehensive integration test for memory/learning loop
- Added RuVector pattern store integration (experimental)

## Technical Details
- Vector embeddings: 384 dimensions × 4 bytes = 1,536 bytes per pattern
- All 12 integration tests pass
- HNSW index: 150x faster vector search enabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: move ARM64-only ruvector packages to optionalDependencies

Fixes CI failures caused by platform-specific dependencies:
- @ruvector/node-linux-arm64-gnu (ARM64 only)
- ruvector-core-linux-arm64-gnu (ARM64 only)

These packages caused npm ci to fail on x64 CI runners with:
"EBADPLATFORM - wanted linux/arm64, current linux/x64"

Solution: Move ARM64 packages to optionalDependencies and add
x64 variants for cross-platform compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: regenerate package-lock.json with x64 ruvector packages

Updates lockfile to include optional x64 platform packages for
CI compatibility:
- @ruvector/node-linux-x64-gnu@0.1.17
- ruvector-core-linux-x64-gnu@0.1.15

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-30 20:52:44 +01:00