Commit Graph

4 Commits

Author SHA1 Message Date
Dragan Spiridonov 122f223c9a fix(security): migrate from @xenova/transformers to @huggingface/transformers
@xenova/transformers v2.17.2 (last publish 2024-05-29) pins
onnxruntime-web@1.14.0, which pulls onnx-proto → protobufjs <=7.5.5.
That chain has 8 GHSA advisories including a critical arbitrary-code-
execution one (GHSA-xq3m-2v4x-88gg). Our top-level `overrides` block
forced protobufjs@^7.5.6 in our own tree, hiding the vulns from
`npm audit` in this repo — but `overrides` are root-only by design and
do not propagate to downstream consumers. End users running
`npm install agentic-qe` were getting 5 vulns (4 high, 1 critical).

@huggingface/transformers@4.2.0 is the official maintained successor
(same project, renamed). It pulls onnxruntime-web@1.26 which depends
on protobufjs@^7.2.4 directly (no onnx-proto), so the version range
resolves cleanly to the patched line.

API changes handled:
- pipeline()/Tensor: drop-in compatible, just the import path changes
- `quantized: bool` → `dtype: DataType` (mapped from our QuantizationType
  enum: 'none'→'fp32', 'fp16'→'fp16', 'int8'→'int8', 'binary'→'q8';
  binary stays a post-process step downstream)
- progress_callback signature: ProgressInfo is now a discriminated union;
  `progress` only exists on the "progress" variant — narrowed accordingly

Also added onnxruntime-node and onnxruntime-web to the CLI and MCP
bundle externals lists. @huggingface/transformers ships both runtimes
(node for Node.js, web as fallback); esbuild can't bundle the
native .node binary so it must remain external.

End-user verification (npm pack + clean install in /tmp/aqe-canary):
- 183 packages (was 180 pre-migration; same order of magnitude)
- 0 vulnerabilities (was 5: 4 high, 1 critical)
- aqe init --auto runs in 93 ms; all 13 phases pass; optional-peers
  hint renders correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 09:27:22 +00:00
Profa c0d469a3bb fix: clean up stale v3/ references and protect memory namespaces post-flatten
Brutal honesty review of the flatten-to-root migration found 12 categories
of issues. This commit fixes all of them:

- Fix @agentic-qe/v3 package refs in init installers and quality-criteria-service
- Fix 7 broken import() paths in rvf-baseline-benchmark.ts (v3/src → src)
- Fix prepare-assets.sh and demo-warmup.sh path references
- Delete dead scripts/migrate-v2-to-v3-memory.js
- Remove .claude-flow daemon state dirs (284KB) from agents/skills
- Add .claude-flow exclusion to .npmignore
- Fix JSDoc @agentic-qe/v3/ → agentic-qe/ in 27 source files
- Fix @module v3/ tags in 9 dream engine files
- Fix stale v3/ path refs in docs and architecture ADRs
- Revert memory namespace changes (aqe/v3/domains/* are DB identifiers,
  not filesystem paths — changing them orphans 150K+ existing records)
- Update CLAUDE.md with agent classification rules (QE vs non-QE agents)
- Fix domain-team-manager test (scaling is not capped by defaultTeamSize)
- Fix adr-040 timing test threshold (20ms → 50ms for CI tolerance)
- Rename test:v3 → test:all in package.json
- Update README.md project structure tree
- Fix infra-healing test and demo script cd v3 references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:27:44 +00:00
Profa ef0da270f2 feat: complete RVF phase 2 — HNSW unification, test optimizer, brain export, benchmarks
- Migrate coverage domain QEGNNEmbeddingIndex to HnswAdapter (30 tests)
  Completes ADR-071: HNSW implementations reduced from 3 to 1 unified backend
- Add MinCut test suite optimizer for critical/skippable test partitioning (17 tests)
  Uses mincut analysis on coverage graph to identify minimum test set
- Add brain export/import with checksum validation and merge strategies (21 tests)
  Supports skip-conflicts, highest-confidence, latest-wins, union, dry-run
- Update benchmark script with 4 new sections: mincut routing, unified HNSW
  search, witness chain, structural health (12 total benchmarks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:39:29 +00:00
Profa abbebc6c21 feat: RVF cognitive container integration — 4 workstreams, 246 tests
Full implementation of RVF integration across 4 parallel workstreams:

WS-A: MinCut lambda-based routing replacing static 3-tier heuristics (47 unit + 41 integration tests)
WS-B: RVCOW dream branching via SQLite savepoints with speculative dreaming (26 unit + 22 integration tests)
WS-C: SHA-256 witness chain for tamper-evident audit trail (21 unit + 23 integration tests)
WS-D: Unified HNSW behind single IHnswIndexProvider interface (39 unit + 19 integration tests)
E2E: Cross-workstream lifecycle validation (8 integration tests)

Benchmark results: HNSW init -51.5%, pattern loading -42.3%, memory -14%, zero data loss.
6 new ADRs (068-073), baseline/post benchmarks, comparison report.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:24:23 +00:00