{"record":{"id":"61d233c11650de71","repo":"ruvnet/ruflo","slug":"pod-template-at-path-piipolicy-must-be-one-of","errorCode":null,"errorMessage":"pod-template at ${path}: piiPolicy must be one of: ${PII_POLICIES.join(', ')}","messagePattern":"pod-template at (.+?): piiPolicy must be one of: (.+?)","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":222,"sourceCode":"  if (agents.length === 0) {\n    throw new PodTemplateValidationError('agents must have ≥1 entry', '/');\n  }\n  const allowedMcpTools = requireArray(json, 'allowedMcpTools', '/', (t, tp) => {\n    if (typeof t !== 'string' || t.length === 0) {\n      throw new PodTemplateValidationError(\n        'allowedMcpTools entries must be non-empty strings',\n        tp,\n      );\n    }\n    return t;\n  });\n  if (allowedMcpTools.length === 0) {\n    throw new PodTemplateValidationError('allowedMcpTools must have ≥1 entry', '/');\n  }\n  const bench = validatePodBench(json.bench, '/bench');\n  const piiPolicy = requireString(json, 'piiPolicy', '/');\n  if (!PII_POLICIES.includes(piiPolicy as PiiPolicy)) {\n    throw new PodTemplateValidationError(\n      `piiPolicy must be one of: ${PII_POLICIES.join(', ')}`,\n      '/',\n    );\n  }\n  const budgetUsdMonthly = requireNumber(json, 'budgetUsdMonthly', '/');\n  if (budgetUsdMonthly < 0) {\n    throw new PodTemplateValidationError('budgetUsdMonthly must be ≥0', '/');\n  }\n  const budgetUsdPerRun = requireNumber(json, 'budgetUsdPerRun', '/');\n  if (budgetUsdPerRun < 0) {\n    throw new PodTemplateValidationError('budgetUsdPerRun must be ≥0', '/');\n  }\n  if (budgetUsdMonthly > 0 && budgetUsdPerRun > budgetUsdMonthly) {\n    throw new PodTemplateValidationError(\n      'budgetUsdPerRun must not exceed budgetUsdMonthly',\n      '/',\n    );\n  }","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L204-L240","documentation":"Thrown by validatePodTemplate() when the 'piiPolicy' field is not one of the four allowed values: 'soc2', 'gdpr', 'hipaa', 'permissive'. This policy is applied to every envelope entering or leaving the pod's BBS room, so only enumerated compliance modes are accepted.","triggerScenarios":"The piiPolicy field is a string but does not exactly match one of the four allowed values. Examples: 'SOC2' (wrong case), 'gdpr-strict', 'pci', 'none', or a typo like 'hippa'.","commonSituations":"Case mismatch ('SOC2' instead of 'soc2'); a custom policy name was invented instead of using the enumerated set; a typo in 'hipaa' (commonly misspelled 'hippa').","solutions":["Set piiPolicy to exactly one of: 'soc2', 'gdpr', 'hipaa', 'permissive' (all lowercase)","Use 'permissive' for non-regulated internal pods","Double-check spelling: 'hipaa' not 'hippa'"],"exampleFix":"// before\n{ \"piiPolicy\": \"SOC2\" }\n\n// after\n{ \"piiPolicy\": \"soc2\" }","handlingStrategy":"validation","validationCode":"const VALID_PII_POLICIES = ['soc2', 'gdpr', 'hipaa', 'permissive'] as const;\ntype PiiPolicy = typeof VALID_PII_POLICIES[number];\n\nfunction isPiiPolicy(s: string): s is PiiPolicy {\n  return (VALID_PII_POLICIES as readonly string[]).includes(s);\n}\n\nif (!isPiiPolicy(template.piiPolicy)) {\n  throw new Error(`piiPolicy must be one of: ${VALID_PII_POLICIES.join(', ')}`);\n}","typeGuard":"const PII_POLICIES = ['soc2', 'gdpr', 'hipaa', 'permissive'] as const;\nfunction isPiiPolicy(s: unknown): s is typeof PII_POLICIES[number] {\n  return typeof s === 'string' && (PII_POLICIES as readonly string[]).includes(s);\n}","tryCatchPattern":"try {\n  validatePodTemplate(json);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError && e.message.includes('piiPolicy')) {\n    // Set piiPolicy to one of: soc2, gdpr, hipaa, permissive\n  }\n}","preventionTips":["Use lowercase exactly: 'soc2', 'gdpr', 'hipaa', 'permissive'","Double-check 'hipaa' spelling (commonly misspelled 'hippa')","Use 'permissive' for internal non-regulated pods"],"tags":["pod-template","validation","schema","compliance","pii"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}