Skip to content

[stealth 08/11] Harden stealth logging and telemetry defaults#8785

Closed
reflog wants to merge 8 commits into
mainfrom
stealth/8770-logging-telemetry-clean
Closed

[stealth 08/11] Harden stealth logging and telemetry defaults#8785
reflog wants to merge 8 commits into
mainfrom
stealth/8770-logging-telemetry-clean

Conversation

@reflog

@reflog reflog commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds stealth build hooks for Go/Radiance log level and telemetry defaults
  • preserves normal trace logging default for non-stealth builds
  • replaces empty/trace stealth defaults with warn and keeps telemetry off unless explicitly enabled
  • applies effective values through core init, FFI setup, app-side logging, Android/mobile early logging, and mobile IPC startup

Closes getlantern/engineering#3577

Validation

  • env GOCACHE=/tmp/lantern-8770-go-cache GOMODCACHE=/tmp/lantern-8770-go-mod go test ./lantern-core
  • gofmt -w lantern-core/stealth.go lantern-core/stealth_test.go lantern-core/core.go lantern-core/logging.go lantern-core/ffi/ffi.go lantern-core/mobile/mobile.go
  • git diff --cached --check

Notes

  • This PR covers defaults and guard tests. It does not attempt broad log-message redaction across every Radiance/Lantern call site; that should be handled with targeted follow-up static checks once the leakage check PR lands.

Copilot AI review requested due to automatic review settings May 15, 2026 14:48
@reflog reflog self-assigned this May 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Go-side stealth build helpers to harden log-level and telemetry defaults across Lantern Core startup paths while preserving existing non-stealth defaults.

Changes:

  • Adds stealth-aware default resolution for log level and telemetry consent.
  • Applies effective log/telemetry values in core initialization, FFI setup, mobile early logging, and mobile IPC startup.
  • Adds guard tests for stealth/non-stealth log and telemetry defaults.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lantern-core/stealth.go Adds stealth build detection and effective default helpers.
lantern-core/stealth_test.go Adds tests for stealth log-level and telemetry default behavior.
lantern-core/core.go Applies effective log level and telemetry consent during core initialization.
lantern-core/logging.go Uses effective default log level for app-side logging.
lantern-core/ffi/ffi.go Uses effective default log level during FFI setup.
lantern-core/mobile/mobile.go Applies effective defaults for mobile logging and IPC backend startup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lantern-core/stealth.go
Comment thread lantern-core/stealth_test.go
Comment thread lantern-core/stealth_test.go Outdated
Comment thread lantern-core/stealth_test.go
Comment thread lantern-core/stealth_test.go
Comment thread lantern-core/stealth.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread lantern-core/stealth.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread Makefile Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread Makefile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread Makefile Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

@reflog reflog changed the title Harden stealth logging and telemetry defaults [stealth 08/11] Harden stealth logging and telemetry defaults May 16, 2026
@reflog reflog requested a review from Copilot May 16, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

reflog and others added 8 commits June 11, 2026 12:53
EffectiveTelemetryConsent now hard-disables telemetry for stealth builds
regardless of any prior user opt-in. Telemetry is a deanonymization surface
and must not be emitted from stealth artifacts.

Also fix gofmt alignment in core.go const block (EventTypeCountryCode tab
alignment was off after rebase).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@reflog reflog force-pushed the stealth/8770-logging-telemetry-clean branch from c17e8a3 to 541e2a8 Compare June 11, 2026 11:01
@reflog

reflog commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Superseded — the 11 per-issue stealth PRs were consolidated into a 6-PR stack for epic getlantern/engineering#3569. This work now lives in #8861.

@reflog reflog closed this Jun 15, 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.

3 participants