{"record":{"id":"48cc5ec8912516dc","repo":"NousResearch/hermes-agent","slug":"profile-switch-needs-profile-name","errorCode":null,"errorMessage":"profile-switch needs --profile <name>","messagePattern":"profile-switch needs --profile <name>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/scripts/perf/scenarios/profile-switch.mjs","lineNumber":18,"sourceCode":"// Profile-switch latency. Subsumes measure-profile-switch. Backend tier: needs\n// a configured profile in the rail and a live backend. Report-only.\n//\n//   node scripts/perf/run.mjs profile-switch --profile <name>\n\nimport { SELECTORS, sleep } from '../lib/cdp.mjs'\n\nexport default {\n  name: 'profile-switch',\n  tier: 'backend',\n  description: 'Click a profile in the rail and wait for its sidebar to settle.',\n  requiredOpts: ['profile'],\n  async run(cdp, opts = {}) {\n    const profile = opts.profile\n    const settleTimeoutMs = Number(opts.settleTimeoutMs ?? 60000)\n\n    if (!profile) {\n      throw new Error('profile-switch needs --profile <name>')\n    }\n\n    await cdp.send('Runtime.enable')\n\n    const t0 = await cdp.eval(`(() => {\n      const rail = document.querySelector(${JSON.stringify(SELECTORS.profileRail)})\n      if (!rail) return null\n      const target = [...rail.querySelectorAll('button, [role=\"tab\"]')].find(b =>\n        ((b.getAttribute('aria-label') || '') + ' ' + (b.title || '') + ' ' + (b.textContent || ''))\n          .toLowerCase().includes(${JSON.stringify(String(profile).toLowerCase())}))\n      if (!target) return null\n      target.click()\n      return performance.now()\n    })()`)\n\n    if (t0 === null) {\n      throw new Error(`profile \"${profile}\" not found in the rail`)\n    }","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/scripts/perf/scenarios/profile-switch.mjs#L1-L36","documentation":"Error \"profile-switch needs --profile <name>\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/scripts/perf/scenarios/profile-switch.mjs:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --profile <name> with a valid profile name when running the scenario."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}