Implement review.md recommendations: security fixes, correctness hardening, and CI repair#5
Closed
Copilot wants to merge 2 commits into
Closed
Implement review.md recommendations: security fixes, correctness hardening, and CI repair#5Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/jsilvanus/embedeer/sessions/b23c1491-edb2-432c-8041-efe967788ca3 Co-authored-by: jsilvanus <22452468+jsilvanus@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement review recommendations and fix CI testing errors
Implement review.md recommendations: security fixes, correctness hardening, and CI repair
Apr 11, 2026
Owner
|
Was implemented in #6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements all recommendations from
review.mdand fixes the one pre-existing test failure. Changes are grouped by severity.Security
src/embedder.js):generateAndSaveProfilewas building a shell string with interpolateddeviceandsampleSizevalues. ReplacedexecSync(cmd)withexecFileSync(process.execPath, [script, '--device', device, ...]).Correctness
src/model-management.js): BothdeleteModelandisModelDownloadedusedString.includes()in their fallback scan, meaningdeleteModel('bert')would matchroberta. Replaced with amatchesModelName()helper that requires exact equality or a-//separator prefix.src/worker-pool.js): When the last worker crashed, pendingrun()promises would never settle._removeWorkernow rejects all queued tasks immediately when the pool empties.src/embedder.js): Provider default ternary's else arm evaluated tooptions.providerwhich the??had already consumed — simplified toundefined.splicemutation (src/embedder.js):applyPerfProfilemutated aconstarray viasplice; changed tolet+ reassignment.Test fix
provider-loader-cuda.test.jswas assertingloaded === truebut always gotfalse. Root cause: the runner script patchedfs.existsSyncviaimport fs from 'fs', butprovider-loader.jsheld a named ESM binding (import { existsSync } from 'fs') which is a frozen snapshot, not a live reference tomodule.exports. Fixed by:provider-loader.jstoimport fs from 'fs'+fs.existsSync(...)(readsmodule.exportsat call time).createRequirein the runner script to patch the CJSmodule.exportsdirectly, which is the same objectfs.existsSyncreads through.Provider loader
ldconfig -pwas called once per missing library (up to 6 times); output is now cached in a module-level variable.activateCudaandactivateDmlwere declaredasyncbut contain noawait; removed the unnecessary keyword.CI
pnpmbut the repo commitspackage-lock.json(npm). Switched tonpm cito match the lockfile.[18.x]to[18.x, 20.x, 22.x].${{ matrix.node-version }}to avoid upload conflicts across matrix legs.Package / DX
"exports"field topackage.jsonfor proper ESM subpath resolution.bench/from"files"— the benchmarking scripts were being shipped to npm consumers.semi,eqeqeq,no-var,prefer-consttoeslint.config.cjs.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
huggingface.co/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/embedeer/embedeer/bench/grid-search.js --device cpu --sample-size 1 --out /tmp/embedeer-grid-CdZEof/grid-out.json(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/embedeer/embedeer/bench/grid-search.js --device cpu --sample-size 1 --out /tmp/embedeer-grid-gxqcZZ/grid-out.json(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/embedeer/embedeer/bench/grid-search.js --device cpu --sample-size 1 --out /tmp/embedeer-grid-u8kF2J/grid-out.json(dns block)If you need me to access, download, or install something from one of these locations, you can either: