Skip to content

[bug] Exclusion effect has identical semantics to Deny #7

@nkanf-dev

Description

@nkanf-dev

Problem

Five effects defined in contracts.go:25-31:

EffectAllow, EffectAllowWithAudit, EffectApprovalRequired, EffectDeny, EffectExclusion

Exclusion is treated identically to Deny everywhere:

  • bundle.go:602 — same abort_task obligation generation
  • engine.go:2179 — same DenyCount++ in session facts
  • bundle.go:636 — same effectRank score
  • bundle.go:710 — same group in compatibleObligations

As a distinct effect type, Exclusion carries no additional semantics. It does not block subsequent rule matching, does not trigger different audit behavior, does not have a different reason code pattern.

Expected

Exclusion should have distinct semantics from Deny — e.g., permanent block (blacklist) vs temporary rejection, different audit severity, or exclusion from deny_count tracking. If no meaningful distinction exists, consolidate into a single Deny effect.

Key code

  • contracts.go:30 — EffectExclusion constant
  • bundle.go:602 — ensureEffectObligations groups Exclusion with Deny
  • engine.go:2179 — updateSessionFacts groups Exclusion with Deny
  • bundle.go:636 — effectRank treats them equally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions