{"record":{"id":"94e5e46680dbe60e","repo":"Yeachan-Heo/oh-my-codex","slug":"invalid-membership-transaction-file-entry-for-te","errorCode":null,"errorMessage":"Invalid membership transaction file entry for ${teamName}","messagePattern":"Invalid membership transaction file entry for (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/state.ts","lineNumber":928,"sourceCode":"  const expectedManifestPath = resolve(teamManifestV2Path(teamName, cwd));\n  const expectedTasksDir = resolve(teamDir(teamName, cwd), 'tasks');\n  const seenPaths = new Set<string>();\n  let configCount = 0;\n  const canonicalStateRoot = await realpath(resolveTeamStateRoot(cwd));\n  const canonicalTeamRoot = await realpath(teamDir(teamName, cwd));\n  if (canonicalTeamRoot !== canonicalStateRoot && !canonicalTeamRoot.startsWith(`${canonicalStateRoot}${sep}`)) {\n    throw new Error(`Membership transaction team root escapes canonical state root for ${teamName}`);\n  }\n  const canonicalTasksDir = await realpath(resolve(teamDir(teamName, cwd), 'tasks'));\n  if (!canonicalTasksDir.startsWith(`${canonicalTeamRoot}${sep}`)) {\n    throw new Error(`Membership transaction tasks root escapes canonical team root for ${teamName}`);\n  }\n\n  for (const file of files) {\n    if (!file || typeof file.path !== 'string'\n      || (file.oldBytes !== null && typeof file.oldBytes !== 'string')\n      || (file.newBytes !== null && typeof file.newBytes !== 'string')) {\n      throw new Error(`Invalid membership transaction file entry for ${teamName}`);\n    }\n    const resolvedPath = resolve(file.path);\n    if (resolvedPath !== file.path || seenPaths.has(resolvedPath)) {\n      throw new Error(`Invalid membership transaction path for ${teamName}`);\n    }\n    seenPaths.add(resolvedPath);\n    let expectedParent: string;\n    if (resolvedPath === expectedConfigPath) {\n      configCount += 1;\n      expectedParent = canonicalTeamRoot;\n    } else if (resolvedPath === expectedManifestPath) {\n      expectedParent = canonicalTeamRoot;\n    } else {\n      if (dirname(resolvedPath) !== expectedTasksDir) {\n        throw new Error(`Membership transaction path escapes expected team files for ${teamName}`);\n      }\n      const match = basename(resolvedPath).match(/^task-([A-Za-z0-9_-]+)\\.json$/);\n      if (!match || resolve(taskFilePath(teamName, match[1]!, cwd)) !== resolvedPath) {","sourceCodeStart":910,"sourceCodeEnd":946,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/state.ts#L910-L946","documentation":"Error \"Invalid membership transaction file entry for ${teamName}\" thrown in Yeachan-Heo/oh-my-codex.","triggerScenarios":"Thrown at src/team/state.ts:928 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}