{"record":{"id":"38ce934d6d77edd5","repo":"paperclipai/paperclip","slug":"task-watchdog-product-bug-follow-up-target-is-outs","errorCode":null,"errorMessage":"Task-watchdog product bug follow-up target is outside the watchdog company","messagePattern":"Task-watchdog product bug follow-up target is outside the watchdog company","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":4966,"sourceCode":"      })\n      .from(issueRows)\n      .where(and(\n        eq(issueRows.companyId, parent.companyId),\n        eq(issueRows.parentId, parent.id),\n        inArray(issueRows.status, [\"todo\", \"in_progress\", \"in_review\", \"blocked\"]),\n        isNull(issueRows.hiddenAt),\n      ))\n      .orderBy(asc(issueRows.issueNumber), asc(issueRows.createdAt), asc(issueRows.id));\n    return children[0] ?? null;\n  }\n\n  async function blockWatchdogParentOnCurrentChild(input: {\n    actor: ReturnType<typeof getActorInfo>;\n    watchdogParentIssueId: string | null | undefined;\n    currentChildIssueId: string | null | undefined;\n  }) {\n    if (!input.watchdogParentIssueId || !input.currentChildIssueId) return;\n    const watchdogParent = await svc.getById(input.watchdogParentIssueId);\n    if (!watchdogParent || watchdogParent.originKind !== TASK_WATCHDOG_ORIGIN_KIND) return;\n    if (watchdogParent.status !== \"in_progress\" && watchdogParent.status !== \"blocked\") return;\n\n    const relations = await svc.getRelationSummaries(watchdogParent.id);\n    const nextBlockedByIssueIds = mergeIssueBlockerIds(\n      relations.blockedBy?.map((relation) => relation.id) ?? [],\n      input.currentChildIssueId,\n    );\n    await svc.update(watchdogParent.id, {\n      status: \"blocked\",\n      blockedByIssueIds: nextBlockedByIssueIds,\n      actorAgentId: input.actor.agentId,\n      actorUserId: input.actor.actorType === \"user\" ? input.actor.actorId : null,\n    });\n    await logActivity(db, {\n      companyId: watchdogParent.companyId,\n      actorType: input.actor.actorType,\n      actorId: input.actor.actorId,","sourceCodeStart":4948,"sourceCodeEnd":4984,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L4948-L4984","documentation":"403 from the watchdog product-bug follow-up guard: the authenticated run is watchdog-scoped, but the target company differs from the watchdog's own company, so the follow-up crosses a company boundary.","triggerScenarios":"Thrown at server/src/routes/issues.ts:4802 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the request so it satisfies the condition stated in the error message, then retry; see the throwing line in the named file for the exact check."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}