fix(pdf): journal annotation changes durably - #1551
Draft
Jeremy1844 wants to merge 1 commit into
Draft
Conversation
Jeremy1844
force-pushed
the
fix/adv-2026-0004-pdf-annotation-journal
branch
from
July 29, 2026 12:33
b3848f4 to
d405036
Compare
This was referenced Jul 29, 2026
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.
Draft PR packet: ADV-2026-0004
Proposed PR
fix(pdf): journal annotation changes durablyAdventech/sabbath-school-android/main55405f66a8c555047dc0035747acdcaa371d59fafix/adv-2026-0004-pdf-annotation-journald405036605dd2d45a82d8ae0a796049a09154f8bRC-0004)Publication privacy note: the branch commit metadata was recreated with the account's GitHub noreply identity before review. Its source tree, message, parent, and stable patch ID are unchanged, so the recorded source-tree validation remains applicable to the published head.
The canonical worklog proves this is an published, complete head with zero changed-file overlap against RC-0001, RC-0002, and RC-0003, so it qualifies for a separate packet.
Why
PDF annotation persistence occurred only in
onStop(), leaving edits vulnerable to process death or native failure. Restore removed current annotations before validating incoming Instant JSON, serialization silently dropped values equal tonull, absent and explicitly empty states were conflated, and compacted descriptor indexes could save under the wrong PDF ID. This is a confirmed P0 PDF slice of Android issue #1545.Failing-before reproduction
The audited module has no unit tests (
:features:pdf:testReleaseUnitTestreportsNO-SOURCE). Regression-first additions initially fail to compile because journal/session/restore boundaries do not exist. Deterministic tests then model:They also seed a valid current snapshot plus a partially malformed candidate; the base clear-then-decode path leaves a partial/empty document, while the fixed path must retain or reconstruct the last-known-good state.
Minimal fix
Recorded local checks
:features:pdf:check :common:auth:check spotlessCheck.:app:assembleRelease(1,200 tasks).These are local Windows-hosted JVM/fake/Gradle and unsigned assembly results. No licensed runtime, hosted Actions, emulator, physical-device, power-loss, signed, store, server, or production result is claimed.
The 2026-07-28 delivery refresh reconfirmed the unchanged target and zero-overlap PR set. The exact clean head passed 349/349 focused tasks with 18/18 PDF tests, the combined PDF/auth/format gate with 23/23 emitted tests, and a fresh unsigned app release assembly. This is local regression/build evidence only; the licensed-device, process-kill, low/disk-full storage, power-loss, server-conflict, privacy, rollback, and hosted gates below remain open.
Overlap and disposition
Android PR #1548 at
8523d93c0f05376b30113a2b24c1f7bbccc30aa0has zero file/root overlap and remains separate.RC-0004 is file-disjoint from RC-0001/0002/0003 and should remain its own PR. RC-0002 is still needed to make replay durable through Room/network conflict and retry. Do not combine this root with the verification stack.
Migration, recovery, and rollback
Security, privacy, and content rights
Sidecars remain in the app sandbox under
noBackupFilesDir, use hashed filenames, bound decoding, and do not log payloads/raw IDs. They are checksummed but not newly encrypted; device-compromise encryption is a separate design. No content, translation, lesson, PDF/video asset, Bible/EGW material, credential, signing, or deployment file changes.Dependency order and draft blockers
Review independently after the higher-readiness Android roots, then retest in the final RC-0002 composition. Keep the PR draft until production-licensed devices cover annotation create/update/remove/z-order, final deletion, multiple/unloaded PDFs, lifecycle/process kill, offline relaunch, low/disk-full storage, corruption/rollback, logout/account deletion, vendor filesystem/power-loss behavior, and required hosted checks. Confirm server conflict semantics with an authorized nonproduction account.