Skip to content

consent: read the optableDisableConsent QA bypass; export a debugLog helper - #322

Merged
mosherBT merged 2 commits into
masterfrom
consent-qa-bypass-debug-logger
Aug 24, 2026
Merged

consent: read the optableDisableConsent QA bypass; export a debugLog helper#322
mosherBT merged 2 commits into
masterfrom
consent-qa-bypass-debug-logger

Conversation

@mosherBT

@mosherBT mosherBT commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Why

optableDisableConsent is declared in FLAG_KEYS but nothing in the SDK reads it, so integrations using the cmpapi path have no way to force permissions on for QA on a page with a CMP. Debug logging similarly has no exported helper — RTD keeps an equivalent one private.

What Changed

  • consent: getConsent() returns full permissions and skips the CMP while optableDisableConsent is set.
  • core: new lib/core/log.ts exporting debugLog (gated on optableDebug) and consoleLog (ungated, for callers with their own gating).
  • rtd: private log helper replaced by consoleLog; output and the enableLogging option unchanged.

How to Test

On a GDPR page with a CMP, load with ?optableDisableConsent — an SDK built with { consent: { cmpapi: {} } } reports all permissions granted. Without the flag, behaviour is unchanged. ?optableDebug makes debugLog emit.

  • Tested
  • Docs updated

Notes

  • Breaking change
  • Requires release

@mosherBT mosherBT self-assigned this Aug 20, 2026
…helper

The optableDisableConsent flag has been declared in FLAG_KEYS since the
start but nothing in the SDK read it, so integrations using the cmpapi
path had no way to force permissions on for testing. getConsent() now
returns full permissions and skips the CMP while the flag is set.

The RTD module's private log helper moves to lib/core/log.ts and is
exported alongside debugLog, an optableDebug-gated logger for wrapper
code. RTD output and its enableLogging option are unchanged.

PRODUCT-3971
@mosherBT
mosherBT force-pushed the consent-qa-bypass-debug-logger branch from 7ac3a50 to 524c094 Compare August 20, 2026 19:19
@mosherBT
mosherBT marked this pull request as ready for review August 20, 2026 19:24
@mosherBT
mosherBT requested review from a team as code owners August 20, 2026 19:24
@mosherBT
mosherBT requested a review from jplaroche August 20, 2026 19:24
@mosherBT
mosherBT requested review from etiennelatendresse-optable and removed request for jplaroche August 20, 2026 19:34
@etiennelatendresse-optable

Copy link
Copy Markdown
Contributor

LGTM

@mosherBT
mosherBT merged commit 3b031c2 into master Aug 24, 2026
7 checks passed
@mosherBT
mosherBT deleted the consent-qa-bypass-debug-logger branch August 24, 2026 13:02
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.

2 participants