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 2 commits into
Open
fix: npm publish-hygiene + core bugs (#354 #323 #376 #417 #415 #372 #422 #437 #367 #438) + regression-guard CI#457ruvnet wants to merge 2 commits into
ruvnet wants to merge 2 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ruvector: ONNX wasm runtime assets are now copied intodist/(newscripts/copy-onnx.js) andsrc/core/onnx/added tofiles; the ONNX loader reads the.wasmviafs+WebAssembly.instantiateinstead of an ESM wasm-moduleimport(no--experimental-wasm-moduleson Node 18–24). →ruvector@0.2.26.scripts/verify-dist.jsrewritten: hard-fails on missingdist/index.js+ the 6 ONNX assets, assertsdist/is infiles; still runs fromprepublishOnlyafterbuild.<database>path are broken on freshly-created DBs (andembed textfails on missing ONNX bundle) #417 —ruvectorCLI: db-path subcommands (insert/search/stats/export/import) read a<db>.meta.jsonsidecar instead ofJSON.parse-ing the redb binary; all those handlers are nowasync+awaitthe wrapper; correct option names (dimensions,k, …);embed textgives an actionable error when the ONNX bundle is missing.@ruvector/rvf-wasmrepackaged ESM-only (type: module,exports → .mjs, removed the mixedmodule.exports/export default) →0.1.7;@ruvector/rvfswitched to a downlevel-safe dynamicimport()→0.2.1. Tarball load-tests pass on Node 22.ruvectorMCP server loads@ruvector/pi-brainviaawait import(it is ESM-only) instead ofrequire(11 sites); theMODULE_NOT_FOUNDchecks also acceptERR_MODULE_NOT_FOUND/ERR_PACKAGE_PATH_NOT_EXPORTED.hooks_route_enhancedcalls the localcli.jsdirectly (execFileSync(node, [cli.js, …])) instead ofnpx ruvector …—npxcold-start was burning the 30 s budget.core
VectorDB::deleteno longer acquiresself.stats.write()twice in one expression (parking_lot self-deadlock). Regression test added (timeout-guarded thread).sonaEphemeralAgent::get_patterns/FederatedCoordinatorno longer callfind_patterns(&[], 0)(always empty) →get_all_patterns().ruvector-coreavx512f intrinsics gated behind an opt-insimd-avx512Cargo feature (OFF by default); dispatch falls through to AVX2/scalar when not compiled. Stablecargo check -p ruvector-coreis clean.CI / CD
.github/workflows/regression-guard.yml+scripts/ci/check-npm-package-integrity.mjs—npm packtarball file-presence +node --check+ load-without-packaging-error forruvector&@ruvector/rvf-wasm; a stable-toolchain build guard (ruvector-core: avx512f intrinsics force nightly toolchain on all dependents #438); bansnpxin thehooks_route_enhancedMCP handler (MCP tool hooks_route_enhanced returns 'spawnSync /bin/sh ETIMEDOUT' while CLI 'ruvector hooks route-enhanced' runs in <200ms #422) andrequire('@ruvector/pi-brain')in the MCP server (MCP brain_* tools fail with ERR_PACKAGE_PATH_NOT_EXPORTED — bin/mcp-server.js require()s ESM-only @ruvector/pi-brain #372); checks the pgrx version pin is documented (cargo build --release fails out of the box due to pgrx version mismatch #331)..github/workflows/publish-fixed-packages.yml— tag/dispatch publish forruvector+@ruvector/rvf-wasm+@ruvector/rvf(the packages the per-featurebuild-*.ymlworkflows don't cover): dry-run by default, gated on the regression guard, skips already-published versions, npm provenance. No publishes are performed by this PR.crates/ruvector-postgres/README.mdalready pinscargo install cargo-pgrx --version "0.12.9" --locked; the CI guard now keeps it documented.Validation
cargo check --workspace --exclude ruvector-postgres→ clean (warnings only).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-runforruvector→ ONNX assets +dist/index.jspresent;node scripts/ci/check-npm-package-integrity.mjs→ all green.@ruvector/rvf-wasmpacked tarball: dynamicimport()of.mjsandawait init()succeed on Node 22.ruvectornpm-test failures —brain agi/midstream/brain search --verbosehelp text — are unrelated and untouched.)Not in this PR (deferred — see issue notes)
ruvultra-embedderHTTP binary — touches a separate repo (obsidian-brain) and needs a naming decision (ruvllm-embeddervsruvultra-embedder).cargo pgrx schemageneration / a pgrx 0.17 migration across the whole pg extension (couples with cargo build --release fails out of the box due to pgrx version mismatch #331); only the doc-note part is cheap and is already present.ruvector-core,ruvector-router-core,sona) — these are internal workspace members, not currently on crates.io; the existingpublish-all.ymlonly publishesruvector-math/ruvector-attention.🤖 Generated with claude-flow