{"record":{"id":"5b1f1d052254abf7","repo":"thedotmack/claude-mem","slug":"deny-allow","errorCode":"DENY_ALLOW","errorMessage":"DENY_ALLOW","messagePattern":"DENY_ALLOW","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/integrations/CcsAlignRulesWalker.ts","lineNumber":555,"sourceCode":"        const drift = detectDrift(trimmed, allHouseLines);\n        if (drift.isDrift) {\n          conflicts.push({\n            code: 'DRIFT',\n            layer: 'seat',\n            file: entry.file,\n            line: trimmed,\n            detail: drift.matchedHouseLine\n              ? `House text may have changed; leaf still has old wording. House: \"${drift.matchedHouseLine}\"`\n              : 'Possible drift from house text',\n          });\n        }\n      }\n\n      // DENY_ALLOW: check seat line against house+project lines\n      const denyAllow = detectDenyAllow(trimmed, houseProjectLines);\n      if (denyAllow.isDenyAllow) {\n        conflicts.push({\n          code: 'DENY_ALLOW',\n          layer: 'seat',\n          file: entry.file,\n          line: trimmed,\n          detail: denyAllow.detail,\n        });\n      }\n    }\n  }\n\n  // Project-layer deny/allow (against house)\n  for (const entry of project.entries) {\n    for (const line of entry.lines) {\n      const trimmed = line.trim();\n      if (trimmed.length === 0) continue;\n\n      const denyAllow = detectDenyAllow(trimmed, allHouseLines);\n      if (denyAllow.isDenyAllow) {\n        conflicts.push({","sourceCodeStart":537,"sourceCodeEnd":573,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/integrations/CcsAlignRulesWalker.ts#L537-L573","documentation":"walkRules flags DENY_ALLOW for seat-layer lines: detectDenyAllow(trimmed, houseProjectLines) finds a seat line that deny/allows something in a way that conflicts with house or project lines (e.g. seat denies what house allows). Reported with layer='seat' and a detector-provided detail.","triggerScenarios":"A seat rules file line contains a deny/allow statement whose subject is also governed by a house or project line with the opposite or overlapping directive, detected against the houseProjectLines set.","commonSituations":"Seat-level overrides like 'never use tool X' contradicting a house 'use tool X for Y'; permission-style allowlists narrowed at seat level; accumulated rules from different authors.","solutions":["Read denyAllow.detail in the conflict to see which house/project line conflicts","Remove or reword the seat line so it no longer contradicts house/project","If the restriction is intentional, adjust the house/project line instead and document the exception","Re-run walkRules to confirm the conflict is resolved"],"exampleFix":"// before (seat)\nDeny using the Bash tool.\n// after (seat)\n# removed: conflicts with house line allowing Bash for builds\n","handlingStrategy":"validation","validationCode":"// reject seat deny/allow lines that mention subjects governed by house/project\nif (/\\b(deny|allow)\\b/i.test(seatLine) && subjectInHouseProject(seatLine)) {\n  console.warn('DENY_ALLOW conflict candidate');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep deny/allow policy in one layer (house) only","Review seat overrides against house/project policy in PRs","Run the align walker before merging rule changes","Document any intentional exceptions explicitly"],"tags":["lint","permissions","rules","conflict"],"backgroundTag":"conflicting-config-options","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}