Skip to content

fix: npm publish-hygiene + core bugs (#354 #323 #376 #417 #415 #372 #422 #437 #367 #438) + regression-guard CI#457

Open
ruvnet wants to merge 3 commits into
mainfrom
fix/issues-ci-guard-2026-05-11
Open

fix: npm publish-hygiene + core bugs (#354 #323 #376 #417 #415 #372 #422 #437 #367 #438) + regression-guard CI#457
ruvnet wants to merge 3 commits into
mainfrom
fix/issues-ci-guard-2026-05-11

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented May 11, 2026

Summary

Closes a cluster of "the published artifact / running code is structurally broken" issues, plus two concrete core bugs, and adds a Regression Guard workflow so they can't silently come back.

npm packaging

core

CI / CD

Validation

  • cargo check --workspace --exclude ruvector-postgres → clean (warnings only).
  • Touched-crate tests pass: ruvector-router-core::delete_does_not_deadlock, sona ... federated (6), ruvector-core ... simd_intrinsics (18).
  • npm run build + npm run verify-dist + npm pack --dry-run for ruvector → ONNX assets + dist/index.js present; node scripts/ci/check-npm-package-integrity.mjs → all green.
  • @ruvector/rvf-wasm packed tarball: dynamic import() of .mjs and await init() succeed on Node 22.
  • No tests were deleted; no test became newly-failing. (The 13 pre-existing ruvector npm-test failures — brain agi / midstream / brain search --verbose help text — are unrelated and untouched.)

Not in this PR (deferred — see issue notes)

🤖 Generated with claude-flow

ruvnet and others added 3 commits May 11, 2026 15:35
…regression guard

Fixes a cluster of "the published artifact is structurally broken" issues plus
two concrete core bugs, and adds a Regression Guard workflow so they can't come
back.

npm packaging:
- #354/#323: ruvector — ONNX wasm runtime assets now copied into dist/ (new
  scripts/copy-onnx.js) and src/core/onnx/ added to `files`; ONNX loader reads
  the .wasm via fs+WebAssembly.instantiate instead of an ESM wasm-module
  import (no --experimental-wasm-modules needed on Node 18-24). Bumped 0.2.26.
- #376: verify-dist.js now hard-fails on missing dist/index.js + ONNX assets
  and asserts dist/ is in `files`; runs from prepublishOnly after build.
- #417: ruvector CLI — db-path subcommands (insert/search/stats/export/import)
  read a <db>.meta.json sidecar instead of JSON.parsing the redb binary; all
  handlers made async + await wrapper calls; correct option names; embed text
  gives an actionable error when the ONNX bundle is missing.
- #415: @ruvector/rvf-wasm repackaged ESM-only (type:module, exports -> .mjs,
  removed mixed module.exports/export default) -> 0.1.7; @ruvector/rvf uses a
  downlevel-safe dynamic import() -> 0.2.1.
- #372: ruvector MCP server loads @ruvector/pi-brain via `await import` (it is
  ESM-only) instead of `require`; #422: hooks_route_enhanced calls the local
  cli.js directly instead of `npx ruvector ...` (npx cold-start was timing out).

core:
- #437: VectorDB::delete no longer acquires self.stats.write() twice in one
  expression (parking_lot self-deadlock); regression test added (timeout-guarded).
- #367: sona EphemeralAgent::get_patterns / FederatedCoordinator no longer call
  find_patterns(&[], 0) (always empty) -> get_all_patterns().
- #438: ruvector-core avx512f intrinsics gated behind opt-in `simd-avx512`
  Cargo feature (OFF by default); stable `cargo check -p ruvector-core` is clean.

CI:
- .github/workflows/regression-guard.yml + scripts/ci/check-npm-package-integrity.mjs:
  npm-pack tarball file-presence + `node --check` + load-without-packaging-error
  for ruvector & @ruvector/rvf-wasm; stable-toolchain build guard (#438); bans
  `npx` in the route-enhanced MCP handler (#422) and `require('@ruvector/pi-brain')`
  in the MCP server (#372); checks the pgrx pin is documented (#331).
- .github/workflows/publish-fixed-packages.yml: tag/dispatch publish for
  ruvector + @ruvector/rvf-wasm + @ruvector/rvf, dry-run by default, gated on
  the regression guard, skips already-published versions.

`cargo check --workspace --exclude ruvector-postgres` and the touched-crate
tests pass; the new regression-guard script passes locally.

Co-Authored-By: claude-flow <ruv@ruv.net>
`cargo fmt --check` was already red on main after recent merges
(ruvector-graph, ruvector-hailo, ruvllm_retrieval_diffusion,
ruvllm_sparse_attention). Pure mechanical reformat — no logic change —
so the ci.yml `fmt` job goes green for this PR.

Co-Authored-By: claude-flow <ruv@ruv.net>
…ort→recall, #316 sync embed silent-hash; repair red CI-guard jobs

Three fresh bug fixes + repair of the regression-guard checks that were red
on this very PR.

- #458 (Windows checkout fails): the two case-only-different filename pairs
  under `docs/research/claude-code-rvsource/.../react_memo_cache_sentinel/`
  (`TMUX.js`/`tmux.js`, `Type.js`/`type.js`) are now renamed `.lc.js` for the
  lowercase variants, so Windows clones get the full working tree. Their
  contents are distinct so we keep both.
- #316 (`embed()` silently returns hash vectors when ONNX is active):
  sync `IntelligenceEngine.embed()` now **throws** when an `onnxEmbedder`
  is configured, with a clear message pointing at `embedAsync()`. The
  `embedAsync()` ONNX-failure fallback bypasses the throwing public sync
  path via a new private `embedSyncNoOnnx()` so existing graceful-degrade
  callers still work.
- #315 (`import()` skips HNSW → recall returns []): `import()` now also
  inserts each memory into the `vectorDb` (matching `remember()`), and
  `recall()` falls through to the brute-force scan when `vectorDb.search()`
  returns an empty result (not just on a thrown error).

CI regression-guard repair + extensions:
- `npm package integrity` / `MCP server loads` were dying at `npm install`
  with `ERESOLVE`; added `--legacy-peer-deps` (matches the rest of the
  workspace's npm install conventions).
- `MCP server loads` now also runs `npm run build` and the new
  `scripts/ci/check-intelligence-engine-invariants.mjs` smoke test, which
  spawns `IntelligenceEngine`, exercises the #315 import→recall round-trip,
  and asserts the #316 sync-embed-throws invariant.
- `builds on stable (no nightly-only features)` was emitting a false
  positive because the grep didn't look at preceding lines — the
  `#[cfg(... feature = "simd-avx512" ...)]` gate sits one line above the
  `#[target_feature(...)]` attribute. Replaced with a small Python pass
  that checks a 3-line preceding window for the gate.
- New `no-case-collisions` job: `git ls-files | awk` over lowercased paths
  fails CI on any pair of tracked files that differ only by case (#458 prevention).

Local validation:
- `node scripts/ci/check-intelligence-engine-invariants.mjs` → both invariants OK
- `node scripts/ci/check-npm-package-integrity.mjs` → all packages clean
- case-collision sim → no dupes after the rename
- avx512 guard sim → recognises the cfg gate on the line above

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant