Skip to content

ref(android): Mark AppStartMetrics.setAppStartType as @TestOnly - #6121

Merged
runningcode merged 1 commit into
mainfrom
no/app-start-type-setter-test-only
Sep 16, 2026
Merged

runningcode merged 1 commit into
mainfrom
no/app-start-type-setter-test-only

Conversation

@runningcode

@runningcode runningcode commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Annotates AppStartMetrics.setAppStartType with @TestOnly.

💡 Motivation and Context

Nothing in the SDK calls this setter — the cold/warm classification assigns the field directly. Its only callers are tests, so it now matches the neighboring test seams setFirstIdle, getFirstIdle and clear.

It has to stay public: most of those call sites are in io.sentry.android.core, a different package from AppStartMetrics.

💚 How did you test it?

Annotation only — no behavior change.

📝 Checklist

  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

#skip-changelog

🤖 Generated with Claude Code

@sentry

sentry Bot commented Sep 16, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.56.0 (1) release

⚙️ sentry-android Build Distribution Settings

No production code calls this setter; the cold/warm classification assigns
the field directly. Its only callers are tests, so annotate it the way the
neighboring test seams (setFirstIdle, getFirstIdle, clear) already are.

It has to stay public: most of those call sites live in
io.sentry.android.core, a different package from AppStartMetrics.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/app-start-type-setter-test-only branch from e1852cc to 10a659a Compare September 16, 2026 09:05
@runningcode
runningcode marked this pull request as ready for review September 16, 2026 09:17
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Sep 16, 2026

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(For my own reference, AppStartMetrics is already @ApiStatus.Internal)

🚀

@runningcode
runningcode merged commit 5efb2d7 into main Sep 16, 2026
36 checks passed
@runningcode
runningcode deleted the no/app-start-type-setter-test-only branch September 16, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants