Skip to content

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

Open
reflog wants to merge 7 commits into
mainfrom
stealth/8770-logging-telemetry-clean
Open

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

Conversation

@reflog
Copy link
Copy Markdown
Contributor

@reflog reflog commented May 15, 2026

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
@reflog reflog requested a review from Copilot May 16, 2026 11:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

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