Restore trailer return to the signed-in title #81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fm/tv-bug-trailer-return"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Restore trailer return to the same title and person
Fix the reproduced low-memory process-death return without enabling general automatic sign-in or bypassing protected profiles. With automatic sign-in off, only the first valid trailer handoff return may continue; ordinary background returns show the profile picker.
Cause: (a), reproduced; complementary (c) live-return bug
The independent m3 walker reproduced the chooser only after killing Wolfskin while an opaque external trailer stand-in owned the foreground. Ordinary Back and activity-only destruction returned to the same title/person. Debug rc2 and Opt13 showed that distinction. This lane did not drive the emulator or TV; an actual TV PID death was not observed because ADB is off.
Saved navigation already survives, but repository identity and shell state do not. Auto-off startup cannot recover the signed-in person; auto-on can recover the saved person but a new
ShellStatestill initializes its launch chooser. Task clearing and a synthetic root Back are not the reproduced cause. YouTube package selection and NEW_TASK remain unchanged; no manifest or Back-owner change.Narrow continuation, not a cold-login shortcut
MainActivityViewModelis separated from the activity to keep each production file under 500 lines. Constructor callsite migrations are mechanical. Lane C overlap:WolfskinApp.ktconstructor/load and fresh-session initialization only; its picker/person-switch/Back handlers are unchanged.TitleDestinationcaptures the actual external handoff.docker/README.mddocuments the window and failure gates.Trailer-only correction
The live-return exception now requires a pending record for the same unprotected person/server and exact title, strictly under ten minutes and on the same boot. Ordinary warm returns with Sign in automatically off show the profile picker; the record is cleared on return, so the next ordinary background return shows the picker again. Automatic sign-in on and the saved-task process-death authentication gates are unchanged. Immutable record snapshots bridge
onRestart/onResumecleanup without extending the deadline or lending authorization to a later return.Pushed correction:
98db417ca29ddb1b8684007abc11d98007958670onfm/tv-bug-trailer-return. The candidate counterpart is ready for review at #83 (basefm/tv-round2-candidate3, head4a6d318f8f4d8d93c82d509ae7c54e83cff4f480). The candidate itself at #82 has not been updated; that correction remains a separate reviewable pull request. Cherry-pick resolution omitted only the constructor migration forNavigationCutTest, which does not exist on this original branch.Verification of this correction through the locked
docker/gradle.shwrapper: baseline 10 cases / 2 expected ordinary-return failures; candidate 85 cases across nine classes / all pass; original trailer branch 77 cases across eight classes / all pass. Both passing runs have zero errors/skips and exclude the inherited design suite with-x :wolfskin-design:testDebugUnitTest. Coverage includes second ordinary return, expiry, boot/identity/title mismatch, pending-handoff protection changes, explicit picker, cold launch, auto-on and asynchronous cleanup/expiry. Native returned-title and saved-task frames were inspected: Locke and Justin’s J avatar, no chooser. No full suite, APK build, ADB, emulator/TV action, release or installation. The instrumentation caller was migrated but not executed.Correction proof:
/root/.treehouse/firstmate-7bab20/2/firstmate/data/tv-trailer-narrow/(red-native.log, bothgreen*.log, scoped XML/JSON results andnative-frames/). The original implementation evidence below is historical, not a claim that its broader warm-return policy remains.Original implementation regression and runtime proof
Both final runs also have zero errors and skips. The final batch covers 27 touched/affected classes; the focused recheck repeats its four setup-navigation cases after making their asynchronous wait bounded and constructing the Activity-dependent factory on the native main thread. No production-code changes followed that original passing batch before the trailer-only correction described above.
The four process-death failures before the fix were lost identity with auto-off, a fresh chooser obscuring the title with auto-on, an unrelated most-recent person replacing the interrupted actor, and an existing picker being treated as eligible. These define the new task-bound continuation contract, not a change to ordinary cold auto-login policy. PIN/requireLogin, fresh launches, missing token/person, wrong route and hours-later controls passed before and remain gated after.
Native runtime smoke exercised real Room-backed repository acceptance, the actual startup view model, a new production shell and the real title surface. The observed 1920×1080 returned frame shows Locke, Justin's J avatar and no chooser. Matching auto-on and worker-prepopulated frames are preserved. This is native Compose/Robolectric proof, not a patched-device claim.
All test commands used
docker/gradle.shand its shared lock. Final invocations explicitly use-x :wolfskin-design:testDebugUnitTestand scoped--testsselectors. No APK assembly or TV mutation. An intermediate native run exposed a main-threadrunBlockingharness deadlock; own-container JVM stacks identified it, only that container was stopped, UI commits now use Main.immediate, and the full corrected batch passed.An initial earlier invocation inadvertently traversed the inherited design-test dependency: 44 classes / 253 cases emitted zero-failure XML before the time-limited command ended. This is disclosed, not claimed as a completed full-suite gate. Subsequent invocations explicitly excluded it. The complete observed inventory is included below so no auth/identity execution is omitted.
Proof directory:
/root/.treehouse/firstmate-7bab20/2/firstmate/data/tv-bug-trailer-return/(process-red/,final-green/,final-harness-green.xml, summaries, native frames and deadlock stack).Original auth/identity test inventory
The following exhaustive native inventory includes every earlier native case as well as the final scoped run. The original coverage was added in
MainActivityTrailerRestoreTest(21 cases),TrailerReturnStateTest(12),MainActivityResumeTest(4) andSignedInContentTest(5). Existing real PIN/requireLogin unlock, expired-login recovery, person-switch, saved-session and cold-picker controls are included by exact name.All 140 scoped native case names
com.github.damontecres.wholphin.MainActivityResumeTestcom.github.damontecres.wholphin.MainActivityTrailerRestoreTestcom.github.damontecres.wholphin.SignedInContentTestcom.github.damontecres.wholphin.TestMainActivityViewModelcom.github.damontecres.wholphin.services.ServerSavedSessionTestorg.justinvisser.wolfskin.tv.AnimeAvailabilityTestorg.justinvisser.wolfskin.tv.AnimeRootRemovalTestorg.justinvisser.wolfskin.tv.ConductarrAudienceRecoveryTestorg.justinvisser.wolfskin.tv.ConductarrTitleSurfaceTestorg.justinvisser.wolfskin.tv.DiscoverRefreshMotionTestorg.justinvisser.wolfskin.tv.DiscoverTitleTimingTestorg.justinvisser.wolfskin.tv.FirstSignInNavigationTestorg.justinvisser.wolfskin.tv.PersonPickerSessionTestorg.justinvisser.wolfskin.tv.PersonSwitchThreadingTestorg.justinvisser.wolfskin.tv.SavedPeoplePickerTestorg.justinvisser.wolfskin.tv.ShellStartupTimingTestorg.justinvisser.wolfskin.tv.TitleAsyncFocusTestorg.justinvisser.wolfskin.tv.TitleEntryBackTestorg.justinvisser.wolfskin.tv.TitlePlaybackNavigationTestorg.justinvisser.wolfskin.tv.TitleRequestSafetyTestorg.justinvisser.wolfskin.tv.TitleThemeMusicTestorg.justinvisser.wolfskin.tv.TitleTrailerTestorg.justinvisser.wolfskin.tv.TrailerReturnStateTestorg.justinvisser.wolfskin.tv.WolfskinRootExitTestorg.justinvisser.wolfskin.tv.WolfskinSetupNavigationTestorg.justinvisser.wolfskin.tv.WolfskinSetupRollbackTestorg.justinvisser.wolfskin.tv.WolfskinSetupTestAll 253 observed inherited design-case names (not a completed full-suite gate)
org.justinvisser.wolfskin.design.CardBottomPixelTestorg.justinvisser.wolfskin.design.CardCaptionMotionTestorg.justinvisser.wolfskin.design.CardGeometryTestorg.justinvisser.wolfskin.design.ComingInRatingsGateTestorg.justinvisser.wolfskin.design.DiscoverCaptureTestorg.justinvisser.wolfskin.design.DiscoverDetailsFocusTestorg.justinvisser.wolfskin.design.DiscoverHeroSequenceTestorg.justinvisser.wolfskin.design.DiscoverKeysTestorg.justinvisser.wolfskin.design.DiscoverLaneProjectionTestorg.justinvisser.wolfskin.design.DiscoverNetworkHeroTestorg.justinvisser.wolfskin.design.DuplicateLazyKeysTestorg.justinvisser.wolfskin.design.FocusRingTestorg.justinvisser.wolfskin.design.HeroMotionTestorg.justinvisser.wolfskin.design.HomeArtTestorg.justinvisser.wolfskin.design.HomeCaptureTestorg.justinvisser.wolfskin.design.HomeGradientTestorg.justinvisser.wolfskin.design.HomeHeroActionsTestorg.justinvisser.wolfskin.design.HomeHeroSequenceTestorg.justinvisser.wolfskin.design.HomeKeysTestorg.justinvisser.wolfskin.design.HomeNavigationTestorg.justinvisser.wolfskin.design.HomeRatingCacheTestorg.justinvisser.wolfskin.design.HomeRatingsUiTestorg.justinvisser.wolfskin.design.HomeRowEntryTestorg.justinvisser.wolfskin.design.HomeRowsTestorg.justinvisser.wolfskin.design.HomeViewportTestorg.justinvisser.wolfskin.design.LibraryCaptureTestorg.justinvisser.wolfskin.design.LibraryKeysTestorg.justinvisser.wolfskin.design.LibraryPaginationTestorg.justinvisser.wolfskin.design.LibrarySpacingRegressionTestorg.justinvisser.wolfskin.design.MotionSurfaceTestorg.justinvisser.wolfskin.design.NavSpringTestorg.justinvisser.wolfskin.design.NetworkArtTransitionTestorg.justinvisser.wolfskin.design.PickerNavigationTestorg.justinvisser.wolfskin.design.RecoveryCaptureTestorg.justinvisser.wolfskin.design.RecoveryStateTestorg.justinvisser.wolfskin.design.RequestsCaptureTestorg.justinvisser.wolfskin.design.RequestsKeysTestorg.justinvisser.wolfskin.design.ScreenEntryNavigationTestorg.justinvisser.wolfskin.design.ShellCaptureTestorg.justinvisser.wolfskin.design.ShellKeysTestorg.justinvisser.wolfskin.design.ShellSnapshotReadTestorg.justinvisser.wolfskin.design.SnapshotReadAuditTestorg.justinvisser.wolfskin.design.TitleReadinessMotionTestorg.justinvisser.wolfskin.design.WolfskinImagesTestAI-assisted implementation. Tier C identity/navigation change: requires the planned Opus safety/auth review before merge. This worker does not merge.
Landed through the round 2 candidate #82 (merged into fm/tv-round2 as
c21d17df). Closing as superseded; nothing from this branch is lost.Pull request closed