{"record":{"id":"20755737d9366fbd","repo":"stablyai/orca","slug":"usage-node-config-scripts-verify-windows-inner-si","errorCode":null,"errorMessage":"Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>","messagePattern":"Usage: node config/scripts/verify-windows-inner-signature\\.mjs <Orca\\.exe>","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-windows-inner-signature.mjs","lineNumber":120,"sourceCode":"  }\n\n  return { ok: true, signature }\n}\n\nexport function formatSignatureSummary(signature) {\n  return [\n    `Status: ${signature.status ?? '<missing>'}`,\n    `Subject: ${normalizeSignerSubject(signature.signerSubject) || '<missing>'}`,\n    `Issuer: ${signature.signerIssuer ?? '<missing>'}`,\n    `Thumbprint: ${normalizeThumbprint(signature.signerThumbprint) || '<missing>'}`,\n    `NotBefore: ${signature.notBefore ?? '<missing>'}`,\n    `NotAfter: ${signature.notAfter ?? '<missing>'}`\n  ].join('\\n')\n}\n\nexport function validateExecutablePath(executablePath) {\n  if (typeof executablePath !== 'string' || executablePath.trim() === '') {\n    throw new Error('Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>')\n  }\n\n  if (!existsSync(executablePath)) {\n    throw new Error(`Windows inner executable does not exist: ${executablePath}`)\n  }\n\n  if (!statSync(executablePath).isFile()) {\n    throw new Error(`Windows inner executable path is not a file: ${executablePath}`)\n  }\n}\n\nexport function getPowerShellSignatureJson(executablePath, spawnSyncImpl = spawnSync) {\n  // Why: pwsh -Command does not reliably expose trailing process args to string commands.\n  const result = spawnSyncImpl(\n    'pwsh',\n    [\n      '-NoLogo',\n      '-NoProfile',","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-windows-inner-signature.mjs#L102-L138","documentation":"Thrown by validateExecutablePath() when the executable path argument is missing, not a string, or whitespace-only. This is a usage error for the CLI invocation of verify-windows-inner-signature.mjs — the script requires exactly one argument: the path to Orca.exe.","triggerScenarios":"verifyWindowsInnerSignature({ executablePath }) or main(argv) is called with executablePath being undefined, null, '', or only whitespace. In CLI mode (main), this means process.argv.slice(2)[0] is missing — the user ran the script without an argument.","commonSituations":"Running `node config/scripts/verify-windows-inner-signature.mjs` without the <Orca.exe> argument; a CI script or Makefile invoking the verifier with an unset variable (e.g. $ORCA_EXE when the env var is empty); a wrapper script passing undefined due to a typo.","solutions":["Provide the Orca.exe path as the first argument: node config/scripts/verify-windows-inner-signature.mjs /path/to/Orca.exe.","If invoked programmatically, ensure executablePath is a non-empty string before calling verifyWindowsInnerSignature.","In CI, check that the variable holding the exe path is set and non-empty before the invocation."],"exampleFix":"// before: CI invokes without argument\nnode config/scripts/verify-windows-inner-signature.mjs\n\n// after: pass the resolved exe path\nnode config/scripts/verify-windows-inner-signature.mjs \"$ORCA_BUILD_DIR/Orca.exe\"","handlingStrategy":"validation","validationCode":"function validateArgs(argv) {\n  if (!Array.isArray(argv) || argv.length === 0 ||\n      typeof argv[0] !== 'string' || argv[0].trim() === '') {\n    throw new Error('Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>')\n  }\n  return argv[0]\n}","typeGuard":"function isNonEmptyStringPath(value) {\n  return typeof value === 'string' && value.trim().length > 0\n}","tryCatchPattern":null,"preventionTips":["In CI, assert the exe path variable is non-empty before invoking the script.","Use absolute paths to avoid cwd-relative resolution issues.","Add a usage comment at the top of any wrapper script that invokes this verifier."],"tags":["windows","cli-usage","argument-validation","signature"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}