{"record":{"id":"8f92c9e45e71055e","repo":"paperclipai/paperclip","slug":"skill-test-run-tokens-cannot-create-issues","errorCode":null,"errorMessage":"Skill-test run tokens cannot create issues.","messagePattern":"Skill-test run tokens cannot create issues\\.","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":8754,"sourceCode":"        workProductId: workProduct.id,\n        artifactReviewDocument: true,\n      },\n    });\n    for (const remap of result.remappedAnnotations) {\n      await logActivity(db, {\n        companyId: issue.companyId,\n        actorType: actor.actorType,\n        actorId: actor.actorId,\n        agentId: actor.agentId,\n        runId: actor.runId,\n        agentApiKeyId: actor.agentApiKeyId,\n        action: \"issue.document_annotation_remapped\",\n        entityType: \"issue\",\n        entityId: issue.id,\n        details: {\n          key: doc.key,\n          documentId: doc.id,\n          threadId: remap.thread.id,\n          revisionNumber: doc.latestRevisionNumber,\n          anchorState: remap.thread.anchorState,\n          anchorConfidence: remap.thread.anchorConfidence,\n          snapshotId: remap.snapshot.id,\n        },\n      });\n    }\n    await revalidateActiveSourceRecoveryAfterCommittedWrite({\n      issue,\n      trigger: \"document\",\n      actor,\n      documentChanged: true,\n    });\n    return result;\n  }\n\n  async function materializeArtifactReviewDocumentBestEffort(input: {\n    issue: NonNullable<Awaited<ReturnType<typeof svc.getById>>>;","sourceCodeStart":8736,"sourceCodeEnd":8772,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L8736-L8772","documentation":"403 guard on POST /companies/:companyId/issues. Fires when the actor is a skill-test-scoped agent (a test-harness run identity); such tokens are barred from creating real issues to keep test runs from polluting the board.","triggerScenarios":"Thrown at server/src/routes/issues.ts:8133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an authorization rule, not a bug: perform the action with an actor that satisfies the stated constraint (board user, the owning agent, or an in-scope resource).","If access should be allowed, verify the actor's credentials/company scope and the resource's ownership before retrying."],"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"}