Skip to content

fix(kge): require an available engine in opted-in benchmark gates - #1208

Closed
ruvnet wants to merge 2 commits into
feat/npm-integrations-20261011from
fix/kge-required-engine-20261013
Closed

ruvnet wants to merge 2 commits into
feat/npm-integrations-20261011from
fix/kge-required-engine-20261013

Conversation

@ruvnet

@ruvnet ruvnet commented Oct 13, 2026

Copy link
Copy Markdown
Owner

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-only continues 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.json
Expected 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.

@ruvnet

ruvnet commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Landed on main via #1461 (merge 63a1d4d), which carries only this PR's two kge bench commits, squashed onto main instead of stacking on #1183. 22/22 bench contract tests pass. Closing as superseded.

@ruvnet ruvnet closed this Nov 10, 2026
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>
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