{"record":{"id":"4a4af3a91f18fdab","repo":"stablyai/orca","slug":"test-e2e-terminal-perf-scale-report-always-uses","errorCode":null,"errorMessage":"test:e2e:terminal-perf:scale:report always uses --reporter=json","messagePattern":"test:e2e:terminal-perf:scale:report always uses --reporter=json","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/run-terminal-scale-perf-report-gate.mjs","lineNumber":37,"sourceCode":"    if (arg === '--report' || arg === '--report-path' || arg === '--output') {\n      const next = forwardedArgs[index + 1]\n      if (!next || next.startsWith('-')) {\n        throw new Error(`${arg} requires a path`)\n      }\n      reportPath = next\n      index += 1\n      continue\n    }\n    if (\n      arg.startsWith('--report=') ||\n      arg.startsWith('--report-path=') ||\n      arg.startsWith('--output=')\n    ) {\n      reportPath = arg.slice(arg.indexOf('=') + 1)\n      continue\n    }\n    if (arg === '--reporter' || arg.startsWith('--reporter=')) {\n      throw new Error('test:e2e:terminal-perf:scale:report always uses --reporter=json')\n    }\n    passthroughArgs.push(arg)\n  }\n\n  return { passthroughArgs, reportPath }\n}\n\nfunction runNodeScript(scriptPath, args, stdio, spawnSyncImpl, env) {\n  return spawnSyncImpl(process.execPath, [scriptPath, ...args], {\n    cwd: process.cwd(),\n    env,\n    stdio\n  })\n}\n\nfunction exitCode(result) {\n  if (result.signal) {\n    console.error(`Terminal scale perf command exited with signal ${result.signal}`)","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/run-terminal-scale-perf-report-gate.mjs#L19-L55","documentation":"The scale perf report gate always runs the underlying test with --reporter=json because it post-processes the JSON report to apply gating thresholds. Letting the caller override --reporter (e.g. to dot or html) would break the downstream parsing, so the parser rejects any --reporter or --reporter=... arg up front.","triggerScenarios":"Passing `--reporter=dot`, `--reporter html`, or `--reporter` to the gate script. The parser detects the arg literally and aborts before forwarding it.","commonSituations":"A developer wants prettier CI output and adds --reporter=dot; a wrapper script blindly forwards all Playwright args; copy-paste from another Playwright invocation.","solutions":["Remove the --reporter arg — the gate must use JSON internally. To change human-readable output, configure it in playwright.config.ts reporters (the JSON reporter is layered by the gate, not the only one).","If you genuinely need a different reporter, invoke the underlying test:e2e:terminal-perf:scale task directly (not the :report gate) and run the gate logic separately."],"exampleFix":"// before\npnpm run test:e2e:terminal-perf:scale:report -- --reporter=dot\n// after\npnpm run test:e2e:terminal-perf:scale:report","handlingStrategy":"validation","validationCode":"if (args.some((a) => a === '--reporter' || a.startsWith('--reporter='))) {\n  console.error('This gate always uses --reporter=json; remove --reporter'); process.exit(2)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not forward --reporter to the gate; the JSON reporter is required for threshold parsing.","Configure human-readable reporters in playwright.config.ts instead.","Document the gate's fixed reporter in the package.json script comment."],"tags":["cli","argv","playwright","perf-report","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}