Skip to content

Clear the Minor findings from the hardening review - #4

Open
foodlbs wants to merge 1 commit into
mainfrom
cleanup-minor-findings-2026-07-21
Open

Clear the Minor findings from the hardening review#4
foodlbs wants to merge 1 commit into
mainfrom
cleanup-minor-findings-2026-07-21

Conversation

@foodlbs

@foodlbs foodlbs commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Clears the 11 Minor findings logged during the hardening review (PR #3). No behavior changes; three test gaps closed. Follow-up to #3.

Code

  • SkipperAppurl is a non-null constant, so the if (url != null) guard was dead; removed and the block dedented. The six catchNonCancelling sites that swallowed silently (onFailure = {}) now log at Log.d, so a failed cached-config read/parse or version read is diagnosable instead of vanishing.
  • RemoteConfigParser — dropped the redundant .take(256) on customButtonList's viewIds/labels. Verified first: stringList already caps every entry at MAX_MATCHER_STRING (added in Hardening & refactor: 1-month roadmap from ownership audit #3), so the second cap was a no-op. The cap itself is unchanged.
  • proguard-rules.pro — corrected two misleading comments and removed the inert -keep class java.security.** rule. Those are Android platform classes, never part of the app's dex, so R8 could never strip them; the rule implied a protection that didn't exist. The DataStore comment claimed R8 "can inline and rename" key strings — R8 never rewrites string literals; the keep actually guards against class shrinkage, which the comment now says.
  • SkipperKitSettingsScreen — alphabetized the semantics imports.
  • TeachScanner — KDoc explaining that packageName is intentionally unread (the throttle is global, matching the single timestamp it replaced).
  • DiscoveryCoordinator — removed the injectable classifier param and its imports. Nothing injected it; DiscoveryEngine.discover already defaults it (YAGNI).
  • SECURITY.md — note that the key-relocation mv must run from the repo root (it uses a relative source path).

Tests (3 gaps closed)

  • TeachScannerTest — a clickable node with no id/text/desc (and a blank-after-trim one) must be filtered out. Previously only the isClickable half of the predicate was exercised, so a regression stripping the isNullOrBlank checks would have gone unnoticed.
  • SkipEngineTestNeedsGesture.displayLabel on the CUSTOM path. The existing custom-button test always hit the Clicked path, leaving the gesture-fallback label untested.
  • DiscoveryRepositoryTestaddApproved on a pending key (promotes and clears from pending) and on a dismissed key (promotes). This edge changed behavior in Hardening & refactor: 1-month roadmap from ownership audit #3's lifecycle unification and was flagged as untested.

Test plan

  • ./gradlew testDebugUnitTest lintDebug assembleDebug assembleRelease — BUILD SUCCESSFUL
  • assembleRelease included deliberately, since ProGuard rules changed

Not included

The Critical host-hygiene items (C-1 signing key, C-2 release keystore) are maintainer actions on local key material, not code — runbooks are in SECURITY.md. Still outstanding, along with the R8 runtime smoke test and TalkBack check.

Cleanup pass over the 11 Minor items logged during the hardening review.
No behavior changes; three test gaps closed.

- SkipperApp: url is non-nullable, so drop the dead if-guard; the six
  silent catchNonCancelling sites now log at Log.d so a swallowed
  cache/parse failure is diagnosable.
- RemoteConfigParser: drop the redundant .take(256) in customButtonList
  (stringList already caps each entry at MAX_MATCHER_STRING).
- proguard-rules: correct two misleading comments and drop the inert
  java.security keep — those are platform classes R8 never sees.
- SkipperKitSettingsScreen: alphabetize the semantics imports.
- SECURITY.md: note that the relocation mv runs from the repo root.
- TeachScanner: document why packageName is unused (global throttle).
- DiscoveryCoordinator: drop the unused injectable classifier param.
- Tests: cover the clickable-but-blank teach filter branch, the CUSTOM
  gesture-path displayLabel, and addApproved's pending/dismissed
  cross-state promotion.
Copilot AI review requested due to automatic review settings July 21, 2026 07:23

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 reached their quota limit.

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