Skip to content

fix(core): pin necessary consent to always-granted in state#10

Merged
tyssejc merged 2 commits intomainfrom
fix/necessary-consent-always-granted
Mar 24, 2026
Merged

fix(core): pin necessary consent to always-granted in state#10
tyssejc merged 2 commits intomainfrom
fix/necessary-consent-always-granted

Conversation

@tyssejc
Copy link
Copy Markdown
Owner

@tyssejc tyssejc commented Mar 24, 2026

Summary

  • Seed necessary: true on consent manager init, enforce it in setState (external callers cannot set it to false), and preserve it on reset
  • getState() is now authoritative — consumers like the debug panel see "Necessary" as granted without special-casing
  • Distinguishes between necessary (CMP/storage layer, always granted in state) and exempt (data layer bypass for destinations)

Test plan

  • All 38 consent tests pass (5 updated for necessary: true in assertions)
  • All 45 collector tests pass (5 updated for necessary: true in assertions)
  • Manual: verify debug panel shows "Necessary" as checked/granted on load

🤖 Generated with Claude Code

tyssejc and others added 2 commits March 24, 2026 06:21
Seed `necessary: true` on init, enforce it in setState (ignoring
external overrides), and preserve it on reset. This makes getState()
authoritative — consumers like the debug panel no longer need to
special-case "necessary" as implicitly granted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junctionjs Ready Ready Preview, Comment Mar 24, 2026 10:22am

@tyssejc tyssejc merged commit deb159c into main Mar 24, 2026
6 checks passed
@tyssejc tyssejc deleted the fix/necessary-consent-always-granted branch March 24, 2026 10:23
@github-actions github-actions Bot mentioned this pull request Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant