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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"limit-async-context": {
|
|
3
|
+
"repository": "sindresorhus/p-limit",
|
|
4
|
+
"sourcePaths": [
|
|
5
|
+
"index.js",
|
|
6
|
+
"package.json",
|
|
7
|
+
"async-hooks-stub.js"
|
|
8
|
+
],
|
|
9
|
+
"metadataEditable": [
|
|
10
|
+
"imports",
|
|
11
|
+
"files"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"timeout-custom-timers": {
|
|
15
|
+
"repository": "sindresorhus/p-timeout",
|
|
16
|
+
"sourcePaths": [
|
|
17
|
+
"index.js"
|
|
18
|
+
],
|
|
19
|
+
"metadataEditable": []
|
|
20
|
+
},
|
|
21
|
+
"throttle-sync-throw": {
|
|
22
|
+
"repository": "sindresorhus/p-throttle",
|
|
23
|
+
"sourcePaths": [
|
|
24
|
+
"index.js"
|
|
25
|
+
],
|
|
26
|
+
"metadataEditable": []
|
|
27
|
+
},
|
|
28
|
+
"commander-output-isolation": {
|
|
29
|
+
"repository": "tj/commander.js",
|
|
30
|
+
"sourcePaths": [
|
|
31
|
+
"lib/command.js"
|
|
32
|
+
],
|
|
33
|
+
"metadataEditable": []
|
|
34
|
+
},
|
|
35
|
+
"limit-map-iteration-rejection": {
|
|
36
|
+
"repository": "sindresorhus/p-limit",
|
|
37
|
+
"sourcePaths": [
|
|
38
|
+
"index.js"
|
|
39
|
+
],
|
|
40
|
+
"metadataEditable": []
|
|
41
|
+
},
|
|
42
|
+
"timeout-rejection-listener": {
|
|
43
|
+
"repository": "sindresorhus/p-timeout",
|
|
44
|
+
"sourcePaths": [
|
|
45
|
+
"index.js"
|
|
46
|
+
],
|
|
47
|
+
"metadataEditable": []
|
|
48
|
+
},
|
|
49
|
+
"timeout-infinity-abort": {
|
|
50
|
+
"repository": "sindresorhus/p-timeout",
|
|
51
|
+
"sourcePaths": [
|
|
52
|
+
"index.js"
|
|
53
|
+
],
|
|
54
|
+
"metadataEditable": []
|
|
55
|
+
},
|
|
56
|
+
"commander-async-listener-order": {
|
|
57
|
+
"repository": "tj/commander.js",
|
|
58
|
+
"sourcePaths": [
|
|
59
|
+
"lib/command.js"
|
|
60
|
+
],
|
|
61
|
+
"metadataEditable": []
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
|
|
3
|
+
export async function flush() {
|
|
4
|
+
for (let i = 0; i < 24; i++) await Promise.resolve();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function observe(promise) {
|
|
8
|
+
const state = {status: 'pending'};
|
|
9
|
+
Promise.resolve(promise).then(
|
|
10
|
+
value => Object.assign(state, {status: 'fulfilled', value}),
|
|
11
|
+
reason => Object.assign(state, {status: 'rejected', reason}),
|
|
12
|
+
);
|
|
13
|
+
return state;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function gate() {
|
|
17
|
+
let release;
|
|
18
|
+
const promise = new Promise(resolve => { release = resolve; });
|
|
19
|
+
return {promise, release};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Only test processes replace their clock; fixtures and the eval runner stay unchanged.
|
|
23
|
+
export async function withClock(run) {
|
|
24
|
+
const original = {setTimeout: globalThis.setTimeout, clearTimeout: globalThis.clearTimeout, now: Date.now};
|
|
25
|
+
let now = 1000, serial = 0;
|
|
26
|
+
const timers = new Map(), errors = [];
|
|
27
|
+
globalThis.setTimeout = (fn, delay = 0, ...args) => {
|
|
28
|
+
const id = ++serial;
|
|
29
|
+
timers.set(id, {at: now + Math.max(0, Number(delay)), fn, args});
|
|
30
|
+
return id;
|
|
31
|
+
};
|
|
32
|
+
globalThis.clearTimeout = id => timers.delete(id);
|
|
33
|
+
Date.now = () => now;
|
|
34
|
+
const clock = {
|
|
35
|
+
get now() { return now; },
|
|
36
|
+
get pending() { return timers.size; },
|
|
37
|
+
async advance(amount) {
|
|
38
|
+
const end = now + amount;
|
|
39
|
+
for (let steps = 0; ; steps++) {
|
|
40
|
+
assert.ok(steps < 1000, 'timer queue must make bounded progress');
|
|
41
|
+
const next = [...timers.entries()].filter(([, t]) => t.at <= end)
|
|
42
|
+
.sort((a, b) => a[1].at - b[1].at || a[0] - b[0])[0];
|
|
43
|
+
if (!next) break;
|
|
44
|
+
const [id, timer] = next;
|
|
45
|
+
timers.delete(id); now = timer.at;
|
|
46
|
+
try {
|
|
47
|
+
const result = timer.fn(...timer.args);
|
|
48
|
+
if (result?.then) Promise.resolve(result).catch(error => errors.push(error));
|
|
49
|
+
} catch (error) { errors.push(error); }
|
|
50
|
+
await flush();
|
|
51
|
+
}
|
|
52
|
+
now = end;
|
|
53
|
+
await flush();
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
try {
|
|
57
|
+
await run(clock);
|
|
58
|
+
await flush();
|
|
59
|
+
assert.deepEqual(errors, [], 'scheduled callbacks must not throw outside their public promises');
|
|
60
|
+
} finally {
|
|
61
|
+
globalThis.setTimeout = original.setTimeout;
|
|
62
|
+
globalThis.clearTimeout = original.clearTimeout;
|
|
63
|
+
Date.now = original.now;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
+
import { getEventListeners } from 'node:events';
|
|
4
|
+
import { flush, observe, gate, withClock } from '../test-clock.mjs';
|
|
5
|
+
|
|
6
|
+
const yes = (state, value) => { assert.equal(state.status, 'fulfilled'); assert.deepEqual(state.value, value); };
|
|
7
|
+
const no = (state, reason) => { assert.equal(state.status, 'rejected'); assert.equal(state.reason, reason); };
|
|
8
|
+
const names = {
|
|
9
|
+
'limit-async-context': ['Distinct callers retain their own store', 'Queued-to-active transitions retain context', 'Concurrency one and multiple preserve isolation', 'Ordinary fulfillment and rejection remain intact'],
|
|
10
|
+
'timeout-custom-timers': ['Scheduling does not bind this to the customTimers container', 'Clearing does not bind this to that container', 'Timeout and fallback paths keep their results', 'Ordinary fulfillment and rejection keep identity'],
|
|
11
|
+
'throttle-sync-throw': ['Delayed sync throw rejects with the original error', 'Queue state is cleaned after failure', 'Async rejections still propagate', 'Successful calls preserve receiver and arguments'],
|
|
12
|
+
'commander-output-isolation': ['Child configuration applies locally', 'Parent output configuration remains intact', 'Sibling configuration remains intact', 'Unmodified output callbacks remain available'],
|
|
13
|
+
'limit-map-iteration-rejection': ['Iterator error identity reaches the caller', 'Scheduled mapper failures create no unhandled rejection', 'Already queued work still finishes with correct queue counts', 'Ordinary arrays and array-like inputs keep map behavior'],
|
|
14
|
+
'timeout-rejection-listener': ['Original rejection identity is retained', 'No derived promise creates an unhandled rejection', 'Abort listeners are removed on settlement', 'Fulfillment, explicit abort and timeout paths remain intact'],
|
|
15
|
+
'timeout-infinity-abort': ['An already aborted signal rejects', 'An abort after wrapping also rejects', 'Unaborted input fulfillment and rejection pass through', 'Infinity schedules no finite timeout'],
|
|
16
|
+
'commander-async-listener-order': ['Async preAction then action precede the legacy event', 'postAction follows that event', 'parseAsync waits for the action chain', 'Synchronous and no-subcommand cases keep their order'],
|
|
17
|
+
};
|
|
18
|
+
export const caseNames = task => { assert.ok(names[task], 'unknown task'); return names[task]; };
|
|
19
|
+
|
|
20
|
+
export async function runCase(api, task, index) {
|
|
21
|
+
const fn = api.default, Command = api.Command ?? api.default?.Command;
|
|
22
|
+
const run = {
|
|
23
|
+
'limit-async-context': [
|
|
24
|
+
async () => {
|
|
25
|
+
const store = new AsyncLocalStorage(), limit = fn(2);
|
|
26
|
+
await Promise.all(Array.from({ length: 32 }, (_, id) => store.run({ id }, () => limit(async () => {
|
|
27
|
+
await Promise.resolve(); assert.equal(store.getStore()?.id, id);
|
|
28
|
+
}))));
|
|
29
|
+
},
|
|
30
|
+
async () => {
|
|
31
|
+
const store = new AsyncLocalStorage(), limit = fn(1), ready = gate();
|
|
32
|
+
const first = store.run('first', () => limit(async () => { await ready.promise; return store.getStore(); }));
|
|
33
|
+
const later = ['second', 'third'].map(id => store.run(id, () => limit(() => store.getStore())));
|
|
34
|
+
await flush(); ready.release(); assert.deepEqual(await Promise.all([first, ...later]), ['first', 'second', 'third']);
|
|
35
|
+
},
|
|
36
|
+
async () => {
|
|
37
|
+
for (const concurrency of [1, 3, 7]) {
|
|
38
|
+
const limit = fn(concurrency), store = new AsyncLocalStorage();
|
|
39
|
+
const result = await Promise.all(Array.from({ length: 20 }, (_, id) => store.run(id, () => limit(async () => {
|
|
40
|
+
await Promise.resolve(); return store.getStore();
|
|
41
|
+
}))));
|
|
42
|
+
assert.deepEqual(result, Array.from({ length: 20 }, (_, id) => id));
|
|
43
|
+
assert.equal(limit.activeCount, 0); assert.equal(limit.pendingCount, 0);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
async () => {
|
|
47
|
+
const limit = fn(2), error = new Error('preserved');
|
|
48
|
+
assert.deepEqual(await Promise.all([limit(() => 2), limit(async () => 4)]), [2, 4]);
|
|
49
|
+
await assert.rejects(limit(() => { throw error; }), value => value === error);
|
|
50
|
+
assert.equal(await limit(() => 8), 8);
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
'timeout-custom-timers': [
|
|
54
|
+
() => withClock(async () => {
|
|
55
|
+
const customTimers = { setTimeout: function (...args) { assert.equal(this, undefined); return setTimeout(...args); }, clearTimeout: (...args) => clearTimeout(...args) };
|
|
56
|
+
const state = observe(fn(Promise.resolve(7), { milliseconds: 20, customTimers })); await flush(); yes(state, 7);
|
|
57
|
+
}),
|
|
58
|
+
() => withClock(async () => {
|
|
59
|
+
let clears = 0;
|
|
60
|
+
const customTimers = { setTimeout: (...args) => setTimeout(...args), clearTimeout: function (...args) { assert.equal(this, undefined); clears++; return clearTimeout(...args); } };
|
|
61
|
+
const state = observe(fn(Promise.resolve(9), { milliseconds: 20, customTimers })); await flush(); yes(state, 9); assert.equal(clears, 1);
|
|
62
|
+
}),
|
|
63
|
+
() => withClock(async clock => {
|
|
64
|
+
const a = observe(fn(new Promise(() => {}), { milliseconds: 10, fallback: () => 42 }));
|
|
65
|
+
await clock.advance(10); yes(a, 42);
|
|
66
|
+
const error = new Error('fallback'); const b = observe(fn(new Promise(() => {}), { milliseconds: 10, fallback: () => { throw error; } }));
|
|
67
|
+
await clock.advance(10); no(b, error);
|
|
68
|
+
}),
|
|
69
|
+
() => withClock(async () => {
|
|
70
|
+
const error = new Error('source'), a = observe(fn(Promise.resolve(false), { milliseconds: 20 })), b = observe(fn(Promise.reject(error), { milliseconds: 20 }));
|
|
71
|
+
await flush(); yes(a, false); no(b, error);
|
|
72
|
+
}),
|
|
73
|
+
],
|
|
74
|
+
'throttle-sync-throw': [
|
|
75
|
+
() => withClock(async clock => {
|
|
76
|
+
const throttle = fn({ limit: 1, interval: 10 }), error = new Error('delayed');
|
|
77
|
+
await throttle(() => 1)(); const state = observe(throttle(() => { throw error; })());
|
|
78
|
+
await clock.advance(10); no(state, error);
|
|
79
|
+
}),
|
|
80
|
+
() => withClock(async clock => {
|
|
81
|
+
const throttle = fn({ limit: 1, interval: 10 }), controller = new AbortController(), error = new Error('failure');
|
|
82
|
+
await throttle(() => 1)(); const wrapped = throttle(() => { throw error; }), state = observe(wrapped());
|
|
83
|
+
assert.equal(wrapped.queueSize, 1); await clock.advance(10); assert.equal(wrapped.queueSize, 0); no(state, error);
|
|
84
|
+
const next = observe(throttle(() => 3)()); await clock.advance(10); yes(next, 3);
|
|
85
|
+
}),
|
|
86
|
+
() => withClock(async clock => {
|
|
87
|
+
const throttle = fn({ limit: 1, interval: 10 }), error = new Error('async');
|
|
88
|
+
await throttle(() => 1)(); const state = observe(throttle(async () => { throw error; })()); await clock.advance(10); no(state, error);
|
|
89
|
+
}),
|
|
90
|
+
() => withClock(async clock => {
|
|
91
|
+
const wrapped = fn({ limit: 1, interval: 10 })(function (...args) { return [this.name, ...args]; });
|
|
92
|
+
const a = observe(wrapped.call({ name: 'a' }, 1)), b = observe(wrapped.call({ name: 'b' }, 2, 3));
|
|
93
|
+
await clock.advance(10); yes(a, ['a', 1]); yes(b, ['b', 2, 3]);
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
'commander-output-isolation': [0, 1, 2, 3].map(which => async () => {
|
|
97
|
+
const parent = new Command(), writeOut = () => {}, writeErr = () => {};
|
|
98
|
+
parent.configureOutput({ getOutHelpWidth: () => 80, writeOut, writeErr });
|
|
99
|
+
const child = parent.createCommand('child').copyInheritedSettings(parent);
|
|
100
|
+
const sibling = parent.createCommand('sibling').copyInheritedSettings(parent);
|
|
101
|
+
child.configureOutput({ getOutHelpWidth: () => 40 });
|
|
102
|
+
if (which === 0) assert.equal(child.configureOutput().getOutHelpWidth(), 40);
|
|
103
|
+
if (which === 1) assert.equal(parent.configureOutput().getOutHelpWidth(), 80);
|
|
104
|
+
if (which === 2) assert.equal(sibling.configureOutput().getOutHelpWidth(), 80);
|
|
105
|
+
if (which === 3) { assert.equal(child.configureOutput().writeOut, writeOut); assert.equal(child.configureOutput().writeErr, writeErr); }
|
|
106
|
+
}),
|
|
107
|
+
'limit-map-iteration-rejection': [
|
|
108
|
+
async () => {
|
|
109
|
+
const limit = fn(1), error = new Error('iterator'); function* values() { yield 1; yield 2; throw error; }
|
|
110
|
+
await assert.rejects(limit.map(values(), value => value * 2), value => value === error); await limit(() => {});
|
|
111
|
+
},
|
|
112
|
+
async () => {
|
|
113
|
+
const limit = fn(1), error = new Error('iterator'); function* values() { yield 1; yield 2; yield 3; throw error; }
|
|
114
|
+
await assert.rejects(limit.map(values(), async value => { throw new Error('mapper-' + value); }), value => value === error);
|
|
115
|
+
await limit(() => {}); assert.equal(limit.activeCount, 0); assert.equal(limit.pendingCount, 0);
|
|
116
|
+
// The isolated probe checks unhandledRejection events after queued work settles.
|
|
117
|
+
},
|
|
118
|
+
async () => {
|
|
119
|
+
const limit = fn(1), error = new Error('iterator'), ready = gate(), finished = [];
|
|
120
|
+
function* values() { yield 1; yield 2; throw error; }
|
|
121
|
+
const state = observe(limit.map(values(), async value => { await ready.promise; finished.push(value); }));
|
|
122
|
+
await flush(); no(state, error); assert.deepEqual(finished, []);
|
|
123
|
+
ready.release(); await limit(() => {}); assert.deepEqual(finished, [1, 2]); assert.equal(limit.activeCount, 0); assert.equal(limit.pendingCount, 0);
|
|
124
|
+
},
|
|
125
|
+
async () => {
|
|
126
|
+
const limit = fn(2);
|
|
127
|
+
assert.deepEqual(await limit.map([2, 4], (value, index) => [index, value]), [[0, 2], [1, 4]]);
|
|
128
|
+
assert.deepEqual(await limit.map({ 0: 'a', 1: 'b', length: 2 }, (value, index) => `${index}:${value}`), ['0:a', '1:b']);
|
|
129
|
+
assert.deepEqual(await limit.map([], () => assert.fail()), []);
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
'timeout-rejection-listener': [
|
|
133
|
+
() => withClock(async () => {
|
|
134
|
+
const error = new Error('original'), state = observe(fn(Promise.reject(error), { milliseconds: 10 })); await flush(); no(state, error);
|
|
135
|
+
}),
|
|
136
|
+
() => withClock(async () => {
|
|
137
|
+
const controller = new AbortController(), error = new Error('source');
|
|
138
|
+
const state = observe(fn(Promise.reject(error), { milliseconds: 10, signal: controller.signal })); await flush(); no(state, error);
|
|
139
|
+
}),
|
|
140
|
+
() => withClock(async () => {
|
|
141
|
+
const controller = new AbortController(), ready = gate();
|
|
142
|
+
const state = observe(fn(ready.promise, { milliseconds: 10, signal: controller.signal }));
|
|
143
|
+
assert.equal(getEventListeners(controller.signal, 'abort').length, 1);
|
|
144
|
+
ready.release(4); await flush(); yes(state, 4); assert.equal(getEventListeners(controller.signal, 'abort').length, 0);
|
|
145
|
+
}),
|
|
146
|
+
() => withClock(async clock => {
|
|
147
|
+
const controller = new AbortController(), error = new Error('abort');
|
|
148
|
+
const a = observe(fn(new Promise(() => {}), { milliseconds: 10, signal: controller.signal })); controller.abort(error); await flush(); no(a, error);
|
|
149
|
+
const b = observe(fn(new Promise(() => {}), { milliseconds: 10 })); await clock.advance(10);
|
|
150
|
+
assert.equal(b.status, 'rejected'); assert.equal(b.reason.name, 'TimeoutError');
|
|
151
|
+
}),
|
|
152
|
+
],
|
|
153
|
+
'timeout-infinity-abort': [
|
|
154
|
+
() => withClock(async () => {
|
|
155
|
+
const controller = new AbortController(), error = new Error('already'); controller.abort(error);
|
|
156
|
+
const state = observe(fn(new Promise(() => {}), { milliseconds: Infinity, signal: controller.signal })); await flush(); no(state, error);
|
|
157
|
+
}),
|
|
158
|
+
() => withClock(async () => {
|
|
159
|
+
const controller = new AbortController(), error = new Error('later');
|
|
160
|
+
const state = observe(fn(new Promise(() => {}), { milliseconds: Infinity, signal: controller.signal })); controller.abort(error); await flush(); no(state, error);
|
|
161
|
+
}),
|
|
162
|
+
() => withClock(async () => {
|
|
163
|
+
const error = new Error('source'), a = observe(fn(Promise.resolve(5), { milliseconds: Infinity })), b = observe(fn(Promise.reject(error), { milliseconds: Infinity }));
|
|
164
|
+
await flush(); yes(a, 5); no(b, error);
|
|
165
|
+
}),
|
|
166
|
+
() => withClock(async clock => {
|
|
167
|
+
const state = observe(fn(Promise.resolve(7), { milliseconds: Infinity })); await flush(); yes(state, 7); assert.equal(clock.pending, 0);
|
|
168
|
+
}),
|
|
169
|
+
],
|
|
170
|
+
'commander-async-listener-order': [
|
|
171
|
+
async () => {
|
|
172
|
+
const events = [], parent = new Command();
|
|
173
|
+
parent.hook('preAction', async () => { events.push('pre-start'); await Promise.resolve(); events.push('pre-end'); });
|
|
174
|
+
parent.command('child').action(async () => { events.push('action-start'); await Promise.resolve(); events.push('action-end'); });
|
|
175
|
+
parent.on('command:child', () => events.push('legacy'));
|
|
176
|
+
await parent.parseAsync(['child'], { from: 'user' }); assert.deepEqual(events, ['pre-start', 'pre-end', 'action-start', 'action-end', 'legacy']);
|
|
177
|
+
},
|
|
178
|
+
async () => {
|
|
179
|
+
const events = [], parent = new Command();
|
|
180
|
+
parent.command('child').action(async () => { await Promise.resolve(); events.push('action'); }).hook('postAction', () => events.push('post'));
|
|
181
|
+
parent.on('command:child', () => events.push('legacy')); await parent.parseAsync(['child'], { from: 'user' }); assert.deepEqual(events, ['action', 'legacy', 'post']);
|
|
182
|
+
},
|
|
183
|
+
async () => {
|
|
184
|
+
const parent = new Command(), ready = gate(), events = [];
|
|
185
|
+
parent.command('child').action(async () => { await ready.promise; events.push('action'); }); parent.on('command:child', () => events.push('legacy'));
|
|
186
|
+
const parsed = observe(parent.parseAsync(['child'], { from: 'user' })); await flush(); assert.equal(parsed.status, 'pending'); assert.deepEqual(events, []);
|
|
187
|
+
ready.release(); await flush(); assert.deepEqual(events, ['action', 'legacy']); assert.equal(parsed.status, 'fulfilled');
|
|
188
|
+
},
|
|
189
|
+
async () => {
|
|
190
|
+
const events = [], parent = new Command(); parent.command('child').action(() => events.push('action')); parent.on('command:child', () => events.push('legacy'));
|
|
191
|
+
parent.parse(['child'], { from: 'user' }); assert.deepEqual(events, ['action', 'legacy']);
|
|
192
|
+
const top = new Command(); top.action(() => events.push('top')); top.parse([], { from: 'user' }); assert.deepEqual(events, ['action', 'legacy', 'top']);
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
};
|
|
196
|
+
assert.ok(run[task]?.[index], 'unknown probe'); await run[task][index]();
|
|
197
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("commander-async-listener-order",process.argv[2]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("commander-output-isolation",process.argv[2]);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { existsSync, lstatSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { caseNames } from './cases.mjs';
|
|
7
|
+
import { files, regressionEvidence, testRun } from './regression-evidence.mjs';
|
|
8
|
+
const bench = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
const specs = JSON.parse(readFileSync(join(bench, 'task-specs.json'), 'utf8'));
|
|
10
|
+
export async function grade(task, supplied) {
|
|
11
|
+
const run = resolve(supplied), canonical = join(bench, 'fixtures', task), spec = specs[task];
|
|
12
|
+
assert.ok(spec, 'unknown task');
|
|
13
|
+
const checks = [];
|
|
14
|
+
const check = (name, operation) => {
|
|
15
|
+
try { operation(); checks.push({ name, pass: true }); }
|
|
16
|
+
catch (error) { checks.push({ name, pass: false, detail: String(error.message).slice(0, 700) }); }
|
|
17
|
+
};
|
|
18
|
+
check('Protected supplied assets and ordinary smoke behavior', () => {
|
|
19
|
+
for (const path of files(canonical).filter(path => !spec.sourcePaths.includes(path))) {
|
|
20
|
+
assert.equal(existsSync(join(run, path)), true, path + ' missing');
|
|
21
|
+
for (const prefix of path.split('/').map((_, i, parts) => parts.slice(0, i + 1).join('/'))) assert.equal(lstatSync(join(run, prefix)).isSymbolicLink(), false);
|
|
22
|
+
assert.deepEqual(readFileSync(join(run, path)), readFileSync(join(canonical, path)), path + ' changed');
|
|
23
|
+
}
|
|
24
|
+
for (const path of spec.sourcePaths) if (existsSync(join(run, path))) assert.equal(lstatSync(join(run, path)).isSymbolicLink(), false);
|
|
25
|
+
if (spec.metadataEditable.length) {
|
|
26
|
+
const normalize = directory => { const value = JSON.parse(readFileSync(join(directory, 'package.json'), 'utf8')); for (const field of spec.metadataEditable) delete value[field]; return value; };
|
|
27
|
+
assert.deepEqual(normalize(run), normalize(canonical), 'Only the declared package metadata fields may change');
|
|
28
|
+
}
|
|
29
|
+
const smoke = testRun(run, ['test.mjs']);
|
|
30
|
+
assert.equal(smoke.completed && smoke.passed && smoke.tests && smoke.noSkips, true, 'protected smoke must complete with registered passing tests');
|
|
31
|
+
});
|
|
32
|
+
for (const [index, name] of caseNames(task).entries()) {
|
|
33
|
+
check(name, () => {
|
|
34
|
+
const env = { ...process.env }; delete env.NODE_TEST_CONTEXT;
|
|
35
|
+
const result = spawnSync(process.execPath, [join(bench, 'verifiers/probe.mjs'), task, run, String(index)], { encoding: 'utf8', timeout: 5000, env });
|
|
36
|
+
assert.ok(!result.error && result.signal === null && result.status === 0, result.stderr || 'probe did not complete');
|
|
37
|
+
const value = JSON.parse(result.stdout.trim()); assert.equal(value.name, name); assert.equal(value.pass, true, value.detail);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
let evidence = [];
|
|
41
|
+
check('Submitted regression passes the repair and complete functional upstream fix, and fails the original', () => {
|
|
42
|
+
evidence = regressionEvidence(run, canonical, join(bench, 'ground-truth', task), spec.sourcePaths);
|
|
43
|
+
assert.ok(evidence.length > 0 && evidence.every(row => row.finalPassed) && evidence.some(row => row.caseWitnesses.length > 0), 'A retained registered regression must distinguish original and full maintainer fix');
|
|
44
|
+
});
|
|
45
|
+
const passed = checks.every(row => row.pass);
|
|
46
|
+
console.log(JSON.stringify({ passed, score: checks.filter(row => row.pass).length / checks.length, checks, evidence }));
|
|
47
|
+
process.exitCode = passed ? 0 : 1;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("limit-async-context",process.argv[2]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("limit-map-iteration-rejection",process.argv[2]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { caseNames, runCase } from './cases.mjs';
|
|
5
|
+
const [task, directory, suppliedIndex] = process.argv.slice(2), index = Number(suppliedIndex);
|
|
6
|
+
assert.ok(Number.isInteger(index) && index >= 0 && index < 4);
|
|
7
|
+
const name = caseNames(task)[index], unhandled = [];
|
|
8
|
+
process.on('unhandledRejection', error => unhandled.push(String(error?.message ?? error)));
|
|
9
|
+
let passed = false, detail;
|
|
10
|
+
try {
|
|
11
|
+
const api = await import(pathToFileURL(resolve(directory, 'index.js')));
|
|
12
|
+
await runCase(api, task, index);
|
|
13
|
+
await new Promise(resolve => setImmediate(resolve)); await new Promise(resolve => setImmediate(resolve));
|
|
14
|
+
assert.deepEqual(unhandled, [], 'public calls must not produce unhandled rejections'); passed = true;
|
|
15
|
+
} catch (error) { detail = String(error.message).slice(0, 700); }
|
|
16
|
+
console.log(JSON.stringify({ name, pass: passed, ...(detail ? { detail } : {}) }));
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { cpSync, existsSync, lstatSync, mkdtempSync, readFileSync, readdirSync, rmSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { dirname, join, relative, resolve } from 'node:path';
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
|
|
8
|
+
const bench = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
export function files(root, rel = '') { return readdirSync(join(root, rel), { withFileTypes: true }).flatMap(entry => {
|
|
10
|
+
if (entry.name === '.git' || entry.name.startsWith('_')) return [];
|
|
11
|
+
const child = rel ? `${rel}/${entry.name}` : entry.name;
|
|
12
|
+
if (entry.isSymbolicLink()) return [];
|
|
13
|
+
return entry.isDirectory() ? files(root, child) : entry.isFile() ? [child] : [];
|
|
14
|
+
}); }
|
|
15
|
+
export function testRun(root, tests, pattern) {
|
|
16
|
+
const env = { ...process.env }; delete env.NODE_TEST_CONTEXT;
|
|
17
|
+
const reporter = pathToFileURL(join(bench, 'verifiers/test-reporter.mjs')).href;
|
|
18
|
+
const result = spawnSync(process.execPath, ['--test', `--test-reporter=${reporter}`,
|
|
19
|
+
...(pattern ? [`--test-name-pattern=${pattern}`] : []), ...tests], { cwd: root, encoding: 'utf8', timeout: 5000, env });
|
|
20
|
+
let evidence;
|
|
21
|
+
try { evidence = JSON.parse(result.stdout.trim()); } catch { evidence = null; }
|
|
22
|
+
if (evidence?.schemaVersion !== 1 || evidence?.kind !== 'node-test-evidence' || !evidence?.summary || !Array.isArray(evidence?.records)) evidence = null;
|
|
23
|
+
const counts = evidence?.summary?.counts;
|
|
24
|
+
const records = evidence?.records ?? [];
|
|
25
|
+
return { completed: !result.error && result.signal == null && typeof result.status === 'number',
|
|
26
|
+
passed: result.status === 0 && evidence?.summary?.success === true,
|
|
27
|
+
tests: counts?.tests > 0 && records.some(row => row.registered && row.leaf),
|
|
28
|
+
noSkips: counts?.skipped === 0 && counts?.todo === 0 && counts?.cancelled === 0,
|
|
29
|
+
records, counts };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function caseWitnesses(submitted, original, reference) {
|
|
33
|
+
if (!submitted.completed || !original.completed || !reference.completed) return [];
|
|
34
|
+
const groups = result => {
|
|
35
|
+
const map = new Map();
|
|
36
|
+
for (const row of result.records.filter(row => row.registered && row.leaf && !row.skip && !row.todo)) {
|
|
37
|
+
const key = JSON.stringify([row.file, row.path]);
|
|
38
|
+
map.set(key, [...(map.get(key) ?? []), row]);
|
|
39
|
+
}
|
|
40
|
+
return map;
|
|
41
|
+
};
|
|
42
|
+
const [final, before, upstream] = [submitted, original, reference].map(groups);
|
|
43
|
+
const witnesses = [];
|
|
44
|
+
for (const [key, rows] of final) {
|
|
45
|
+
const old = before.get(key); const ref = upstream.get(key);
|
|
46
|
+
if (rows.length === 1 && old?.length === 1 && ref?.length === 1 && rows[0].pass &&
|
|
47
|
+
!old[0].pass && old[0].failureType === 'testCodeFailure' && ref[0].pass) {
|
|
48
|
+
witnesses.push({ file: rows[0].file, path: rows[0].path });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return witnesses;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function restoreSources(snapshot, destination, sourcePaths) {
|
|
55
|
+
for (const path of sourcePaths) {
|
|
56
|
+
rmSync(join(destination, path), { force: true });
|
|
57
|
+
if (existsSync(join(snapshot, path))) cpSync(join(snapshot, path), join(destination, path));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function regressionEvidence(run, canonical, reference, source) {
|
|
62
|
+
const candidates = files(run).filter(p => /(?:^|\/)[^/]+\.(?:test|spec)\.mjs$/.test(p) && !existsSync(join(canonical, p)));
|
|
63
|
+
return candidates.map(p => {
|
|
64
|
+
const final = testRun(run, [p]); const restored = mkdtempSync(join(tmpdir(), 'skillfit-lru-regression-'));
|
|
65
|
+
try {
|
|
66
|
+
cpSync(run, restored, { recursive: true, filter: file => !relative(run, file).split(/[\\/]/).some(s => s === '.git' || s.startsWith('_')) && !lstatSync(file).isSymbolicLink() });
|
|
67
|
+
restoreSources(canonical, restored, source);
|
|
68
|
+
const original = testRun(restored, [p]);
|
|
69
|
+
restoreSources(reference, restored, source);
|
|
70
|
+
const upstream = testRun(restored, [p]);
|
|
71
|
+
const witnesses = caseWitnesses(final, original, upstream);
|
|
72
|
+
const targeted = [];
|
|
73
|
+
// An unrelated test can exhaust the whole original/reference suite's guard. Never use that
|
|
74
|
+
// timeout as evidence: replay a unique candidate alone on all three sides instead.
|
|
75
|
+
if (final.completed && final.passed && final.tests && final.noSkips &&
|
|
76
|
+
(!original.completed || !upstream.completed)) {
|
|
77
|
+
const candidates = final.records.filter(row => row.registered && row.leaf && row.pass && !row.skip && !row.todo);
|
|
78
|
+
// Two targeted candidates keep the whole verifier within its 60-second guard.
|
|
79
|
+
for (const row of candidates.slice(0, 2)) {
|
|
80
|
+
const flat = row.path.join(' ');
|
|
81
|
+
if (candidates.filter(other => other.path.join(' ') === flat).length !== 1) continue;
|
|
82
|
+
const escape = value => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
83
|
+
const prefixes = row.path.map((_, i) => escape(row.path.slice(0, i + 1).join(' ')));
|
|
84
|
+
const pattern = `^(?:${prefixes.join('|')})$`;
|
|
85
|
+
const submittedCase = testRun(run, [p], pattern);
|
|
86
|
+
restoreSources(canonical, restored, source);
|
|
87
|
+
const originalCase = testRun(restored, [p], pattern);
|
|
88
|
+
restoreSources(reference, restored, source);
|
|
89
|
+
const referenceCase = testRun(restored, [p], pattern);
|
|
90
|
+
const matched = caseWitnesses(submittedCase, originalCase, referenceCase).filter(w =>
|
|
91
|
+
w.file === row.file && JSON.stringify(w.path) === JSON.stringify(row.path));
|
|
92
|
+
targeted.push({ file: row.file, path: row.path, completed: [submittedCase.completed, originalCase.completed, referenceCase.completed],
|
|
93
|
+
witnesses: matched });
|
|
94
|
+
if (submittedCase.passed && matched.length > 0) { witnesses.push(...matched); break; }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return { path: p, finalPassed: final.completed && final.passed && final.tests && final.noSkips,
|
|
98
|
+
originalFailed: original.completed && !original.passed && original.tests && original.noSkips,
|
|
99
|
+
referencePassed: upstream.completed && upstream.passed && upstream.tests && upstream.noSkips,
|
|
100
|
+
caseWitnesses: witnesses, targeted,
|
|
101
|
+
counts: { submitted: final.counts, original: original.counts, reference: upstream.counts } };
|
|
102
|
+
} finally { rmSync(restored, { recursive: true, force: true }); }
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isAbsolute, relative, sep } from 'node:path';
|
|
2
|
+
|
|
3
|
+
// Node delivers start/pass/fail in declaration order. Child stdout is a separate event and ignored.
|
|
4
|
+
export default async function* report(source) {
|
|
5
|
+
const frames = []; const records = []; let summary = null;
|
|
6
|
+
for await (const event of source) {
|
|
7
|
+
const data = event.data;
|
|
8
|
+
if (event.type === 'test:start') {
|
|
9
|
+
if (!Number.isInteger(data.nesting) || data.nesting < 0) continue;
|
|
10
|
+
if (data.nesting > 0 && frames[data.nesting - 1]) frames[data.nesting - 1].hasChildren = true;
|
|
11
|
+
frames.length = data.nesting;
|
|
12
|
+
frames.push({ name: data.name, hasChildren: false });
|
|
13
|
+
} else if (event.type === 'test:pass' || event.type === 'test:fail') {
|
|
14
|
+
const frame = frames[data.nesting];
|
|
15
|
+
const file = typeof data.file === 'string' ? relative(process.cwd(), data.file).split(sep).join('/') : null;
|
|
16
|
+
// A process that exits without declaring tests gets a synthetic root named after its file.
|
|
17
|
+
const fileWrapper = data.nesting === 0 && (data.name === data.file || data.name === file);
|
|
18
|
+
const registered = !fileWrapper && file !== null && file !== '..' && !file.startsWith('../') && !isAbsolute(file) &&
|
|
19
|
+
Number.isInteger(data.line) && data.line > 0 && frame?.name === data.name &&
|
|
20
|
+
frames.slice(0, data.nesting).every(parent => typeof parent.name === 'string');
|
|
21
|
+
records.push({ file, path: [...frames.slice(0, data.nesting).map(parent => parent.name), data.name],
|
|
22
|
+
// Node 22 omits details.type for ordinary tests; explicit suites still carry 'suite'.
|
|
23
|
+
registered, leaf: data.details?.type !== 'suite' && !frame?.hasChildren,
|
|
24
|
+
pass: event.type === 'test:pass', skip: !!data.skip, todo: !!data.todo,
|
|
25
|
+
failureType: data.details?.error?.failureType ?? null });
|
|
26
|
+
} else if (event.type === 'test:summary' && data.file === undefined) summary = data;
|
|
27
|
+
}
|
|
28
|
+
yield JSON.stringify({ schemaVersion: 1, kind: 'node-test-evidence', summary, records }) + '\n';
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("throttle-sync-throw",process.argv[2]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("timeout-custom-timers",process.argv[2]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("timeout-infinity-abort",process.argv[2]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {grade} from './grade.mjs';await grade("timeout-rejection-listener",process.argv[2]);
|