skillfit 0.9.1 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -14
- package/README.zh-CN.md +48 -14
- package/benches/README.md +23 -0
- package/benches/contrib/README.md +1 -0
- package/benches/contrib/oss-skill-independent/README.md +60 -0
- package/benches/contrib/oss-skill-independent/bench.json +79 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/LICENSE +22 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/Readme.md +1015 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/esm.mjs +15 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/index.js +27 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/argument.js +147 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/command.js +1944 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/error.js +45 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/help.js +396 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/option.js +208 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/suggestSimilar.js +100 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/package-support.json +16 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/package.json +63 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/typings/index.d.ts +774 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/typings/index.test-d.ts +416 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/upstream-package.json +69 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/LICENSE +22 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/Readme.md +1149 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/esm.mjs +16 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/index.js +24 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/argument.js +149 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/command.js +2662 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/error.js +39 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/help.js +713 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/option.js +367 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/suggestSimilar.js +101 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/package-support.json +16 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/package.json +71 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/esm.d.mts +3 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/index.d.ts +1045 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/index.test-d.ts +737 -0
- package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/upstream-package.json +82 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/index.d.ts +40 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/index.js +68 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/package.json +54 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/readme.md +99 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/upstream-package.json +54 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/index.js +67 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/package.json +46 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/index.d.ts +136 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/index.js +132 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/package.json +57 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/readme.md +181 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/upstream-package.json +58 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/index.js +84 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/package.json +48 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/index.d.ts +136 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/index.js +116 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/package.json +60 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/readme.md +170 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/upstream-package.json +60 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/index.d.ts +149 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/index.js +93 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/package.json +52 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/readme.md +192 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/upstream-package.json +52 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/index.d.ts +151 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/index.js +114 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/package.json +48 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/readme.md +158 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/upstream-package.json +48 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/index.d.ts +151 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/index.js +122 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/license +9 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/package.json +50 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/readme.md +190 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/upstream-package.json +50 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/LICENSE +22 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/Readme.md +1015 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/esm.mjs +15 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/index.js +27 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/argument.js +147 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/command.js +1948 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/error.js +45 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/help.js +396 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/option.js +208 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/suggestSimilar.js +100 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/package-support.json +16 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/package.json +63 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/typings/index.d.ts +774 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/typings/index.test-d.ts +416 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/upstream-package.json +69 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/LICENSE +22 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/Readme.md +1149 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/esm.mjs +16 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/index.js +24 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/argument.js +149 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/command.js +2666 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/error.js +39 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/help.js +713 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/option.js +367 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/suggestSimilar.js +101 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/package-support.json +16 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/package.json +71 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/esm.d.mts +3 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/index.d.ts +1045 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/index.test-d.ts +737 -0
- package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/upstream-package.json +82 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/async-hooks-stub.js +15 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/index.d.ts +40 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/index.js +71 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/package.json +61 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/readme.md +99 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/regression.test.mjs +6 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/upstream-package.json +54 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/index.js +67 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/package.json +46 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/index.d.ts +136 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/index.js +148 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/package.json +57 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/readme.md +181 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/upstream-package.json +58 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/index.js +84 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/package.json +48 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-commander-async-listener-order.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-commander-output-isolation.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-limit-async-context.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-limit-map-iteration-rejection.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-throttle-sync-throw.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-custom-timers.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-infinity-abort.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-rejection-listener.mjs +1 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/index.d.ts +136 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/index.js +121 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/package.json +60 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/readme.md +170 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/regression.test.mjs +6 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/upstream-package.json +60 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/index.d.ts +149 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/index.js +95 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/package.json +52 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/readme.md +192 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/upstream-package.json +52 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/index.d.ts +151 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/index.js +114 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/package.json +48 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/readme.md +158 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/upstream-package.json +48 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/index.d.ts +151 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/index.js +122 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/license +9 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/package.json +50 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/readme.md +190 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/regression.test.mjs +5 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/test.mjs +4 -0
- package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/upstream-package.json +50 -0
- package/benches/contrib/oss-skill-independent/prompts/commander-async-listener-order.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/commander-output-isolation.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/limit-async-context.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/limit-map-iteration-rejection.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/throttle-sync-throw.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/timeout-custom-timers.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/timeout-infinity-abort.md +3 -0
- package/benches/contrib/oss-skill-independent/prompts/timeout-rejection-listener.md +3 -0
- package/benches/contrib/oss-skill-independent/provenance.json +1903 -0
- package/benches/contrib/oss-skill-independent/task-specs.json +63 -0
- package/benches/contrib/oss-skill-independent/test-clock.mjs +65 -0
- package/benches/contrib/oss-skill-independent/verifiers/cases.mjs +197 -0
- package/benches/contrib/oss-skill-independent/verifiers/commander-async-listener-order.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/commander-output-isolation.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/grade.mjs +48 -0
- package/benches/contrib/oss-skill-independent/verifiers/limit-async-context.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/limit-map-iteration-rejection.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/probe.mjs +16 -0
- package/benches/contrib/oss-skill-independent/verifiers/regression-evidence.mjs +105 -0
- package/benches/contrib/oss-skill-independent/verifiers/test-reporter.mjs +29 -0
- package/benches/contrib/oss-skill-independent/verifiers/throttle-sync-throw.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/timeout-custom-timers.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/timeout-infinity-abort.mjs +1 -0
- package/benches/contrib/oss-skill-independent/verifiers/timeout-rejection-listener.mjs +1 -0
- package/dist/cli.js +183 -64
- package/dist/commands/bench-check-json.test.js +221 -0
- package/dist/commands/bench-check-report.js +48 -0
- package/dist/commands/bench-command-template.js +129 -0
- package/dist/commands/bench-manage.js +91 -0
- package/dist/commands/bench-manage.test.js +87 -0
- package/dist/commands/bench.js +166 -128
- package/dist/commands/bench.test.js +101 -0
- package/dist/commands/eval-component.js +25 -1
- package/dist/commands/eval-export.js +178 -0
- package/dist/commands/eval-export.test.js +279 -0
- package/dist/commands/eval-interruption.test.js +238 -0
- package/dist/commands/eval-preflight.js +61 -0
- package/dist/commands/eval-preflight.test.js +239 -0
- package/dist/commands/eval-report.js +44 -13
- package/dist/commands/eval-report.test.js +2 -2
- package/dist/commands/eval.js +94 -61
- package/dist/commands/eval.test.js +58 -1
- package/dist/harness/bench.js +21 -2
- package/dist/harness/eval-audit.js +45 -5
- package/dist/harness/eval-budget.js +51 -0
- package/dist/harness/eval-budget.test.js +212 -0
- package/dist/harness/eval-component.test.js +36 -0
- package/dist/harness/eval-contract.js +5 -1
- package/dist/harness/executors/api.js +10 -1
- package/dist/harness/executors/api.test.js +43 -0
- package/dist/harness/executors/cli.js +24 -3
- package/dist/harness/experiment-session.js +60 -9
- package/dist/harness/experiment-session.test.js +43 -1
- package/dist/harness/input-snapshot.js +150 -0
- package/dist/harness/interruption.js +48 -0
- package/dist/harness/interruption.test.js +31 -0
- package/dist/harness/replay-package.js +85 -0
- package/dist/harness/runner.js +74 -15
- package/dist/harness/trigger.js +20 -4
- package/docs/bench-authoring.md +40 -0
- package/docs/bench-check-json.md +122 -0
- package/docs/case-management.md +65 -0
- package/docs/eval-case-preflight.md +110 -0
- package/docs/eval-component.md +88 -49
- package/docs/eval-costs.md +9 -0
- package/docs/evaluation-input-snapshots.md +124 -0
- package/docs/evaluation-interruption.md +89 -0
- package/docs/evaluation-reports.md +49 -0
- package/docs/examples/check-receiver-mechanism-proposal.mjs +124 -0
- package/docs/examples/prepare-native-diff-probe.mjs +75 -0
- package/docs/examples/reproduce-independent-comparison-budget.mjs +73 -0
- package/docs/experiment-workflow.md +9 -2
- package/docs/first-real-eval.md +10 -1
- package/docs/growth-roadmap-2026-10.md +62 -93
- package/docs/metrics.md +52 -0
- package/docs/plans/2026-10-14-evidence-and-release-sequence.md +29 -12
- package/docs/plans/2026-10-15-independent-comparison-budget.json +1769 -0
- package/docs/plans/2026-10-15-independent-comparison-inputs.json +373 -0
- package/docs/plans/2026-10-15-independent-comparison-proposal.md +177 -0
- package/docs/plans/2026-10-15-native-diff-mechanism.md +105 -0
- package/docs/plans/2026-10-15-receiver-mechanism-proposal.json +342 -0
- package/docs/plans/2026-10-15-receiver-mechanism-proposal.md +146 -0
- package/docs/plans/2026-10-15-receiver-mechanism-verification.json +105 -0
- package/docs/plans/2026-10-16-case-workflow-and-release.md +49 -0
- package/docs/releases/0.10.0-ci-registry-install.json +140 -0
- package/docs/releases/0.10.0-feature-smoke.json +22 -0
- package/docs/releases/0.10.0-feature-smoke.mjs +62 -0
- package/docs/releases/0.10.0-signatures.txt +7 -0
- package/docs/releases/0.10.0-verification.json +76 -0
- package/docs/releases/0.10.0.md +81 -0
- package/docs/releases/0.10.1-feature-smoke.mjs +95 -0
- package/docs/releases/0.10.1.md +38 -0
- package/docs/releases/0.9.1-first-publication.json +249 -0
- package/docs/releases/0.9.1-verification.json +122 -0
- package/docs/releases/0.9.1.md +33 -1
- package/docs/releases/trusted-publishing.md +61 -0
- package/docs/replay-packages.md +97 -0
- package/docs/schemas/bench-check.schema.json +109 -0
- package/docs/schemas/eval-preflight.schema.json +57 -0
- package/docs/schemas/eval-request.schema.json +12 -0
- package/docs/schemas/eval-result.schema.json +11 -0
- package/docs/sharing-results.md +11 -2
- package/docs/skill-evaluation-evidence.md +52 -0
- package/evidence/2026-10-15-diagnosing-receiver-correction.md +140 -0
- package/evidence/2026-10-15-independent-comparison-regression-stop.md +162 -0
- package/evidence/2026-10-15-independent-offline-readiness.md +144 -0
- package/evidence/2026-10-15-native-diff-mechanism.md +196 -0
- package/evidence/2026-10-15-receiver-mechanism-stop.md +154 -0
- package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/README.md +35 -0
- package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/expected.json +577 -0
- package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/receiver-contract.test.mjs +138 -0
- package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/replay.mjs +127 -0
- package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/verification.json +105 -0
- package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/README.md +32 -0
- package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/checks.json +32 -0
- package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/package.tar.gz +0 -0
- package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/verification.json +25 -0
- package/evidence/artifacts/2026-10-15-independent-offline-readiness/README.md +17 -0
- package/evidence/artifacts/2026-10-15-independent-offline-readiness/verification.json +1548 -0
- package/evidence/artifacts/2026-10-15-native-diff-mechanism/README.md +48 -0
- package/evidence/artifacts/2026-10-15-native-diff-mechanism/package.tar.gz +0 -0
- package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/README.md +38 -0
- package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/checks.json +118 -0
- package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/package.tar.gz +0 -0
- package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/verification.json +36 -0
- package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/LICENSE +21 -0
- package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/SKILL.md +51 -0
- package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/agents/openai.yaml +3 -0
- package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/scripts/hitl-loop.template.sh +44 -0
- package/package.json +1 -1
- package/skills/skillfit/SKILL.md +17 -5
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from 'node:util';
|
|
3
3
|
import { runBenchAdd, runBenchCheck, runBenchInit } from './commands/bench.js';
|
|
4
|
+
import { benchCheckError, benchCheckJson } from './commands/bench-check-report.js';
|
|
5
|
+
import { inspectBench, manageBench } from './commands/bench-manage.js';
|
|
6
|
+
import { exportEvaluation } from './commands/eval-export.js';
|
|
4
7
|
import { runBundleExport } from './commands/bundle.js';
|
|
5
8
|
import { runDoctor } from './commands/doctor.js';
|
|
6
9
|
import { DEFAULT_EVAL_TRIALS, runEval } from './commands/eval.js';
|
|
@@ -16,17 +19,22 @@ const USAGE = `skillfit ${VERSION} — evidence-driven configuration for AI codi
|
|
|
16
19
|
Usage:
|
|
17
20
|
skillfit doctor [--agent <id>] Inspect current agent configuration health
|
|
18
21
|
skillfit report [--agent <id>] [--json] Skill usage receipts from local session history (read-only)
|
|
19
|
-
skillfit report eval <manifest
|
|
22
|
+
skillfit report eval <manifest-or-run-dir> Assess saved evidence as Markdown (read-only)
|
|
20
23
|
skillfit report eval <manifest-or-run-dir> --json [--replay] Assess saved evidence for an Agent
|
|
24
|
+
skillfit report eval <run-dir> --export <new-dir> Plan a portable offline replay package
|
|
21
25
|
skillfit eval --request <request.json> --dry-run Return a pinned JSON plan without calls
|
|
22
26
|
skillfit eval --request <request.json> --plan-sha <sha256> Run that plan and return JSON evidence
|
|
23
27
|
skillfit eval <target-path> [options] A/B-test a Skill, rules, or MCP setup against a bench
|
|
24
28
|
skillfit mcp check <spec.json> Handshake with a stdio or Streamable HTTP MCP server and audit its tool catalog
|
|
25
|
-
skillfit bench init [dir]
|
|
26
|
-
skillfit bench check [dir]
|
|
29
|
+
skillfit bench init [dir] [--kind output|command] Scaffold a text-output or code-editing case
|
|
30
|
+
skillfit bench check [dir] [--json] Validate a bench offline (verifier self-tests, hygiene)
|
|
27
31
|
skillfit bench check [dir] --calibrate Plus real baseline-difficulty runs (needs --agent)
|
|
28
32
|
skillfit bench add <dir> --freeze ... Freeze a real failure into a bench task (see below)
|
|
29
33
|
skillfit bench add <dir> --from-commit <sha> Mine a fix commit (parent = fixture, fix's tests = verifier)
|
|
34
|
+
skillfit bench list <dir> [--json] List registered cases without running verifiers
|
|
35
|
+
skillfit bench show <dir> <task-id> [--json] Inspect one registered case
|
|
36
|
+
skillfit bench edit <dir> <task-id> --set <field=value> Plan a manifest edit (apply with --yes)
|
|
37
|
+
skillfit bench remove <dir> <task-id> Plan to unregister a case, preserving its files
|
|
30
38
|
skillfit install [options] Inspect or apply a managed configuration profile
|
|
31
39
|
skillfit setup codex [options] Select verified upstream Skills and global Codex guidance
|
|
32
40
|
skillfit bundle export <dir> [options] Export used Codex skills and global guidance as a portable profile
|
|
@@ -38,13 +46,16 @@ Options:
|
|
|
38
46
|
--baseline-skill <path> With --mode installed, compare a previous Skill version against the target
|
|
39
47
|
--request <path> Version 1 Skill revision request (JSON output; excludes positional eval options)
|
|
40
48
|
--plan-sha <hash> Confirm the current --request dry-run plan before real calls
|
|
41
|
-
--json Machine output for
|
|
42
|
-
--policy <path> With report eval
|
|
43
|
-
--records <dir> With report eval
|
|
44
|
-
--replay With report eval
|
|
49
|
+
--json Machine output for bench check/list/show/edit/remove, report, and request-based eval
|
|
50
|
+
--policy <path> With report eval, assess against a policy (post-hoc changes cannot authorize adoption)
|
|
51
|
+
--records <dir> With report eval, use native evidence from this run directory
|
|
52
|
+
--replay With report eval, regrade cloned deliveries using the frozen bench
|
|
53
|
+
--export <dir> With report eval, plan a portable package; --yes writes a fresh destination
|
|
54
|
+
--input-root <label=path> With --export, recover pinned inputs from a matching copy (repeatable)
|
|
45
55
|
--compete-installed With --mode trigger, copy other user-level Skills into each trial so recall is not an upper bound
|
|
46
56
|
--input <mode> Paired eval or baseline calibration: snapshot (default) | workspace (CLI only)
|
|
47
57
|
--bench <path> Bench directory for eval (default: bundled benches)
|
|
58
|
+
--task <id> With eval, select cases (repeatable, manifest order); requests use taskIds
|
|
48
59
|
--trials <n> Repetitions per condition for eval (integer 1–20; default: ${DEFAULT_EVAL_TRIALS})
|
|
49
60
|
--max-calls <n> Call ceiling for eval / bench check --calibrate (includes enabled judges)
|
|
50
61
|
Also controls baseline calibration repetitions
|
|
@@ -65,6 +76,15 @@ Options:
|
|
|
65
76
|
--help, -h Show help
|
|
66
77
|
--version, -v Show version
|
|
67
78
|
|
|
79
|
+
bench init options:
|
|
80
|
+
--kind <kind> output (default, grades a reply) | command (grades file edits)
|
|
81
|
+
|
|
82
|
+
bench edit options:
|
|
83
|
+
--set <field=value> Change fixture, prompt, promptTrigger, verifier, verifierKind,
|
|
84
|
+
oracle, rubric or shouldTrigger (repeatable)
|
|
85
|
+
--unset <field> Remove promptTrigger, oracle, rubric or shouldTrigger (repeatable)
|
|
86
|
+
Edits/removals default to a plan; --yes backs up bench.json and applies
|
|
87
|
+
|
|
68
88
|
bench add --freeze options:
|
|
69
89
|
--task <id> Task id (required)
|
|
70
90
|
--prompt <text> Task prompt, or --prompt-file <path> (required)
|
|
@@ -85,56 +105,83 @@ bench add --from-commit options:
|
|
|
85
105
|
|
|
86
106
|
Docs: https://github.com/remote-controlled-man/skillfit
|
|
87
107
|
`;
|
|
108
|
+
const CLI_OPTIONS = {
|
|
109
|
+
agent: { type: 'string' },
|
|
110
|
+
'judge-agent': { type: 'string' },
|
|
111
|
+
mode: { type: 'string' },
|
|
112
|
+
'baseline-skill': { type: 'string' },
|
|
113
|
+
request: { type: 'string' },
|
|
114
|
+
'plan-sha': { type: 'string' },
|
|
115
|
+
policy: { type: 'string' },
|
|
116
|
+
records: { type: 'string' },
|
|
117
|
+
replay: { type: 'boolean', default: false },
|
|
118
|
+
'compete-installed': { type: 'boolean', default: false },
|
|
119
|
+
input: { type: 'string' },
|
|
120
|
+
bench: { type: 'string' },
|
|
121
|
+
trials: { type: 'string' },
|
|
122
|
+
'max-calls': { type: 'string' },
|
|
123
|
+
profile: { type: 'string' },
|
|
124
|
+
'profile-path': { type: 'string' },
|
|
125
|
+
skill: { type: 'string', multiple: true },
|
|
126
|
+
all: { type: 'boolean', default: false },
|
|
127
|
+
starter: { type: 'boolean', default: false },
|
|
128
|
+
list: { type: 'boolean', default: false },
|
|
129
|
+
'no-rules': { type: 'boolean', default: false },
|
|
130
|
+
'min-sessions': { type: 'string' },
|
|
131
|
+
'upstream-lock': { type: 'string' },
|
|
132
|
+
task: { type: 'string', multiple: true },
|
|
133
|
+
set: { type: 'string', multiple: true },
|
|
134
|
+
unset: { type: 'string', multiple: true },
|
|
135
|
+
export: { type: 'string' },
|
|
136
|
+
'input-root': { type: 'string', multiple: true },
|
|
137
|
+
prompt: { type: 'string' },
|
|
138
|
+
'prompt-file': { type: 'string' },
|
|
139
|
+
freeze: { type: 'boolean', default: false },
|
|
140
|
+
'from-commit': { type: 'string' },
|
|
141
|
+
include: { type: 'string', multiple: true },
|
|
142
|
+
'source-dir': { type: 'string' },
|
|
143
|
+
'verifier-cmd': { type: 'string' },
|
|
144
|
+
expect: { type: 'string' },
|
|
145
|
+
oracle: { type: 'string' },
|
|
146
|
+
decompose: { type: 'boolean', default: false },
|
|
147
|
+
'verifier-kind': { type: 'string' },
|
|
148
|
+
kind: { type: 'string' },
|
|
149
|
+
'should-trigger': { type: 'string' },
|
|
150
|
+
calibrate: { type: 'boolean', default: false },
|
|
151
|
+
json: { type: 'boolean', default: false },
|
|
152
|
+
'dry-run': { type: 'boolean', default: false },
|
|
153
|
+
project: { type: 'boolean', default: false },
|
|
154
|
+
strict: { type: 'boolean', default: false },
|
|
155
|
+
yes: { type: 'boolean', default: false },
|
|
156
|
+
help: { type: 'boolean', short: 'h', default: false },
|
|
157
|
+
version: { type: 'boolean', short: 'v', default: false },
|
|
158
|
+
};
|
|
159
|
+
function jsonBenchCommand() {
|
|
160
|
+
const supported = ['check', 'list', 'show', 'edit', 'remove'];
|
|
161
|
+
const args = process.argv.slice(2);
|
|
162
|
+
try {
|
|
163
|
+
const { values, positionals } = parseArgs({ args, allowPositionals: true, strict: false, options: CLI_OPTIONS });
|
|
164
|
+
// Loose parsing retains an invalid inline boolean value (for example
|
|
165
|
+
// --json=true). It still requests the JSON error envelope, not text output.
|
|
166
|
+
return values.json !== false && positionals[0] === 'bench' && supported.includes(positionals[1] ?? '') ? positionals[1] : null;
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
// A missing option value may prevent even loose parsing. Preserve JSON errors
|
|
170
|
+
// for the standard command spelling, including a leading --json flag.
|
|
171
|
+
const jsonFlag = (arg) => arg === '--json' || arg.startsWith('--json=');
|
|
172
|
+
const command = args.filter(arg => !jsonFlag(arg));
|
|
173
|
+
return args.some(jsonFlag) && command[0] === 'bench' && supported.includes(command[1] ?? '') ? command[1] : null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function failureExitCode(fallback) {
|
|
177
|
+
const current = Number(process.exitCode);
|
|
178
|
+
return current === 130 || current === 143 ? current : fallback;
|
|
179
|
+
}
|
|
88
180
|
async function main() {
|
|
89
181
|
const { values, positionals } = parseArgs({
|
|
90
182
|
args: process.argv.slice(2),
|
|
91
183
|
allowPositionals: true,
|
|
92
|
-
options:
|
|
93
|
-
agent: { type: 'string' },
|
|
94
|
-
'judge-agent': { type: 'string' },
|
|
95
|
-
mode: { type: 'string' },
|
|
96
|
-
'baseline-skill': { type: 'string' },
|
|
97
|
-
request: { type: 'string' },
|
|
98
|
-
'plan-sha': { type: 'string' },
|
|
99
|
-
policy: { type: 'string' },
|
|
100
|
-
records: { type: 'string' },
|
|
101
|
-
replay: { type: 'boolean', default: false },
|
|
102
|
-
'compete-installed': { type: 'boolean', default: false },
|
|
103
|
-
input: { type: 'string' },
|
|
104
|
-
bench: { type: 'string' },
|
|
105
|
-
trials: { type: 'string' },
|
|
106
|
-
'max-calls': { type: 'string' },
|
|
107
|
-
profile: { type: 'string' },
|
|
108
|
-
'profile-path': { type: 'string' },
|
|
109
|
-
skill: { type: 'string', multiple: true },
|
|
110
|
-
all: { type: 'boolean', default: false },
|
|
111
|
-
starter: { type: 'boolean', default: false },
|
|
112
|
-
list: { type: 'boolean', default: false },
|
|
113
|
-
'no-rules': { type: 'boolean', default: false },
|
|
114
|
-
'min-sessions': { type: 'string' },
|
|
115
|
-
'upstream-lock': { type: 'string' },
|
|
116
|
-
task: { type: 'string' },
|
|
117
|
-
prompt: { type: 'string' },
|
|
118
|
-
'prompt-file': { type: 'string' },
|
|
119
|
-
freeze: { type: 'boolean', default: false },
|
|
120
|
-
'from-commit': { type: 'string' },
|
|
121
|
-
include: { type: 'string', multiple: true },
|
|
122
|
-
'source-dir': { type: 'string' },
|
|
123
|
-
'verifier-cmd': { type: 'string' },
|
|
124
|
-
expect: { type: 'string' },
|
|
125
|
-
oracle: { type: 'string' },
|
|
126
|
-
decompose: { type: 'boolean', default: false },
|
|
127
|
-
'verifier-kind': { type: 'string' },
|
|
128
|
-
'should-trigger': { type: 'string' },
|
|
129
|
-
calibrate: { type: 'boolean', default: false },
|
|
130
|
-
json: { type: 'boolean', default: false },
|
|
131
|
-
'dry-run': { type: 'boolean', default: false },
|
|
132
|
-
project: { type: 'boolean', default: false },
|
|
133
|
-
strict: { type: 'boolean', default: false },
|
|
134
|
-
yes: { type: 'boolean', default: false },
|
|
135
|
-
help: { type: 'boolean', short: 'h', default: false },
|
|
136
|
-
version: { type: 'boolean', short: 'v', default: false },
|
|
137
|
-
},
|
|
184
|
+
options: CLI_OPTIONS,
|
|
138
185
|
});
|
|
139
186
|
if (values.version) {
|
|
140
187
|
console.log(VERSION);
|
|
@@ -148,12 +195,28 @@ async function main() {
|
|
|
148
195
|
if (values['baseline-skill'] !== undefined && command !== 'eval') {
|
|
149
196
|
throw new Error('--baseline-skill applies only to eval --mode installed.');
|
|
150
197
|
}
|
|
198
|
+
if (values.kind !== undefined && !(command === 'bench' && positionals[1] === 'init')) {
|
|
199
|
+
throw new Error('--kind applies only to bench init.');
|
|
200
|
+
}
|
|
201
|
+
if (values.task !== undefined && command !== 'eval' && !(command === 'bench' && positionals[1] === 'add')) {
|
|
202
|
+
throw new Error('--task applies only to eval or bench add.');
|
|
203
|
+
}
|
|
204
|
+
if ((values.set || values.unset) && !(command === 'bench' && positionals[1] === 'edit'))
|
|
205
|
+
throw new Error('--set and --unset apply only to bench edit.');
|
|
206
|
+
if (values.export !== undefined && !(command === 'report' && positionals[1] === 'eval'))
|
|
207
|
+
throw new Error('--export applies only to report eval.');
|
|
208
|
+
if (values['input-root'] && values.export === undefined)
|
|
209
|
+
throw new Error('--input-root requires report eval --export.');
|
|
210
|
+
if (values.export !== undefined && (values.replay || values.records || values.policy))
|
|
211
|
+
throw new Error('--export cannot be combined with --replay, --records or --policy.');
|
|
212
|
+
if (command === 'bench' && positionals[1] === 'add' && values.task && values.task.length !== 1)
|
|
213
|
+
throw new Error('bench add requires exactly one --task.');
|
|
151
214
|
if (values.request !== undefined && command !== 'eval')
|
|
152
215
|
throw new Error('--request applies only to eval.');
|
|
153
216
|
if (values['plan-sha'] !== undefined && (command !== 'eval' || values.request === undefined || values['dry-run']))
|
|
154
217
|
throw new Error('--plan-sha requires a non-dry-run eval --request.');
|
|
155
|
-
if ((values.policy !== undefined || values.records !== undefined || values.replay) && !(command === 'report' && positionals[1] === 'eval'
|
|
156
|
-
throw new Error('--policy, --records and --replay require report eval
|
|
218
|
+
if ((values.policy !== undefined || values.records !== undefined || values.replay) && !(command === 'report' && positionals[1] === 'eval')) {
|
|
219
|
+
throw new Error('--policy, --records and --replay require report eval.');
|
|
157
220
|
}
|
|
158
221
|
const common = {
|
|
159
222
|
agent: values.agent,
|
|
@@ -187,29 +250,38 @@ async function main() {
|
|
|
187
250
|
if (!positionals[2]) {
|
|
188
251
|
if (values.json)
|
|
189
252
|
throw new Error('report eval --json requires a manifest or native run directory.');
|
|
190
|
-
console.error('Usage: skillfit report eval <manifest
|
|
253
|
+
console.error('Usage: skillfit report eval <manifest-or-run-dir>');
|
|
191
254
|
process.exitCode = 2;
|
|
192
255
|
return;
|
|
193
256
|
}
|
|
257
|
+
if (values.export !== undefined) {
|
|
258
|
+
const result = await exportEvaluation(positionals[2], values.export, { yes: values.yes, dryRun: values['dry-run'], benchDir: values.bench, inputRoots: values['input-root'],
|
|
259
|
+
log: values.json ? () => { } : undefined });
|
|
260
|
+
if (values.json)
|
|
261
|
+
console.log(JSON.stringify(result, null, 2));
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
194
264
|
if (values.json)
|
|
195
265
|
console.log(JSON.stringify(await reportEvalComponent(positionals[2], {
|
|
196
266
|
policyPath: values.policy, recordsPath: values.records, replay: values.replay, benchDir: values.bench,
|
|
197
267
|
}), null, 2));
|
|
198
268
|
else
|
|
199
|
-
runEvalReport(positionals[2]
|
|
269
|
+
await runEvalReport(positionals[2], undefined, {
|
|
270
|
+
policyPath: values.policy, recordsPath: values.records, replay: values.replay, benchDir: values.bench,
|
|
271
|
+
});
|
|
200
272
|
return;
|
|
201
273
|
}
|
|
202
274
|
await runReport({ agent: values.agent, json: values.json ?? false });
|
|
203
275
|
return;
|
|
204
276
|
case 'eval': {
|
|
205
277
|
if (values.request !== undefined) {
|
|
206
|
-
if (positionals.length !== 1 || ['agent', 'mode', 'baseline-skill', 'bench', 'trials', 'max-calls', 'input', 'judge-agent'].some(key => values[key] !== undefined) || values['compete-installed']) {
|
|
278
|
+
if (positionals.length !== 1 || ['agent', 'mode', 'baseline-skill', 'bench', 'task', 'trials', 'max-calls', 'input', 'judge-agent'].some(key => values[key] !== undefined) || values['compete-installed']) {
|
|
207
279
|
throw new Error('--request cannot be combined with a target or positional eval settings; put settings in the request.');
|
|
208
280
|
}
|
|
209
281
|
const result = await runEvalComponent(values.request, { dryRun: values['dry-run'], expectedPlanSha256: values['plan-sha'], log: line => console.error(line) });
|
|
210
282
|
console.log(JSON.stringify(result, null, 2));
|
|
211
283
|
if (result.status === 'stopped')
|
|
212
|
-
process.exitCode = 2;
|
|
284
|
+
process.exitCode = failureExitCode(2);
|
|
213
285
|
return;
|
|
214
286
|
}
|
|
215
287
|
if (values.json)
|
|
@@ -231,6 +303,7 @@ async function main() {
|
|
|
231
303
|
skillPath,
|
|
232
304
|
baselineSkillPath: values['baseline-skill'],
|
|
233
305
|
bench: values.bench,
|
|
306
|
+
taskIds: values.task,
|
|
234
307
|
mode,
|
|
235
308
|
inputMode,
|
|
236
309
|
judgeAgent: values['judge-agent'],
|
|
@@ -288,13 +361,45 @@ async function main() {
|
|
|
288
361
|
}
|
|
289
362
|
case 'bench': {
|
|
290
363
|
const subcommand = positionals[1];
|
|
364
|
+
if (subcommand === 'list' || subcommand === 'show') {
|
|
365
|
+
if (subcommand === 'show' && !positionals[3])
|
|
366
|
+
throw new Error('Usage: skillfit bench show <dir> <task-id> [--json]');
|
|
367
|
+
const result = inspectBench(positionals[2] ?? '.', subcommand === 'show' ? positionals[3] : undefined);
|
|
368
|
+
if (values.json)
|
|
369
|
+
console.log(JSON.stringify(result, null, 2));
|
|
370
|
+
else if (subcommand === 'show')
|
|
371
|
+
console.log(JSON.stringify(result.tasks[0], null, 2));
|
|
372
|
+
else {
|
|
373
|
+
console.log(`Bench: ${result.name} (${result.tasks.length} tasks, sha256 ${result.sha256})`);
|
|
374
|
+
for (const task of result.tasks)
|
|
375
|
+
console.log(`${task.id}\t${task.verifierKind}\t${task.oracle ? 'oracle' : 'no oracle'}\t${task.fixture}`);
|
|
376
|
+
}
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
if (subcommand === 'edit' || subcommand === 'remove') {
|
|
380
|
+
if (!positionals[2] || !positionals[3])
|
|
381
|
+
throw new Error(`Usage: skillfit bench ${subcommand} <dir> <task-id> [--json] [--dry-run] [--yes]`);
|
|
382
|
+
const result = manageBench({ dir: positionals[2], taskId: positionals[3], action: subcommand,
|
|
383
|
+
set: values.set, unset: values.unset, dryRun: values['dry-run'], yes: values.yes,
|
|
384
|
+
log: values.json ? () => { } : undefined });
|
|
385
|
+
if (values.json)
|
|
386
|
+
console.log(JSON.stringify(result, null, 2));
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
291
389
|
if (subcommand === 'init') {
|
|
292
|
-
|
|
390
|
+
const kind = values.kind;
|
|
391
|
+
if (kind !== undefined && kind !== 'output' && kind !== 'command') {
|
|
392
|
+
throw new Error(`Unknown --kind: ${kind} (expected "output" or "command")`);
|
|
393
|
+
}
|
|
394
|
+
await runBenchInit({ ...common, dir: positionals[2], kind });
|
|
293
395
|
return;
|
|
294
396
|
}
|
|
295
397
|
if (subcommand === 'check') {
|
|
398
|
+
if (values.json && values.calibrate)
|
|
399
|
+
throw new Error('bench check --json is offline only; --calibrate cannot be combined with --json.');
|
|
296
400
|
const report = await runBenchCheck({
|
|
297
401
|
dir: positionals[2],
|
|
402
|
+
log: values.json ? () => { } : undefined,
|
|
298
403
|
calibrate: values.calibrate
|
|
299
404
|
? {
|
|
300
405
|
agent: values.agent,
|
|
@@ -305,6 +410,8 @@ async function main() {
|
|
|
305
410
|
}
|
|
306
411
|
: false,
|
|
307
412
|
});
|
|
413
|
+
if (values.json)
|
|
414
|
+
console.log(JSON.stringify(benchCheckJson(report), null, 2));
|
|
308
415
|
if (report.failures > 0)
|
|
309
416
|
process.exitCode = 1;
|
|
310
417
|
return;
|
|
@@ -325,7 +432,7 @@ async function main() {
|
|
|
325
432
|
await runBenchAdd({
|
|
326
433
|
...common,
|
|
327
434
|
benchDir: positionals[2],
|
|
328
|
-
task: values.task,
|
|
435
|
+
task: values.task?.[0],
|
|
329
436
|
prompt: values.prompt,
|
|
330
437
|
promptFile: values['prompt-file'],
|
|
331
438
|
freeze: values.freeze ?? false,
|
|
@@ -341,7 +448,7 @@ async function main() {
|
|
|
341
448
|
});
|
|
342
449
|
return;
|
|
343
450
|
}
|
|
344
|
-
console.error('Usage: skillfit bench init [dir] |
|
|
451
|
+
console.error('Usage: skillfit bench init [dir] | check [dir] | add <dir> ... | list <dir> | show/edit/remove <dir> <task-id>');
|
|
345
452
|
process.exitCode = 2;
|
|
346
453
|
return;
|
|
347
454
|
}
|
|
@@ -352,12 +459,24 @@ async function main() {
|
|
|
352
459
|
}
|
|
353
460
|
}
|
|
354
461
|
main().catch((err) => {
|
|
462
|
+
const benchCommand = jsonBenchCommand();
|
|
463
|
+
if (benchCommand === 'check') {
|
|
464
|
+
console.log(JSON.stringify(benchCheckError(err), null, 2));
|
|
465
|
+
process.exitCode = failureExitCode(2);
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
if (benchCommand) {
|
|
469
|
+
console.log(JSON.stringify({ schemaVersion: 1, kind: 'skillfit.bench-error', status: 'error',
|
|
470
|
+
error: { code: 'INVALID_BENCH_OPERATION', message: err instanceof Error ? err.message : String(err) } }, null, 2));
|
|
471
|
+
process.exitCode = failureExitCode(2);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
355
474
|
if (process.argv.some(arg => arg === '--request' || arg.startsWith('--request=')) ||
|
|
356
475
|
(process.argv.includes('--json') && process.argv.includes('report') && process.argv.includes('eval'))) {
|
|
357
476
|
console.log(JSON.stringify(componentError(err), null, 2));
|
|
358
|
-
process.exitCode = 2;
|
|
477
|
+
process.exitCode = failureExitCode(2);
|
|
359
478
|
return;
|
|
360
479
|
}
|
|
361
480
|
console.error(err instanceof Error ? err.message : String(err));
|
|
362
|
-
process.exitCode = 1;
|
|
481
|
+
process.exitCode = failureExitCode(1);
|
|
363
482
|
});
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { test } from 'node:test';
|
|
8
|
+
import { runBenchCheck, runBenchInit } from './bench.js';
|
|
9
|
+
import { benchCheckJson, benchDiagnostic } from './bench-check-report.js';
|
|
10
|
+
import { MOCK_MARKER_FILE } from '../harness/constants.js';
|
|
11
|
+
const ROOT = fileURLToPath(new URL('../..', import.meta.url));
|
|
12
|
+
const CLI = join(ROOT, 'dist/cli.js');
|
|
13
|
+
const SCHEMA = JSON.parse(readFileSync(join(ROOT, 'docs/schemas/bench-check.schema.json'), 'utf8'));
|
|
14
|
+
async function scaffold(t, kind = 'command') {
|
|
15
|
+
const cwd = mkdtempSync(join(tmpdir(), 'skillfit-check-json-'));
|
|
16
|
+
t.after(() => rmSync(cwd, { recursive: true, force: true }));
|
|
17
|
+
const dir = join(cwd, 'my bench');
|
|
18
|
+
await runBenchInit({ dir, kind, yes: true, log: () => { } });
|
|
19
|
+
return { cwd, dir };
|
|
20
|
+
}
|
|
21
|
+
function cli(cwd, args, expectedExit, env = process.env) {
|
|
22
|
+
const result = spawnSync(process.execPath, [CLI, ...args], { cwd, encoding: 'utf8', timeout: 30_000, env });
|
|
23
|
+
assert.equal(result.status, expectedExit, result.stderr || result.stdout);
|
|
24
|
+
assert.equal(result.stderr, '', 'JSON commands must not leak human logs to stderr');
|
|
25
|
+
// Parsing the complete stdout also rejects prefixes, trailers, and multiple JSON documents.
|
|
26
|
+
const data = JSON.parse(result.stdout);
|
|
27
|
+
assert.deepEqual(Object.keys(data).sort(), [...SCHEMA.required].sort(), 'result keys follow the published schema');
|
|
28
|
+
assert.equal(data.schemaVersion, 1);
|
|
29
|
+
assert.equal(data.kind, 'skillfit.bench-check');
|
|
30
|
+
assert.equal(data.scope, 'offline-integrity');
|
|
31
|
+
if (data.summary) {
|
|
32
|
+
for (const [field, status] of [['passed', 'PASS'], ['warnings', 'WARN'], ['failures', 'FAIL'], ['info', 'INFO']]) {
|
|
33
|
+
assert.equal(data.summary[field], data.checks.filter((c) => c.status === status).length);
|
|
34
|
+
}
|
|
35
|
+
assert.equal(data.summary.total, data.checks.length);
|
|
36
|
+
for (const check of data.checks) {
|
|
37
|
+
const item = SCHEMA.properties.checks.items;
|
|
38
|
+
assert.deepEqual(Object.keys(check).sort(), [...item.required].sort());
|
|
39
|
+
assert.ok(item.properties.code.enum.includes(check.code), 'gate code is documented in the schema');
|
|
40
|
+
assert.ok(item.properties.status.enum.includes(check.status));
|
|
41
|
+
if (check.evidence) {
|
|
42
|
+
assert.deepEqual(Object.keys(check.evidence).sort(), [...item.properties.evidence.required].sort());
|
|
43
|
+
assert.ok(check.evidence.output.length <= item.properties.evidence.properties.output.maxLength);
|
|
44
|
+
}
|
|
45
|
+
assert.ok(check.code && check.message && check.location.path);
|
|
46
|
+
if (check.status === 'WARN' || check.status === 'FAIL')
|
|
47
|
+
assert.ok(check.remediation);
|
|
48
|
+
else
|
|
49
|
+
assert.equal(check.remediation, null);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
assert.ok(!existsSync(join(cwd, 'runs')), 'offline JSON checks must not create evaluation runs');
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
test('bench check JSON preserves human gate outcomes, task identity and input fingerprints', async (t) => {
|
|
56
|
+
const { cwd, dir } = await scaffold(t);
|
|
57
|
+
const human = [];
|
|
58
|
+
const report = await runBenchCheck({ dir, log: line => human.push(line) });
|
|
59
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 0);
|
|
60
|
+
assert.equal(data.status, 'passed');
|
|
61
|
+
assert.equal(data.dir, dir);
|
|
62
|
+
assert.equal(data.error, null);
|
|
63
|
+
assert.equal(data.bench.taskCount, 1);
|
|
64
|
+
assert.match(data.bench.sha256, /^[a-f0-9]{64}$/);
|
|
65
|
+
assert.deepEqual(data.bench, report.bench);
|
|
66
|
+
assert.deepEqual(data.checks.map((c) => [c.code, c.status, c.message]), report.checks.map(c => [c.code, c.status, c.message]));
|
|
67
|
+
assert.equal(human.filter(line => line.startsWith('[')).length, data.summary.total);
|
|
68
|
+
const nop = data.checks.find((c) => c.code === 'UNTOUCHED_FIXTURE');
|
|
69
|
+
assert.equal(nop.taskId, 'example-task');
|
|
70
|
+
assert.deepEqual(nop.location, { path: 'bench.json', field: 'tasks[].verifier' });
|
|
71
|
+
assert.equal(nop.evidence.exitCode, 1, 'a failing untouched fixture is a passing integrity gate');
|
|
72
|
+
assert.equal(nop.status, 'PASS');
|
|
73
|
+
assert.equal(data.checks.find((c) => c.code === 'ORACLE').evidence.exitCode, 0);
|
|
74
|
+
});
|
|
75
|
+
test('warnings, output probes, mock arms and negative controls remain distinct in JSON', async (t) => {
|
|
76
|
+
const { cwd, dir } = await scaffold(t, 'output');
|
|
77
|
+
const path = join(dir, 'bench.json');
|
|
78
|
+
const manifest = JSON.parse(readFileSync(path, 'utf8'));
|
|
79
|
+
manifest.tasks[0].shouldTrigger = true;
|
|
80
|
+
manifest.tasks.push({ ...manifest.tasks[0], id: 'negative-task', shouldTrigger: false });
|
|
81
|
+
writeFileSync(path, JSON.stringify(manifest));
|
|
82
|
+
const data = cli(cwd, ['--json', 'bench', 'check', dir], 0);
|
|
83
|
+
assert.equal(data.status, 'passed');
|
|
84
|
+
assert.ok(data.summary.warnings > 0, 'facet-count warnings must not disappear or become failures');
|
|
85
|
+
for (const id of ['example-task', 'negative-task']) {
|
|
86
|
+
for (const code of ['MISSING_OUTPUT', 'EMPTY_OUTPUT', 'FACET_COUNT', 'ORACLE', 'MOCK_BASELINE', 'MOCK_TREATMENT', 'FIXTURE_SIZE']) {
|
|
87
|
+
assert.ok(data.checks.some((c) => c.code === code && c.taskId === id), `${id}: ${code}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const negative = data.checks.find((c) => c.code === 'NEGATIVE_CONTROLS');
|
|
91
|
+
assert.equal(negative.status, 'PASS');
|
|
92
|
+
assert.equal(negative.taskId, null);
|
|
93
|
+
});
|
|
94
|
+
test('missing, malformed and missing-reference benches produce structured validation failures', async (t) => {
|
|
95
|
+
const { cwd, dir } = await scaffold(t);
|
|
96
|
+
for (const [name, contents] of [['missing', null], ['malformed', '{'], ['missing-reference', '{"schemaVersion":1,"tasks":[{"id":"bad","fixture":"absent","prompt":"p.md","verifier":"node v.mjs"}]}']]) {
|
|
97
|
+
await t.test(name, () => {
|
|
98
|
+
if (contents === null)
|
|
99
|
+
rmSync(join(dir, 'bench.json'));
|
|
100
|
+
else
|
|
101
|
+
writeFileSync(join(dir, 'bench.json'), contents);
|
|
102
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
103
|
+
assert.equal(data.status, 'failed');
|
|
104
|
+
assert.equal(data.bench, null);
|
|
105
|
+
assert.equal(data.summary.failures, 1);
|
|
106
|
+
assert.equal(data.checks[0].code, 'BENCH_LOAD');
|
|
107
|
+
assert.equal(data.checks[0].location.path, 'bench.json');
|
|
108
|
+
assert.match(data.checks[0].message, /bench does not load/);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
test('JSON warnings and marker failures identify the affected bench fields and fixture paths', async (t) => {
|
|
113
|
+
const { cwd, dir } = await scaffold(t, 'output');
|
|
114
|
+
const path = join(dir, 'bench.json');
|
|
115
|
+
const manifest = JSON.parse(readFileSync(path, 'utf8'));
|
|
116
|
+
delete manifest.tasks[0].oracle;
|
|
117
|
+
manifest.tasks[0].shouldTrigger = true;
|
|
118
|
+
writeFileSync(path, JSON.stringify(manifest));
|
|
119
|
+
writeFileSync(join(dir, 'fixtures/example-task/large.txt'), 'x'.repeat(66 * 1024));
|
|
120
|
+
const warnings = cli(cwd, ['bench', 'check', dir, '--json'], 0);
|
|
121
|
+
const oracle = warnings.checks.find((c) => c.code === 'ORACLE');
|
|
122
|
+
assert.equal(oracle.status, 'WARN');
|
|
123
|
+
assert.equal(oracle.location.field, 'tasks[].oracle');
|
|
124
|
+
assert.equal(oracle.evidence, null);
|
|
125
|
+
const size = warnings.checks.find((c) => c.code === 'FIXTURE_SIZE');
|
|
126
|
+
assert.equal(size.status, 'WARN');
|
|
127
|
+
assert.equal(size.location.path, 'fixtures/example-task');
|
|
128
|
+
assert.equal(warnings.checks.find((c) => c.code === 'NEGATIVE_CONTROLS').status, 'WARN');
|
|
129
|
+
writeFileSync(join(dir, 'fixtures/example-task', MOCK_MARKER_FILE), '{');
|
|
130
|
+
const failed = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
131
|
+
const marker = failed.checks.find((c) => c.code === 'MOCK_MARKER');
|
|
132
|
+
assert.equal(marker.status, 'FAIL');
|
|
133
|
+
assert.equal(marker.taskId, 'example-task');
|
|
134
|
+
assert.equal(marker.location.path, `fixtures/example-task/${MOCK_MARKER_FILE}`);
|
|
135
|
+
});
|
|
136
|
+
test('JSON identifies a failed oracle process and retains its real command, exit and stderr', async (t) => {
|
|
137
|
+
const { cwd, dir } = await scaffold(t);
|
|
138
|
+
writeFileSync(join(dir, 'ground-truth/oracle-example-task.mjs'), "console.error('reference unavailable'); process.exit(7);");
|
|
139
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
140
|
+
const gate = data.checks.find((c) => c.code === 'ORACLE');
|
|
141
|
+
assert.equal(gate.status, 'FAIL');
|
|
142
|
+
assert.equal(gate.taskId, 'example-task');
|
|
143
|
+
assert.equal(gate.evidence.command, 'node ground-truth/oracle-example-task.mjs');
|
|
144
|
+
assert.equal(gate.evidence.exitCode, 7);
|
|
145
|
+
assert.match(gate.evidence.output, /reference unavailable/);
|
|
146
|
+
});
|
|
147
|
+
test('JSON exposes the actual failing verifier facets after the reference repair', async (t) => {
|
|
148
|
+
const { cwd, dir } = await scaffold(t);
|
|
149
|
+
writeFileSync(join(dir, 'ground-truth/oracle-example-task.mjs'), "import {writeFileSync} from 'node:fs';import {join} from 'node:path';writeFileSync(join(process.argv[2],'index.js'),'export const add=(a,b)=>Math.abs(a+b);');");
|
|
150
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
151
|
+
const gate = data.checks.find((c) => c.code === 'ORACLE');
|
|
152
|
+
assert.equal(gate.status, 'FAIL');
|
|
153
|
+
assert.equal(gate.evidence.command, 'node verifiers/example-task.mjs');
|
|
154
|
+
assert.ok(gate.evidence.checks.some((c) => c.name === 'negative-numbers' && !c.pass));
|
|
155
|
+
assert.ok(gate.evidence.checks.some((c) => c.name === 'positive-and-zero' && c.pass));
|
|
156
|
+
const verifier = join(dir, 'verifiers/example-task.mjs');
|
|
157
|
+
writeFileSync(verifier, readFileSync(verifier, 'utf8').replace('process.exit(passed ? 0 : 1)', 'process.exit(0)'));
|
|
158
|
+
const inconsistent = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
159
|
+
const lowScore = inconsistent.checks.find((c) => c.code === 'ORACLE');
|
|
160
|
+
assert.equal(lowScore.status, 'FAIL', 'an oracle must pass every named check even when exit code is zero');
|
|
161
|
+
assert.equal(lowScore.evidence.exitCode, 0);
|
|
162
|
+
assert.match(lowScore.message, /checks are stricter/);
|
|
163
|
+
});
|
|
164
|
+
test('an unspawnable verifier is a JSON failure with an unknown exit, never a passing NOP gate', async (t) => {
|
|
165
|
+
const { cwd, dir } = await scaffold(t);
|
|
166
|
+
const path = join(dir, 'bench.json');
|
|
167
|
+
const manifest = JSON.parse(readFileSync(path, 'utf8'));
|
|
168
|
+
manifest.tasks[0].verifier = 'skillfit-no-such-verifier';
|
|
169
|
+
writeFileSync(path, JSON.stringify(manifest));
|
|
170
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
|
|
171
|
+
const gate = data.checks.find((c) => c.code === 'UNTOUCHED_FIXTURE');
|
|
172
|
+
assert.equal(gate.status, 'FAIL');
|
|
173
|
+
assert.equal(gate.evidence.exitCode, null);
|
|
174
|
+
assert.ok(gate.evidence.error);
|
|
175
|
+
assert.match(gate.message, /could not be started/);
|
|
176
|
+
});
|
|
177
|
+
test('noisy verifier output stays inside bounded JSON evidence while named facets are retained', async (t) => {
|
|
178
|
+
const { cwd, dir } = await scaffold(t);
|
|
179
|
+
const path = join(dir, 'verifiers/example-task.mjs');
|
|
180
|
+
writeFileSync(path, "console.log('x'.repeat(10_000));console.error('verifier diagnostic');\n" + readFileSync(path, 'utf8'));
|
|
181
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 0);
|
|
182
|
+
const evidence = data.checks.find((c) => c.code === 'ORACLE').evidence;
|
|
183
|
+
assert.equal(evidence.outputTruncated, true);
|
|
184
|
+
assert.ok(evidence.output.length <= 8192);
|
|
185
|
+
assert.equal(evidence.checks.length, 4);
|
|
186
|
+
assert.ok(evidence.checks.every((c) => c.pass));
|
|
187
|
+
});
|
|
188
|
+
test('argument errors and calibration combinations return JSON before any verifier or agent starts', async (t) => {
|
|
189
|
+
const { cwd, dir } = await scaffold(t);
|
|
190
|
+
const sentinel = join(cwd, 'verifier-started');
|
|
191
|
+
writeFileSync(join(dir, 'verifiers/example-task.mjs'), `import {writeFileSync} from 'node:fs'; writeFileSync(${JSON.stringify(sentinel)},'unexpected'); process.exit(1);`);
|
|
192
|
+
const cases = [
|
|
193
|
+
['bench', 'check', dir, '--json', '--calibrate', '--agent', 'skillfit-no-live-agent'],
|
|
194
|
+
['bench', 'check', dir, '--json', '--calibrate', '--dry-run', '--agent', 'skillfit-no-live-agent'],
|
|
195
|
+
['--json', 'bench', 'check', dir, '--trials', 'nope'],
|
|
196
|
+
['bench', '--json', 'check', dir, '--unknown-option'],
|
|
197
|
+
['bench', 'check', dir, '--json', '--trials'],
|
|
198
|
+
['bench', 'check', dir, '--json=true'],
|
|
199
|
+
];
|
|
200
|
+
for (const args of cases) {
|
|
201
|
+
const data = cli(cwd, args, 2);
|
|
202
|
+
assert.equal(data.status, 'error');
|
|
203
|
+
assert.equal(data.summary, null);
|
|
204
|
+
assert.equal(data.error.code, 'INVALID_OR_FAILED_CHECK');
|
|
205
|
+
assert.ok(data.error.message);
|
|
206
|
+
assert.deepEqual(data.checks, []);
|
|
207
|
+
assert.ok(!existsSync(sentinel));
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
test('unexpected local execution errors cannot be mistaken for a completed JSON validation', async (t) => {
|
|
211
|
+
const { cwd, dir } = await scaffold(t);
|
|
212
|
+
const absent = join(cwd, 'missing-temp-root');
|
|
213
|
+
const data = cli(cwd, ['bench', 'check', dir, '--json'], 2, { ...process.env, TMPDIR: absent, TEMP: absent, TMP: absent });
|
|
214
|
+
assert.equal(data.status, 'error');
|
|
215
|
+
assert.equal(data.summary, null);
|
|
216
|
+
assert.ok(data.error.message);
|
|
217
|
+
});
|
|
218
|
+
test('offline JSON formatter refuses calibration records', () => {
|
|
219
|
+
assert.throws(() => benchCheckJson({ dir: '.', bench: null, failures: 0, warnings: 0,
|
|
220
|
+
checks: [benchDiagnostic('CALIBRATION', 'INFO', 'calibration record')] }), /must be offline/);
|
|
221
|
+
});
|