ObliviOS Developer portal Project site

Home / Decisions / ADR-094

Close ADR-092 re-open conditions 1 and 2: obtain real atest evidence for RealUserQuiescerTest/UserRepositoryImplTest, and Component B's freeze-failure path coverage.

Conditions, recorded 20 September 2026.

Decision
ADR-094
Date
2026-09-20
Status
ConditionsConditions 1 and 2 closed with real evidence. Conditions 3 (avatar-color pixel verification) and 4 (the two UX gaps) remain open, per owner direction to verify current status before scoping any fix.
Mentions
ADR-092
Mentioned by
ADR-096, ADR-098

1Decision

Close ADR-092 re-open conditions 1 and 2: obtain real atest evidence for RealUserQuiescerTest/UserRepositoryImplTest, and Component B's freeze-failure path coverage.

2Why and evidence

A build-server emulator (nested KVM, sdk_phone64_x86_64-cp2a-userdebug) was brought up with adb attached — the exact prerequisite ADR-092 named as missing — and both named test classes were run via real atest for the first time in this plan's history, surfacing three real, previously-invisible bugs no build or bytecode check had ever caught, each because the corresponding atest target had never actually compiled before: (1) RealUserQuiescerTest.java: setFinalField() (throws Exception) called directly inside a plain Runnable lambda — compile error, fixed by a try/catch (frameworks-base 0091, real SHA 95131c37a0a3); (2) same file: mock(ProcessRecord.class) called outside runWithDexmakerShareClassLoader, and ProcessRecord being package-private (unlike the public classes already mocked inside that wrapper) made dexmaker's generated proxy subclass rejected as inaccessible at runtime — fixed by moving mock construction inside the wrapper (0092, real SHA d0cdc34c8227); (3) UserRepositoryImplTest.kt: still passed a plain FakeKeyguardRepository where Task 6's own Dagger-cycle fix (f3f3c9ebc980) had changed the constructor to require Lazy<KeyguardRepository> — fixed with the same dagger.Lazy { } idiom already used elsewhere in this package (0093, real SHA 93aa9b2ae960).

All three authored under AGENTS.md's local-first worktree discipline, never edited live on the build server.

Final real result: atest FrameworksServicesTests:RealUserQuiescerTest — all 3 tests PASSED, closing condition 1 for that class and condition 2 (the mock-based quiesce_singleProcessThrowsOnFreeze_returnsFalse test is confirmed real dynamic coverage of the freeze-failure catch block — CachedAppOptimizer.freezeAppAsyncInternalLSP still has no organic synchronous-exception path reachable from real hardware, so this mock-based unit test remains the only, and now confirmed-working, coverage of that branch, a ceiling ADR-092 already accepted).

atest SystemUiRoboTests:...UserRepositoryImplTest — the one test this whole plan cares about, userSwitcherSettings_reEvaluatesOnKeyguardTransition_withoutSettingsChange, PASSED, closing condition 1 for that class; 12 of 15 other test methods also passed, 16 parameterized variants were ASSUMPTION_FAILED (an unrelated flag-parameterization skip).

A real environment blocker was hit and resolved along the way: the emulator's user 0 had never been unlocked since boot (CE storage//sdcard never mounted, matching the lynx-duress-decoy-storage-unmount-incident.md pattern), which hung Tradefed's device target-prep; resolved by a full -wipe-data relaunch rather than continued live troubleshooting of a session likely already disturbed by manual adb/kill -9 intervention.

3Consequences

4 unrelated, pre-existing test failures newly discovered, not yet root-caused, carried forward as a new open item — not one of ADR-092's original four: UserRepositoryImplTest#refreshUsers, #refreshUsers_sortsByCreationTime_guestUserLast, #userSwitcherSettings, and #isLogoutWithUserManagerEnabled_userManagerLogoutDisabled_alwaysFalse all fail with an expected 3-or-4-user list coming back empty from the fake manager/tracker refreshUsers() depends on.

Untouched by patch 0093 (which only touches the keyguardRepository parameter) and, like the three bugs above, simply never exposed before now.

Not investigated further this session, per explicit owner direction to keep pace after several already-long tool-driven debugging cycles this session; real hardware evidence from ADR-092's own Task 8 sweep already confirms the actual production behavior these tests cover works correctly, so this reads as a Robolectric/test-double wiring gap rather than a production defect — not yet confirmed by reading the real cause.

frameworks-base real tip: 93aa9b2ae960 (93 patches total).

4Review when

Re-open for: (1) root-causing and fixing the 4 newly-found UserRepositoryImplTest failures, if ever prioritized; (2) condition 3 (avatar-color pixel verification) — a working method was found this same session (adb exec-out screencap -p + a pure-Python PNG decoder, since screencap on this build/emulator is not solid-black except on genuine FLAG_SECURE surfaces, explaining the prior "root cause not identified" finding) but not yet exercised end-to-end against a real two-user avatar-color comparison; (3) condition 4 (the two UX gaps) — status still needs verification against the current candidate before any fix is scoped, per explicit owner direction not to start a new design cycle prematurely.

Read from docs/governance/decision-log.md, entry ADR-094.