Reading window 1/3: app database and restore after a kill #15
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
schaefera/utStudyBIble!15
Loading…
Reference in a new issue
No description provided.
Delete branch "phase1/reading-window"
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?
Part of #11.
What
The app now remembers where you were reading.
app.sqlite3: 1 s after a change, at once when the app goes inactive, and on exit.kill -9..corrupt-<time>) and a fresh one is started, with a notice. Each migration is backed up first (VACUUM INTO .bak-v<N>, the last 2 are kept).Blast radius
Tier: trunk
Trunk paths touched:
core/src/db/(new, migration 001),core/src/reader.rs,core/src/worker.rs,qt/glue (reading_model.rs),qml/pages/ReadingPane.qml,Cargo.toml+ both lockfiles (rusqlite 0.40.2 bundled, tempfile for tests),tools/mem-check/Gate / rollback: no flag: this is the D8 baseline behaviour. To undo, revert this merge.
app.sqlite3is a new file that the previous build ignores, so reinstalling the previous.clickis a clean rollback.Differences from the plan:
Qt.application.stateleaving Active, since there is no Lomiri-specific suspend hook.Budgets (docs/07):
Proof
cargo make(fmt, clippy -D warnings, tests + golden tests with coverage, release check, cargo-deny on both workspaces, cargo-audit) passes. 27 core tests, 94.20% line coverage.cargo make app-docker(clang-format, qmllint, qt clippy, -Werror build, clang-tidy, mem-check) on 2bcf5b6 exits 0:reading.flush()commented out, mem-check fails (0 save(s), seen 700 ms after the scroll, exit 105). The wait is bounded by the clock, below the 1 s debounce, so only the flush can pass it.c6b8709.quick_check, dropping the fraction clamp) got new tests and are now caught.f222cb8passes click-review.f222cb8on the Volla Phone X23 (Plinius) and checked by hand that the app reopens at the reading position. The result was "seems to work", with no log captured.Review
Reviewer: 5 fresh-context rounds: high, then medium for each round of trunk fixes. 23 findings: 12 fixed, 11 declined or acknowledged.
Review-Confidence: 65/100. Core db and worker code is well reviewed, and its tests were checked to fail when the code is broken. The remaining gaps are an unreviewed final mem-check script edit (2bcf5b6) and an unproven reportTop-before-flush ordering.
Confidence by part
core/src/db/,core/src/worker.rs,core/src/reader.rs: high. Tested, the deliberate breaks are caught, and they were reviewed 3 times.qt/src/reading_model.rs: medium. Exercised through mem-check and the user's device check. The stale-chapter-after-a-failed-GoTo case is a known gap for PR 3.qml/pages/ReadingPane.qml: medium. The restore and the inactive save are proven under Xvfb, and the user checked the restore on the Plinius by hand.tools/mem-check/run.sh: medium. It depends on timing, and the last edit was not reviewed.Merge with Create merge commit: squash would drop the Review-Confidence trailer.
🤖 Generated with Claude Code