Skip to content

Add a sample flag-stripping runbook - #319

Merged
kirich1409 merged 4 commits into
developfrom
fea-19-flag-stripping-runbook
Nov 7, 2026
Merged

kirich1409 merged 4 commits into
developfrom
fea-19-flag-stripping-runbook

Conversation

@kirich1409

@kirich1409 kirich1409 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #213

Summary

A reader can follow docs/flag-stripping-runbook.md and see a disabled local new_checkout flag stripped from the Android, Desktop, and iOS sample apps. This is a sample verification path, not a library behavior change.

  • iOS keeps NewCheckoutBanner. Release is built with DISABLE_NEW_CHECKOUT from :sample:feature-checkout:generateXcconfig. The Release Featured executable lacks New checkout is enabled; the Debug executable still contains it. Debug no longer splits that code into a debug dylib, so the Mach-O named Featured is the file the runbook inspects.
  • Android adds NewCheckoutDisabledBranch, reached only through the generated accessor, and checks :sample:android-app:assembleRelease mapping. :sample:android-app:r8UnfoldedMarker keeps that class when the featured rules are not applied. KMP consumer rules are published from :sample:feature-checkout so the generated -assumevalues and -checkdiscard files reach the app R8.
  • Desktop feeds proguard-featured.pro into the existing Compose release ProGuard task and checks :sample:desktop:packageReleaseUberJarForCurrentOS. :sample:desktop:proguardUnfoldedMarker keeps the class when that rules file is not applied.
  • The interactive observe() UI is unchanged. Library tests are not this check.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Chore / refactor

The sample wiring is what makes the documentation checkable. Published library API does not change.

Checklist

  • Tests added or updated
  • Docs updated (KDoc, README, CHANGELOG)
  • ./gradlew spotlessCheck passes
  • CHANGELOG.md updated

The checks are the reader commands in the runbook, not a new library test and not a device run. No screenshots.

Notes for reviewers

  • Search the Android mapping for dev.androidbroadcast.featured.sample.checkout.NewCheckoutDisabledBranch. A search for the simple name also matches the bridge method reachNewCheckoutDisabledBranch in the line mapping after the class is gone.
  • :sample:android-app:r8UnfoldedMarker passes proguard-android-optimize.txt and turns optimization off. Class-file R8 otherwise replaces onCreate with throw null, so the entry-point keep would not retain the call. assumevalues still removes the class when those rules are applied without optimization; the control does not apply them.
  • Verified locally: Release strings lacks New checkout is enabled, Debug strings contains it, mapping.txt lacks the class FQN, the Android unfolded jar contains the class, the Desktop -release.jar lacks it, and the Desktop unfolded jar contains it.

@kirich1409 kirich1409 changed the title docs: spec the sample flag-stripping runbook Add a sample flag-stripping runbook Nov 7, 2026
@kirich1409
kirich1409 marked this pull request as ready for review November 7, 2026 09:29
Copilot AI balanced review requested due to automatic review settings November 7, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Record the sample checks that prove a disabled local flag was stripped
from Android, Desktop, and iOS without changing library runtime.
The release absence stays on the same tasks. The control is that same
disabled class present when the accessor is not folded, called from the
feature-checkout bridge rather than from the shells.
The checkout sample reaches one class only through the generated
new_checkout accessor. Android and Desktop release builds drop that
class; named control tasks keep it when the accessor is not folded.
iOS Release, built with DISABLE_NEW_CHECKOUT from the checkout
xcconfig, drops the existing banner string that Debug still contains.

The reader commands are in docs/flag-stripping-runbook.md.
mapping.txt still records the inlined reachNewCheckoutDisabledBranch
method. The runbook and AC-4 now require the class FQN, which the
release mapping already omits.
@kirich1409
kirich1409 force-pushed the fea-19-flag-stripping-runbook branch from 27c66e7 to 31665d5 Compare November 7, 2026 09:33
Copilot AI balanced review requested due to automatic review settings November 7, 2026 09:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@kirich1409
kirich1409 merged commit a4efcc3 into develop Nov 7, 2026
9 checks passed
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