Skip to content

fix: vendor trace-client 0.8.0 so every opt-out fails closed - #274

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed
Nov 19, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Why

A server operator reported usage reporting turning itself back on after it had been disabled. Every way an operator's opt-out could be read as, or turned back into, "on" without their consent is closed here: a switch that does not clearly mean "on" now means off.

Changes

  • trace-client-java 0.8.0 vendored (TraceClient + TraceClientTest, fail-closed client from Make every opt-out fail closed (0.8.0) Stephenson-Software/trace-client-java#51): TRACE_USAGE_REPORTING set to anything but blank or a clear on value, DO_NOT_TRACK set to anything but blank or a clear no, or an environment that cannot be read now turns reporting off.
  • usage-reporting.enabled fails closed. It was bound as a Spring boolean, so a blank USAGE_REPORTING_ENABLED=, a quoted "false" or a typo stopped the service starting. It is now read as text and judged by TraceClient.allowsReporting(...): only true/on/yes/1 keeps reporting on; anything else turns it off.
  • compose.yml fail-open closed. ${USAGE_REPORTING_ENABLED:-true} replaced a blank USAGE_REPORTING_ENABLED= in .env with true; it is now ${USAGE_REPORTING_ENABLED-true} (default only when unset), so a blank value reaches the service and turns reporting off.
  • README and sample.env describe the fail-closed rule.

Tests

  • New: the usage-reporting.enabled value table, blank/quoted/unclear settings disabling the reporter, and TRACE_USAGE_REPORTING=disabled / DO_NOT_TRACK=please turning reporting off. Existing reporter tests now pass the setting as text.
  • mvn test (JDK 21): 747 tests, 0 failures, 0 skipped.

🤖 Generated with Claude Code

drafted by Claude on behalf of Daniel Stephenson

- Re-vendor trace-client-java 0.8.0 (TraceClient + TraceClientTest):
  TRACE_USAGE_REPORTING set to anything but blank or a clear on value,
  DO_NOT_TRACK set to anything but blank or a clear no, or an unreadable
  environment now turns reporting off.
- UsageReporter reads usage-reporting.enabled as text and judges it with
  TraceClient.allowsReporting: only true/on/yes/1 keeps reporting on, so a
  blank USAGE_REPORTING_ENABLED=, a quoted "false" or a typo is an opt-out
  instead of a failed start.
- compose.yml: ${USAGE_REPORTING_ENABLED-true} instead of :-true, so a
  blank value in .env is no longer replaced with true.
- Tests for the setting table, blank/unclear settings, and unclear
  TRACE_USAGE_REPORTING / DO_NOT_TRACK values; README + sample.env.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson
dmccoystephenson merged commit 0bb50c3 into main Nov 19, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the fix/opt-out-fails-closed branch November 19, 2026 05:54
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