{"record":{"id":"45c0963bc4a0641e","repo":"affaan-m/ECC","slug":"claim-requires-owner-name","errorCode":null,"errorMessage":"claim requires --owner <name>.","messagePattern":"claim requires --owner <name>\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/work-items.js","lineNumber":396,"sourceCode":"function printGithubSyncResult(payload) {\n  console.log(`GitHub sync: ${payload.repo}`);\n  console.log(`  Open PRs: ${payload.prCount}`);\n  console.log(`  Open issues: ${payload.issueCount}`);\n  console.log(`  Closed stale items: ${payload.closedCount}`);\n  if (payload.items.length === 0 && payload.closedItems.length === 0) {\n    console.log('  Work items changed: none');\n    return;\n  }\n  for (const item of [...payload.items, ...payload.closedItems]) {\n    console.log(`  - ${item.id} ${item.status}: ${item.title}`);\n  }\n}\n\n// Thin CLI adapter over the shared claimWorkItem helper, preserving the\n// flag-specific error messages (--owner / --as) for the command line.\nfunction claimWorkItemCli(store, options) {\n  if (!options.owner) {\n    throw new Error('claim requires --owner <name>.');\n  }\n  const assigneeKind = options.claimAs ? String(options.claimAs).toLowerCase() : null;\n  if (assigneeKind && assigneeKind !== 'agent' && assigneeKind !== 'human') {\n    throw new Error(\"--as must be 'agent' or 'human'.\");\n  }\n  return claimWorkItem(store, {\n    id: resolveWorkItemId(options),\n    owner: options.owner,\n    assigneeKind,\n    sessionId: options.sessionId,\n    status: options.status\n  });\n}\n\nasync function main() {\n  let store = null;\n\n  try {","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/work-items.js#L378-L414","documentation":"CLI adapter guard in claimWorkItemCli: --owner is absent, so the claim operation cannot attribute the work item to an agent or human; the thin wrapper exists specifically to keep this flag-specific message for the command line.","triggerScenarios":"Thrown at scripts/work-items.js:396 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add --owner <name> to the claim command, e.g. item claim <id> --owner alice","Check the command help for the full claim syntax"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}