Repository navigation
coldstart: the app writes down where it was, and a cold boot goes back there - #56
Merged
Merged
Conversation
…k there The app-switch lifecycle was already handled properly, and all of it lives in the PROCESS: background suspends the buffer-feed and drops to Home, foreground reloads and resumes at the saved position with one Load. A COLD start — the set powered off and on, the mains pulled, the app closed from the Recent List — begins with a process that has seen none of that, and the boot route came purely from credential state. Where you actually were was written down nowhere. That is the persistence half of LG App Self Checklist #3 (Reboot). `rust-modules/src/coldstart.rs` records a Place — Home, a library TAB PILL, or an item addressed as (machineIdentifier, ratingKey) — and app.rs reads it back at boot. A playback session records the played leaf and is restored to that item's DETAIL page, never to the player: coming out of a power cycle into a decoding video is an ambush, and the resume point is the server's `viewOffset` anyway. Three decisions worth carrying: * **Not the runtime root**, though that is the obvious home for a file this small. `/tmp` on a television is cleared by a reboot — this repo already leans on that in the other direction, since `tools/tv-lock.sh` puts the device lease there BECAUSE a reboot should release it — so a cold-start restore living there would be erased by the cold start. It goes where the session file goes (`paths::last_place_candidates`). Two smaller wins fall out: the name is outside the `plxnative-*` trigger namespace, so it cannot suppress the who's-watching picker the way a state file in `/tmp` would have, and it is outside the glob `tests/run.py` sweeps. * **Not in `Session`.** That file fails as a unit and a parse failure there is a silent sign-out at every boot; every list in it is soft-parsed for exactly that reason. A convenience feature has no business in that blast radius, so this owns its own file, its own format, and fails soft to today's behaviour on every path — absent, empty, truncated, hand-edited, unknown version, foreign profile, a server no longer registered. * **Two rules that stop the feature erasing its own state.** Nothing is recorded until the boot SEQUENCE has ended, because the sign-in, the picker and the first-run question all hand over to Home when answered — a recorder open through that window writes `home` over the record before anyone can ask for it, permanently, for exactly the multi-profile household the profile key exists for. And Home is recorded as a RETURN, never as a landing, so a boot whose restore was declined (the item's server not re-registered yet) does not destroy the record on its way past. Nothing is recorded on an AUTOMATED boot, which is where the harness's determinism is bought: this file is outside the glob `tests/run.py` clears, so refusing to arm is the only place that can be done. `pkg/appinfo.json` is UNCHANGED. `handlesRelaunch` and `nativeLifeCycleInterfaceVersion` are documented in the module and left alone — neither is evidence about a native app's cold-boot behaviour on this firmware, and the verdict for #3 belongs to the device matrix in the PR body. Also fixes three `requiredMemory: 60` comments in img.rs; the manifest says 160. Verified: 986/986 host tests (10 new), `--no-default-features` clean, and a real two-boot round trip in the simulator — navigate to a detail page, close, relaunch, and the app comes up on that page; BACK then records Home; an automated boot neither records nor restores; a truncated record boots to Home. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G
`doc-claim-auditor` on the coldstart diff. Two were caused by it and four were
already false in prose the diff touches — all six are the same failure mode, a
sentence that was true when written and that nothing compiles.
CAUSED BY THIS CHANGE:
* The release-notes **"written outside its own directory"** row (TEMPLATE.md and
README.md) listed the three logs and the session file. `coldstart` is NOT
behind `devtriggers` — `any_trigger_present()` is a compile-time `false` in a
release build, so `arm()` always runs — and it writes a second file into
`/media/{developer,internal}`. That row's whole value is being exhaustive; it
is a gate item, and README's own standard is that "a property stated in a form
that fails the reader's own check reads as a lie". Now names the file and what
is in it: the page, the profile id, one server/item id, no token, no position.
* **`docs/parity-gaps.md`'s on-disk inventory** — "the only thing ever written to
disk is the credentials session", and the same claim again 400 lines later.
There are two files now, and the new one is the precedent that gap's own
*Where:* asks for ("a new preferences file alongside plex/session.rs"), so the
sentence said the thing it wanted did not exist.
ALREADY FALSE, in the same prose:
* `requiredMemory: 60` in **three more places** — `docs/two-installs.md` §3.1 and
the release-notes template's disclosure row and its worked example. Identical
string to the three img.rs comments this branch already fixed, stale since
6d79230 (2026-08-22), and each one cites `distribution.md` §6.10 as its
source — the section that says the "~74 MB peak" was never a measurement and
that the number is 160 against a measured 152 MiB. The template would have had
the next release publicly disclose a defect that is fixed.
* **`lib.rs:22`** described `ff` as "the TV's own FFmpeg 3.3 via the stub-.so
link". Both halves inverted: the app bundles and pins FFmpeg 9.0 (56147f1)
and `stub/` was deleted (72b7d71). Three lines below the line this branch
added, in the list a newcomer reads first.
* **`parity-gaps.md:1567`** carried "the raw-socket client cannot do chunked
transfer" — the exact sentence the root CLAUDE.md holds up as this repo's
archetypal false claim, surviving in another file. `stream.rs` decodes chunked;
its only disqualifiers are DNS and TLS.
Left alone deliberately: `two-installs.md` §3.1's shared-resource inventory does
not list the new per-install file, and that section refuses to be trusted as a
list by construction ("re-derived against the tree, not inherited"); the dated
`*Verified:*` blocks in parity-gaps.md keep their 2026-07-29 line numbers; and
`lg-self-checklist.md`'s #3 row still says the matrix is unrun, which is true.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G
GLinnik21
added a commit
that referenced
this pull request
Aug 26, 2026
…k there (#56) * coldstart: the app writes down where it was, and a cold boot goes back there The app-switch lifecycle was already handled properly, and all of it lives in the PROCESS: background suspends the buffer-feed and drops to Home, foreground reloads and resumes at the saved position with one Load. A COLD start — the set powered off and on, the mains pulled, the app closed from the Recent List — begins with a process that has seen none of that, and the boot route came purely from credential state. Where you actually were was written down nowhere. That is the persistence half of LG App Self Checklist #3 (Reboot). `rust-modules/src/coldstart.rs` records a Place — Home, a library TAB PILL, or an item addressed as (machineIdentifier, ratingKey) — and app.rs reads it back at boot. A playback session records the played leaf and is restored to that item's DETAIL page, never to the player: coming out of a power cycle into a decoding video is an ambush, and the resume point is the server's `viewOffset` anyway. Three decisions worth carrying: * **Not the runtime root**, though that is the obvious home for a file this small. `/tmp` on a television is cleared by a reboot — this repo already leans on that in the other direction, since `tools/tv-lock.sh` puts the device lease there BECAUSE a reboot should release it — so a cold-start restore living there would be erased by the cold start. It goes where the session file goes (`paths::last_place_candidates`). Two smaller wins fall out: the name is outside the `plxnative-*` trigger namespace, so it cannot suppress the who's-watching picker the way a state file in `/tmp` would have, and it is outside the glob `tests/run.py` sweeps. * **Not in `Session`.** That file fails as a unit and a parse failure there is a silent sign-out at every boot; every list in it is soft-parsed for exactly that reason. A convenience feature has no business in that blast radius, so this owns its own file, its own format, and fails soft to today's behaviour on every path — absent, empty, truncated, hand-edited, unknown version, foreign profile, a server no longer registered. * **Two rules that stop the feature erasing its own state.** Nothing is recorded until the boot SEQUENCE has ended, because the sign-in, the picker and the first-run question all hand over to Home when answered — a recorder open through that window writes `home` over the record before anyone can ask for it, permanently, for exactly the multi-profile household the profile key exists for. And Home is recorded as a RETURN, never as a landing, so a boot whose restore was declined (the item's server not re-registered yet) does not destroy the record on its way past. Nothing is recorded on an AUTOMATED boot, which is where the harness's determinism is bought: this file is outside the glob `tests/run.py` clears, so refusing to arm is the only place that can be done. `pkg/appinfo.json` is UNCHANGED. `handlesRelaunch` and `nativeLifeCycleInterfaceVersion` are documented in the module and left alone — neither is evidence about a native app's cold-boot behaviour on this firmware, and the verdict for #3 belongs to the device matrix in the PR body. Also fixes three `requiredMemory: 60` comments in img.rs; the manifest says 160. Verified: 986/986 host tests (10 new), `--no-default-features` clean, and a real two-boot round trip in the simulator — navigate to a detail page, close, relaunch, and the app comes up on that page; BACK then records Home; an automated boot neither records nor restores; a truncated record boots to Home. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: the six claims this change made false, and four it only sat beside `doc-claim-auditor` on the coldstart diff. Two were caused by it and four were already false in prose the diff touches — all six are the same failure mode, a sentence that was true when written and that nothing compiles. CAUSED BY THIS CHANGE: * The release-notes **"written outside its own directory"** row (TEMPLATE.md and README.md) listed the three logs and the session file. `coldstart` is NOT behind `devtriggers` — `any_trigger_present()` is a compile-time `false` in a release build, so `arm()` always runs — and it writes a second file into `/media/{developer,internal}`. That row's whole value is being exhaustive; it is a gate item, and README's own standard is that "a property stated in a form that fails the reader's own check reads as a lie". Now names the file and what is in it: the page, the profile id, one server/item id, no token, no position. * **`docs/parity-gaps.md`'s on-disk inventory** — "the only thing ever written to disk is the credentials session", and the same claim again 400 lines later. There are two files now, and the new one is the precedent that gap's own *Where:* asks for ("a new preferences file alongside plex/session.rs"), so the sentence said the thing it wanted did not exist. ALREADY FALSE, in the same prose: * `requiredMemory: 60` in **three more places** — `docs/two-installs.md` §3.1 and the release-notes template's disclosure row and its worked example. Identical string to the three img.rs comments this branch already fixed, stale since 66688ed (2026-08-22), and each one cites `distribution.md` §6.10 as its source — the section that says the "~74 MB peak" was never a measurement and that the number is 160 against a measured 152 MiB. The template would have had the next release publicly disclose a defect that is fixed. * **`lib.rs:22`** described `ff` as "the TV's own FFmpeg 3.3 via the stub-.so link". Both halves inverted: the app bundles and pins FFmpeg 9.0 (41720ab) and `stub/` was deleted (7e296ec). Three lines below the line this branch added, in the list a newcomer reads first. * **`parity-gaps.md:1567`** carried "the raw-socket client cannot do chunked transfer" — the exact sentence the root CLAUDE.md holds up as this repo's archetypal false claim, surviving in another file. `stream.rs` decodes chunked; its only disqualifiers are DNS and TLS. Left alone deliberately: `two-installs.md` §3.1's shared-resource inventory does not list the new per-install file, and that section refuses to be trusted as a list by construction ("re-derived against the tree, not inherited"); the dated `*Verified:*` blocks in parity-gaps.md keep their 2026-07-29 line numbers; and `lg-self-checklist.md`'s #3 row still says the matrix is unrun, which is true. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Aug 27, 2026
…k there (#56) * coldstart: the app writes down where it was, and a cold boot goes back there The app-switch lifecycle was already handled properly, and all of it lives in the PROCESS: background suspends the buffer-feed and drops to Home, foreground reloads and resumes at the saved position with one Load. A COLD start — the set powered off and on, the mains pulled, the app closed from the Recent List — begins with a process that has seen none of that, and the boot route came purely from credential state. Where you actually were was written down nowhere. That is the persistence half of LG App Self Checklist #3 (Reboot). `rust-modules/src/coldstart.rs` records a Place — Home, a library TAB PILL, or an item addressed as (machineIdentifier, ratingKey) — and app.rs reads it back at boot. A playback session records the played leaf and is restored to that item's DETAIL page, never to the player: coming out of a power cycle into a decoding video is an ambush, and the resume point is the server's `viewOffset` anyway. Three decisions worth carrying: * **Not the runtime root**, though that is the obvious home for a file this small. `/tmp` on a television is cleared by a reboot — this repo already leans on that in the other direction, since `tools/tv-lock.sh` puts the device lease there BECAUSE a reboot should release it — so a cold-start restore living there would be erased by the cold start. It goes where the session file goes (`paths::last_place_candidates`). Two smaller wins fall out: the name is outside the `plxnative-*` trigger namespace, so it cannot suppress the who's-watching picker the way a state file in `/tmp` would have, and it is outside the glob `tests/run.py` sweeps. * **Not in `Session`.** That file fails as a unit and a parse failure there is a silent sign-out at every boot; every list in it is soft-parsed for exactly that reason. A convenience feature has no business in that blast radius, so this owns its own file, its own format, and fails soft to today's behaviour on every path — absent, empty, truncated, hand-edited, unknown version, foreign profile, a server no longer registered. * **Two rules that stop the feature erasing its own state.** Nothing is recorded until the boot SEQUENCE has ended, because the sign-in, the picker and the first-run question all hand over to Home when answered — a recorder open through that window writes `home` over the record before anyone can ask for it, permanently, for exactly the multi-profile household the profile key exists for. And Home is recorded as a RETURN, never as a landing, so a boot whose restore was declined (the item's server not re-registered yet) does not destroy the record on its way past. Nothing is recorded on an AUTOMATED boot, which is where the harness's determinism is bought: this file is outside the glob `tests/run.py` clears, so refusing to arm is the only place that can be done. `pkg/appinfo.json` is UNCHANGED. `handlesRelaunch` and `nativeLifeCycleInterfaceVersion` are documented in the module and left alone — neither is evidence about a native app's cold-boot behaviour on this firmware, and the verdict for #3 belongs to the device matrix in the PR body. Also fixes three `requiredMemory: 60` comments in img.rs; the manifest says 160. Verified: 986/986 host tests (10 new), `--no-default-features` clean, and a real two-boot round trip in the simulator — navigate to a detail page, close, relaunch, and the app comes up on that page; BACK then records Home; an automated boot neither records nor restores; a truncated record boots to Home. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: the six claims this change made false, and four it only sat beside `doc-claim-auditor` on the coldstart diff. Two were caused by it and four were already false in prose the diff touches — all six are the same failure mode, a sentence that was true when written and that nothing compiles. CAUSED BY THIS CHANGE: * The release-notes **"written outside its own directory"** row (TEMPLATE.md and README.md) listed the three logs and the session file. `coldstart` is NOT behind `devtriggers` — `any_trigger_present()` is a compile-time `false` in a release build, so `arm()` always runs — and it writes a second file into `/media/{developer,internal}`. That row's whole value is being exhaustive; it is a gate item, and README's own standard is that "a property stated in a form that fails the reader's own check reads as a lie". Now names the file and what is in it: the page, the profile id, one server/item id, no token, no position. * **`docs/parity-gaps.md`'s on-disk inventory** — "the only thing ever written to disk is the credentials session", and the same claim again 400 lines later. There are two files now, and the new one is the precedent that gap's own *Where:* asks for ("a new preferences file alongside plex/session.rs"), so the sentence said the thing it wanted did not exist. ALREADY FALSE, in the same prose: * `requiredMemory: 60` in **three more places** — `docs/two-installs.md` §3.1 and the release-notes template's disclosure row and its worked example. Identical string to the three img.rs comments this branch already fixed, stale since 68536a1 (2026-08-22), and each one cites `distribution.md` §6.10 as its source — the section that says the "~74 MB peak" was never a measurement and that the number is 160 against a measured 152 MiB. The template would have had the next release publicly disclose a defect that is fixed. * **`lib.rs:22`** described `ff` as "the TV's own FFmpeg 3.3 via the stub-.so link". Both halves inverted: the app bundles and pins FFmpeg 9.0 (41720ab) and `stub/` was deleted (7e296ec). Three lines below the line this branch added, in the list a newcomer reads first. * **`parity-gaps.md:1567`** carried "the raw-socket client cannot do chunked transfer" — the exact sentence the root CLAUDE.md holds up as this repo's archetypal false claim, surviving in another file. `stream.rs` decodes chunked; its only disqualifiers are DNS and TLS. Left alone deliberately: `two-installs.md` §3.1's shared-resource inventory does not list the new per-install file, and that section refuses to be trusted as a list by construction ("re-derived against the tree, not inherited"); the dated `*Verified:*` blocks in parity-gaps.md keep their 2026-07-29 line numbers; and `lg-self-checklist.md`'s #3 row still says the matrix is unrun, which is true. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Aug 28, 2026
…k there (#56) * coldstart: the app writes down where it was, and a cold boot goes back there The app-switch lifecycle was already handled properly, and all of it lives in the PROCESS: background suspends the buffer-feed and drops to Home, foreground reloads and resumes at the saved position with one Load. A COLD start — the set powered off and on, the mains pulled, the app closed from the Recent List — begins with a process that has seen none of that, and the boot route came purely from credential state. Where you actually were was written down nowhere. That is the persistence half of LG App Self Checklist #3 (Reboot). `rust-modules/src/coldstart.rs` records a Place — Home, a library TAB PILL, or an item addressed as (machineIdentifier, ratingKey) — and app.rs reads it back at boot. A playback session records the played leaf and is restored to that item's DETAIL page, never to the player: coming out of a power cycle into a decoding video is an ambush, and the resume point is the server's `viewOffset` anyway. Three decisions worth carrying: * **Not the runtime root**, though that is the obvious home for a file this small. `/tmp` on a television is cleared by a reboot — this repo already leans on that in the other direction, since `tools/tv-lock.sh` puts the device lease there BECAUSE a reboot should release it — so a cold-start restore living there would be erased by the cold start. It goes where the session file goes (`paths::last_place_candidates`). Two smaller wins fall out: the name is outside the `plxnative-*` trigger namespace, so it cannot suppress the who's-watching picker the way a state file in `/tmp` would have, and it is outside the glob `tests/run.py` sweeps. * **Not in `Session`.** That file fails as a unit and a parse failure there is a silent sign-out at every boot; every list in it is soft-parsed for exactly that reason. A convenience feature has no business in that blast radius, so this owns its own file, its own format, and fails soft to today's behaviour on every path — absent, empty, truncated, hand-edited, unknown version, foreign profile, a server no longer registered. * **Two rules that stop the feature erasing its own state.** Nothing is recorded until the boot SEQUENCE has ended, because the sign-in, the picker and the first-run question all hand over to Home when answered — a recorder open through that window writes `home` over the record before anyone can ask for it, permanently, for exactly the multi-profile household the profile key exists for. And Home is recorded as a RETURN, never as a landing, so a boot whose restore was declined (the item's server not re-registered yet) does not destroy the record on its way past. Nothing is recorded on an AUTOMATED boot, which is where the harness's determinism is bought: this file is outside the glob `tests/run.py` clears, so refusing to arm is the only place that can be done. `pkg/appinfo.json` is UNCHANGED. `handlesRelaunch` and `nativeLifeCycleInterfaceVersion` are documented in the module and left alone — neither is evidence about a native app's cold-boot behaviour on this firmware, and the verdict for #3 belongs to the device matrix in the PR body. Also fixes three `requiredMemory: 60` comments in img.rs; the manifest says 160. Verified: 986/986 host tests (10 new), `--no-default-features` clean, and a real two-boot round trip in the simulator — navigate to a detail page, close, relaunch, and the app comes up on that page; BACK then records Home; an automated boot neither records nor restores; a truncated record boots to Home. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: the six claims this change made false, and four it only sat beside `doc-claim-auditor` on the coldstart diff. Two were caused by it and four were already false in prose the diff touches — all six are the same failure mode, a sentence that was true when written and that nothing compiles. CAUSED BY THIS CHANGE: * The release-notes **"written outside its own directory"** row (TEMPLATE.md and README.md) listed the three logs and the session file. `coldstart` is NOT behind `devtriggers` — `any_trigger_present()` is a compile-time `false` in a release build, so `arm()` always runs — and it writes a second file into `/media/{developer,internal}`. That row's whole value is being exhaustive; it is a gate item, and README's own standard is that "a property stated in a form that fails the reader's own check reads as a lie". Now names the file and what is in it: the page, the profile id, one server/item id, no token, no position. * **`docs/parity-gaps.md`'s on-disk inventory** — "the only thing ever written to disk is the credentials session", and the same claim again 400 lines later. There are two files now, and the new one is the precedent that gap's own *Where:* asks for ("a new preferences file alongside plex/session.rs"), so the sentence said the thing it wanted did not exist. ALREADY FALSE, in the same prose: * `requiredMemory: 60` in **three more places** — `docs/two-installs.md` §3.1 and the release-notes template's disclosure row and its worked example. Identical string to the three img.rs comments this branch already fixed, stale since fa257bd (2026-08-22), and each one cites `distribution.md` §6.10 as its source — the section that says the "~74 MB peak" was never a measurement and that the number is 160 against a measured 152 MiB. The template would have had the next release publicly disclose a defect that is fixed. * **`lib.rs:22`** described `ff` as "the TV's own FFmpeg 3.3 via the stub-.so link". Both halves inverted: the app bundles and pins FFmpeg 9.0 (56147f1) and `stub/` was deleted (72b7d71). Three lines below the line this branch added, in the list a newcomer reads first. * **`parity-gaps.md:1567`** carried "the raw-socket client cannot do chunked transfer" — the exact sentence the root CLAUDE.md holds up as this repo's archetypal false claim, surviving in another file. `stream.rs` decodes chunked; its only disqualifiers are DNS and TLS. Left alone deliberately: `two-installs.md` §3.1's shared-resource inventory does not list the new per-install file, and that section refuses to be trusted as a list by construction ("re-derived against the tree, not inherited"); the dated `*Verified:*` blocks in parity-gaps.md keep their 2026-07-29 line numbers; and `lg-self-checklist.md`'s #3 row still says the matrix is unrun, which is true. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
The persistence half of LG App Self Checklist #3 (Reboot), whose matrix
docs/lg-self-checklist.mdrecords as entirely unrun.The app-switch lifecycle was already built properly, and every bit of it lives in the
process:
0x103snapshots the intended position, cancels an in-flight resolve, suspendsthe buffer-feed and drops to Home;
0x106rewinds andresume_ats beforestart_bufferfeedso one
Loadcarries the position. None of that survives the process ending. A cold start— the set powered off and on, the mains pulled, the app closed from the Recent List and
launched again — came up from credential state alone (
Login/Profiles/Onboard/Home), because where you actually were was written down nowhere.Now it is.
rust-modules/src/coldstart.rsrecords a Place and the boot reads it back:HomeLibrary { tab }library::enter(tab, Arrival::Cut)Item { machine, rk }Playback is deliberately restored to the detail page, never the player. Coming out of a
power cycle straight into a decoding video is an ambush, not a restore; the detail page puts
Resume one press away and the resume point is the server's
viewOffset, which the app alreadyposts every 10 s. No playback position is stored locally — a second source of truth would
disagree exactly when it matters, since the case this feature is about (the mains pulled) is
the case where the local copy was never flushed.
Three decisions worth reviewing
1. The file is NOT in the runtime root, although that is where the unit was scoped to put
it and it is the obvious home for something this small.
/tmpon a television is cleared bya reboot — this repo already leans on that in the other direction:
tools/tv-lock.shputsthe device lease under
/tmpbecause a reboot should release it, andplex::sessionlogs"login will not survive a reboot" when it can reach none of the persistent paths. A cold-start
restore whose state file is erased by the cold start is a no-op. So it goes where the session
file goes —
paths::last_place_candidates(), the same three-directory ladder, with its ownfilename and no legacy-migration entry.
Two smaller wins fall out of the same choice, and they answer the trap the unit flagged:
plxnative-*trigger namespace, so it cannot suppress thewho's-watching picker on every ordinary boot the way a state file in the runtime root would
have (
dev::any_trigger_present;tools/tv-lock.shrecords the same trap from the otherside). Nothing was added to
dev::DIAG— the question cannot arise.tests/run.pysweeps, which means a teardown could not haveundone it either. Harness determinism is bought where it belongs instead: nothing is
recorded on an automated boot, and nothing is restored.
2. Not in
Session, as the unit required. That file fails as a unit and a parse failurethere is a silent sign-out at every boot — every list in it is soft-parsed entry-by-entry for
exactly that reason. This owns its own file and format and fails soft to today's behaviour on
every path: absent, empty (the mains-pull shape), truncated, valid JSON of the wrong type,
unknown format version, no version at all, an
itemmissing half its identity, a recordbelonging to another profile, a server no longer registered, an unwritable location.
3. Two rules that stop the feature erasing its own state. Both came out of the code review
and both are load-bearing:
arm()only reads the file;take_restore()decides, once the app is on a real page. The sign-in, the picker and thefirst-run question all hand over to Home when answered — a recorder open through that window
writes
homeover the record before anybody could ask for it, permanently, on every boot, forexactly the multi-profile household the profile key exists for. It is also why the profile is
compared in
take_restoreand not inarm: before the picker is answered,session::current_profile_key()still names whoever was last signed in.the recorded item's server has not been re-registered by the async roster refresh yet — sits
on Home, and recording that Home would destroy the record by way of the one boot that could
not use it.
Two things that are NOT decided here
pkg/appinfo.jsonis unchanged. It still sets"handlesRelaunch": falseand"nativeLifeCycleInterfaceVersion": 2, and nothing inrust-modules/src/reads or reacts toeither (
grep handlesRelaunch: zero hits). Neither is evidence about a native app's cold-bootbehaviour on this firmware:
handlesRelaunchis documented by LG for re-launching an app that is alreadyrunning — the app either handles the second launch request itself or is restarted. A cold
boot is a process that was not running, so the flag says nothing about it. The page
documenting it is written for the web runtime, and this repo's rule is that a
develop/*page is context for a native app and never proof.nativeLifeCycleInterfaceVersionis recorded indocs/distribution.md§1.6 as a webOSOSE property that no shipped native TV app sets — ours does, harmlessly.
So #3's verdict is not claimed. It needs a television, and the matrix below is the recipe.
I had no device access in this lane.
The native lifecycle matrix — the recipe for #3
Take the TV lock first (
tv-lockskill), and read the event log's first line to confirm whichinstall you are grading. Every case is graded on the
coldstart:lines in$(make -s print-eventlog)plus what is on the panel.Setup, once:
The state file, for each case (there is no trigger for it; it is not a dev surface):
coldstart: place on file kind=itemthencoldstart: restored the item's detail page; that page on screenfsync→rename) exists for — the record must be the whole previous file or the whole new one, never zero bytescoldstart:bg_was_playingguardthe recorded place belongs to another profile — ignoring it; B lands on Home, and B's own first navigation replaces the recordCOLDSTART_RESTORE_MStrades and the only reason it is a numberthe recorded item's server is not registered — staying on Home, and no stall: the item path is the asyncdetail::open_rkand the library path refuses rather than letlibrary::enterreach its blocking discoverycoldstart: no place recorded, and no file written — an install that never navigates must cost nothing./tests/run.py(any tier), then cold-start by handcoldstart:line in any harness run's log, and the record from before the run is unchangedstableand ondebugmake RELEASE=1 deploy, repeat case 1devtriggersCases 4, 5 and 6 are what actually answer
handlesRelaunch: if a Recent List re-selection turnsout to relaunch rather than foreground the app on this firmware, the flag becomes a real question
and
docs/lg-self-checklist.md's #3 row should say so.Verification done here
make check— 986 passed (10 new incoldstart),make lintclean.cargo +nightly check --lib --no-default-featuresclean (thePostToolUserelease-confighook ran on every edit).
python3 ci/check-package.py— all tracked-file assertions pass (appinfo.jsonuntouched).host tests cannot reach. Driven with a real session file in the instance root rather than
make sim-token, because the token is aplxnative-*trigger and so marks the bootautomated — which correctly disables the feature:
down down okinto a detail page →coldstart: recorded place kind=item, and therecord lands in the instance root;
coldstart: place on file kind=item→coldstart: restored the item's detail page,with the page fully rendered in the screenshot (hero art, facts row, Play);
kind=home;kind:"library"record restores the browse grid;no place recorded, boots to Home;plxnative-*file present → zerocoldstart:lines, routestays Home, and the existing record is left untouched.
Corrections to the unit's brief, per "trust the file"
rust-modules/src/viewstate.rsalready exists and is the server-side view-state WRITEpath (Mark as Watched / Unwatched / Remove from Continue Watching, off the SDL thread). The new
module is
rust-modules/src/coldstart.rs.erases it; see decision 1 above. It is in the session file's persistent ladder instead.
app.rs:4149-4190(the same block is now:4329-4385) is pre-loop declarations only, sothe restore and the recorder cannot both live there — the restore needs data that has not
landed at that point, and the recorder needs a per-frame call. The footprint outside that
region is: one free fn block next to
page_of(coldstart_frame/coldstart_place/apply_coldstart, well clear of both sibling lanes' regions) and one call immediatelyafter
let now = SDL_GetTicks();in the dev-trigger area of the loop. Neither touches:4408-4577(b6-keys) or:3858/:3903-3958(t1-origin).img.rs's three stale comments were as described and are fixed.Doc audit (second commit)
doc-claim-auditorover the diff, across 71 markdown files, the 11 skills, the 4CLAUDE.mdsand 111 Rust module docs. Six contradictions, all fixed in
3505ff06:Caused by this change (2). The release-notes "written outside its own directory" row
(
TEMPLATE.md+README.md) was no longer exhaustive —coldstartis not behinddevtriggers, so a release binary always writes a second file into/media/{developer,internal}.That row is a gate item and README's own standard is that "a property stated in a form that fails
the reader's own check reads as a lie"; it now names the file and its contents (page, profile id,
one server/item id — no token, no playback position). And
docs/parity-gaps.md's inventorysentence, "the only thing ever written to disk is the credentials session", said in two places
that the very precedent its own Where: asks for did not exist.
Already false in the prose the diff touches (4).
requiredMemory: 60in three more places(
two-installs.md§3.1, and the release-notes disclosure row and its worked example) — the samestring as the img.rs comments this branch fixes, each citing the §6.10 that says the number is 160
against a measured 152 MiB; the template would have had the next release publicly disclose a
defect that is fixed.
lib.rs:22calledff"the TV's own FFmpeg 3.3 via the stub-.so link",inverted on both halves and three lines below the line this branch added. And
parity-gaps.md:1567still carried "the raw-socket client cannot do chunked transfer" — the exactsentence the root
CLAUDE.mdholds up as this repo's archetypal false claim, surviving in anotherfile.
Deliberately left:
two-installs.md§3.1's shared-resource inventory (it refuses byconstruction to be trusted as a list — "re-derived against the tree, not inherited"), the dated
*Verified:*blocks inparity-gaps.md, andlg-self-checklist.md's #3 row, which still says thematrix is unrun — because it is.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G