Repository navigation
Conversation
Owner
Author
vitaly-z
pushed a commit
to vitaly-z/ruvector
that referenced
this pull request
Nov 11, 2026
`bench/run.mjs --gate` could print PASS with every check skipped and exit 0 when the native/WASM engine was absent. Add `--gate --require-engine`: an unavailable engine records a failed `required_engine` row and exits 1, and a skipped requested suite also fails strict execution. `--report-only` keeps its contract (records failures, exits 0). `--require-engine` without `--gate` is rejected. Default behavior is unchanged. Ported from ruvnet#1208 (stacked on ruvnet#1183) onto main; only bench/run.mjs and test/bench.test.mjs change. 22/22 bench contract tests pass on main. Co-Authored-By: claude-flow <ruv@ruv.net>
vitaly-z
pushed a commit
to vitaly-z/ruvector
that referenced
this pull request
Nov 11, 2026
Adds opt-in `--gate --strict-evidence` to bench/run.mjs on top of `--require-engine` (ruvnet#1461). Default, `--require-engine` and `--report-only` behavior are unchanged. Strict evidence requires: engine evaluation; completed requested training with finite telemetry; finite, bounded filtered head/tail metrics for every populated split; successful execution of every explicitly requested optional arm (ANN, tie check, adversarial retraining, whose train() errors are no longer discarded); and, when a baseline is supplied, a compatible schema, suite, requested scorer, full recorded config, tie mode, dataset split and file hashes, plus finite transfer MRR. Ported from ruvnet#1213 (11 commits stacked on ruvnet#1208's branch, which landed as ruvnet#1461) onto main. Bench contract tests: 30/30 (22 existing + 8 strict). Full kge suite: 0 failures, same 24 engine-absent skips as main. Known gap carried from ruvnet#1213: strict baseline comparison when the dataset has no transfer split is source-reviewed but not exercised by a test. 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.
The benchmark can print PASS with all eight checks skipped and exit 0 when its native/WASM engine is absent. That behavior is useful for report-only research, but it cannot establish that a required evaluation executed.
This patch adds
--gate --require-engine. An unavailable engine adds a failed required_engine row and exits 1. A skipped requested suite also makes strict execution fail.--report-onlycontinues to record failures while returning 0, preserving its existing contract. Supplying --require-engine without --gate is rejected. Existing default behavior is unchanged.Stacked on #1183 at 8dde49f to preserve that owner's SDK work. Only bench/run.mjs and test/bench.test.mjs are changed; this can be cherry-picked independently if preferred. No npm release is needed for these bench-only files.
Validation on Linux ruOS: reproduced the missing-engine zero exit at the base; the patched command exits 1 and emits required_engine FAIL. On exact remote head 18889bb, all 22 benchmark contract tests pass, none skipped, with a clean tracked tree. Tests include unavailable and available bindings, invalid flag combination, and report-only compatibility. git diff --check passed. The existing test suite's scoped security checks passed; this is not a full dependency or release security audit.
Acceptance command from npm/packages/kge, with no engine installed:
node bench/run.mjs --suite synthetic --gate --require-engine --epochs 1 --out /tmp/kge-required-engine.jsonExpected exit: 1; receipt contains required_engine FAIL. Legacy report-only remains exit 0.
Boundary: engine availability does not establish binding provenance, successful training, finite metrics, all required quality arms or actual transfer. Those remain separate release gates. Contract tests use fake bindings; no real model gain is claimed. Nothing is merged or published by this PR.