LifeMate — Personal, Family & Learning Companion
docs: record verified synthetic recovery results and remaining device gates
Quinn White committed
Oct 21, 2026 at 20:49 UTC
1b7e867ea498f6387622ef4c42f614a9237edf3b
3 files changed
+141
-7
PROJECT_STATE.md
+8
@@ -1,5 +1,13 @@
1
# LifeGuide / لایفگاید — وضعیت واقعی پروژه
2
3
+## بازیابی رمزدار ساختگی روی رایانه — ۲۰۲۶-۱۰-۲۱؛ آمادهٔ بررسی در PR44
4
+
5
+[PR44](https://github.com/davoodmehraban89/LifeMate/pull/44)، شاخهٔ `feat/personal-encrypted-recovery` بر PR43، منبع `29fa2c7247847c4eadb7792daaa91379dd0f2367`: ابزار QA با fixture واقعی SQLite1، آرشیو AES-256-GCM/Scrypt، اعتبارسنجی schema/هدر/رابطه و بازیابی بدون overwrite اضافه شد. source فقط خوانده میشود؛ DB بدون marker ساختگی پیش از بدنه رد میشود. این marker اثبات منشأ نیست. ابزار، ورودی backup مالک یا انتقال گوشی نیست و کلاینت/Backend/شناسه/امضای محصول را تغییر نمیدهد.
6
+
7
+**VERIFIED:** محلی55 آزمون بازیابی و60 آزمون host قبلی، demo واقعی close/reopen با1پروفایل/4برنامه/3ساعت هفتگی/4نوبت؛ تطبیق تمام فیلدها و SQL مستقل، ماندن hash مبدأ، رد رمز اشتباه/فایل دستکاریشده/مقصد موجود. review مستقل دو ایراد FIFO/race را بازتولید کرد؛ اصلاح و تکرار هر دو موفق بود. CI اختصاصی [39673314234](https://github.com/davoodmehraban89/LifeMate/actions/runs/39673314234) و39673386588 روی همان منبع موفق؛55+60 و demo اجرا شدند. scan فقط tracked/high-confidence است، audit کامل تاریخچه نیست. [دستور/خروجی](docs/audits/evidence/personal-synthetic-recovery-2026-10-21.json)، [راهنمای فارسی](docs/operations/PERSONAL_SYNTHETIC_RECOVERY.md).
8
+
9
+**UNVERIFIED:** نصب کناری/ارتقای app تازه روی Android، کلید ثابت واقعی مالک، گوشی/Windows/USB/ACL، snapshot دارای WAL و دوام قطع برق/دیسک پر واقعی. ورودی WAL/SHM/journal یا هدر WAL رد میشود؛ چیزی پاک نمیشود. CI عمومی39673386647 هنگام ثبت این بخش هنوز درحال اجرا بود؛ نتیجهٔ آن ادعا نمیشود. APK تازه تحویل نشد. گام بعد آزمون جدا روی شبیهساز تازه با همان APK اولیه و دادهٔ خیالی است؛ هیچ عملیات دادهٔ واقعی، merge/deploy/DNS مجاز/اجرا نشده است.
10
+
11
## آمادهسازی بازیابی رمزدار — ۲۰۲۶-۱۰-۲۱؛ فقط دادهٔ ساختگی تأیید شد
12
13
مالک گزینهٔ B در [ADR0018](docs/decisions/0018-offline-installed-data-rescue-options.md) را **فقط برای آمادهسازی و آزمون ساختگی** تأیید کرد. [برنامهٔ اجرا](docs/superpowers/plans/2026-10-21-personal-encrypted-recovery.md) در شاخهٔ `feat/personal-encrypted-recovery` بر PR43 است. کد محصول، نصب موجود، کلید امضای واقعی، دادهٔ کودک، merge/deploy/DNS دستنخوردهاند. انتقال واقعی و پذیرش گوشی هنوز **UNVERIFIED/غیرمجاز در این بسته** هستند.
docs/audits/evidence/personal-synthetic-recovery-2026-10-21.json
new
+126
@@ -0,0 +1,126 @@
1
+{
2
+ "schemaVersion": 1,
3
+ "date": "2026-10-21",
4
+ "sourceCommit": "29fa2c7247847c4eadb7792daaa91379dd0f2367",
5
+ "branch": "feat/personal-encrypted-recovery",
6
+ "pr": 44,
7
+ "approval": "ADR0018 option B preparation and synthetic tests only; no real data/device/key/publication authorization",
8
+ "scope": "host-only synthetic encrypted SQLite recovery QA",
9
+ "localRuntime": {
10
+ "python": "3.12.14",
11
+ "cryptography": "50.0.0",
12
+ "sqlite": "3.53.1"
13
+ },
14
+ "localChecks": [
15
+ {
16
+ "command": "python3 -m unittest discover -s scripts/tests -p 'test_recovery*.py' -q",
17
+ "status": "VERIFIED",
18
+ "exitCode": 0,
19
+ "outputExcerpt": "Ran 55 tests in 3.934s\n\nOK"
20
+ },
21
+ {
22
+ "command": "python3 -m unittest discover -s apps/lifemate/tool -p '*_test.py' -q",
23
+ "status": "VERIFIED",
24
+ "exitCode": 0,
25
+ "outputExcerpt": "Ran 60 tests in 0.046s\n\nOK"
26
+ },
27
+ {
28
+ "command": "python3 scripts/personal_recovery_cli.py demo --directory /tmp/lifeguide-recovery-demo-reviewed-20261021 --acknowledge-synthetic-only",
29
+ "status": "VERIFIED",
30
+ "exitCode": 0,
31
+ "receipt": {
32
+ "canonicalSnapshotSha256": "f64bf8f30e41dc4eddca18629f2ca950839fdb11f489c85889a40500739c06f9",
33
+ "checks": {
34
+ "fullFieldRoundTripAfterCloseReopen": "PASS",
35
+ "independentSqlIntegrityAndCounts": "PASS",
36
+ "invalidCredentialRejectedBeforeOutput": "PASS",
37
+ "repeatRestoreRefusedWithoutOverwrite": "PASS",
38
+ "sourceBytesUnchanged": "PASS",
39
+ "tamperingRejected": "PASS"
40
+ },
41
+ "counts": {
42
+ "local_occurrences": 4,
43
+ "local_plans": 4,
44
+ "local_profiles": 1,
45
+ "local_weekly_slots": 3
46
+ },
47
+ "limitations": {
48
+ "WindowsAndUsb": "UNVERIFIED",
49
+ "androidSideBySide": "UNVERIFIED",
50
+ "ownerSigningKey": "UNVERIFIED",
51
+ "physicalDeviceOrOwnerData": "UNVERIFIED",
52
+ "powerLossDurability": "UNVERIFIED",
53
+ "subsequentSignedAppUpgrade": "UNVERIFIED"
54
+ },
55
+ "result": "PASS",
56
+ "schemaVersion": 1,
57
+ "scope": "host SQLite v1 encrypted recovery rehearsal; no device or owner data",
58
+ "syntheticOnly": true
59
+ }
60
+ },
61
+ {
62
+ "command": "python3 scripts/check-tracked-secrets.py",
63
+ "status": "VERIFIED",
64
+ "exitCode": 0,
65
+ "limitation": "tracked files and high-confidence patterns only; not a whole-history audit"
66
+ },
67
+ {
68
+ "command": "python3 scripts/audit-naming.py --check",
69
+ "status": "VERIFIED",
70
+ "exitCode": 0,
71
+ "outputExcerpt": "Naming audit passed: 539 retained text occurrences classified; binary fonts/icons excluded."
72
+ },
73
+ {
74
+ "command": "git diff --cached --check",
75
+ "status": "VERIFIED",
76
+ "exitCode": 0,
77
+ "outputExcerpt": ""
78
+ }
79
+ ],
80
+ "ci": {
81
+ "conclusion": "success",
82
+ "databaseId": 39673314234,
83
+ "headSha": "29fa2c7247847c4eadb7792daaa91379dd0f2367",
84
+ "status": "completed",
85
+ "url": "https://github.com/davoodmehraban89/LifeMate/actions/runs/39673314234"
86
+ },
87
+ "ciLogExcerpt": [
88
+ "host-synthetic-recovery\tRun recovery refusal, integrity and filesystem tests\t2026-10-21T20:47:29.0079431Z Ran 55 tests in 4.204s",
89
+ "host-synthetic-recovery\tRun existing APK and Android host guards\t2026-10-21T20:47:29.2620700Z Ran 60 tests in 0.047s",
90
+ "host-synthetic-recovery\tRehearse actual synthetic SQLite close and reopen\t2026-10-21T20:47:29.8096031Z {\"canonicalSnapshotSha256\": \"f64bf8f30e41dc4eddca18629f2ca950839fdb11f489c85889a40500739c06f9\", \"checks\": {\"fullFieldRoundTripAfterCloseReopen\": \"PASS\", \"independentSqlIntegrityAndCounts\": \"PASS\", \"invalidCredentialRejectedBeforeOutput\": \"PASS\", \"repeatRestoreRefusedWithoutOverwrite\": \"PASS\", \"sourceBytesUnchanged\": \"PASS\", \"tamperingRejected\": \"PASS\"}, \"counts\": {\"local_occurrences\": 4, \"local_plans\": 4, \"local_profiles\": 1, \"local_weekly_slots\": 3}, \"limitations\": {\"WindowsAndUsb\": \"UNVERIFIED\", \"androidSideBySide\": \"UNVERIFIED\", \"ownerSigningKey\": \"UNVERIFIED\", \"physicalDeviceOrOwnerData\": \"UNVERIFIED\", \"powerLossDurability\": \"UNVERIFIED\", \"subsequentSignedAppUpgrade\": \"UNVERIFIED\"}, \"result\": \"PASS\", \"schemaVersion\": 1, \"scope\": \"host SQLite v1 encrypted recovery rehearsal; no device or owner data\", \"syntheticOnly\": true}",
91
+ "host-synthetic-recovery\tCheck tracked artifacts and naming\t2026-10-21T20:47:29.9825723Z Tracked-file credential/artifact scan passed; this is not a complete secret audit.",
92
+ "host-synthetic-recovery\tCheck tracked artifacts and naming\t2026-10-21T20:47:30.1704782Z Naming audit passed: 539 retained text occurrences classified; binary fonts/icons excluded."
93
+ ],
94
+ "independentReview": {
95
+ "status": "VERIFIED_REVIEW",
96
+ "initialFindings": [
97
+ "P2 FIFO input blocked before type validation",
98
+ "P2 source path changed between validation and SQLite reopening"
99
+ ],
100
+ "resolutions": [
101
+ "nonblocking nofollow descriptor with identity checks and unbuffered header gate",
102
+ "bounded source bytes deserialized only in memory; schema/version/marker rechecked"
103
+ ],
104
+ "rerun": "55 tests PASS plus both original reproductions refuse; no remaining blockers found within closed synthetic fixture scope"
105
+ },
106
+ "redGreenObserved": [
107
+ "archive tests failed before module implementation; then16 PASS",
108
+ "snapshot missing implementation and race/WAL/header regressions failed before fixes; then20 PASS",
109
+ "filesystem FIFO/regular-file swap/header callback tests failed before fix; then12 PASS",
110
+ "CLI initial missing-module failure followed by7 PASS; no claim this alone proved behavior RED"
111
+ ],
112
+ "limitations": {
113
+ "WindowsAndUsb": "UNVERIFIED",
114
+ "androidSideBySide": "UNVERIFIED",
115
+ "ownerSigningKey": "UNVERIFIED",
116
+ "physicalDeviceOrOwnerData": "UNVERIFIED",
117
+ "powerLossDurability": "UNVERIFIED",
118
+ "subsequentSignedAppUpgrade": "UNVERIFIED"
119
+ },
120
+ "nonClaims": [
121
+ "no new APK or installation identity in this PR",
122
+ "no owner signing key or actual upgrade compatibility",
123
+ "no owner/child data or phone operations",
124
+ "no live network service, merge, deploy or DNS changes"
125
+ ]
126
+}
docs/superpowers/plans/2026-10-21-personal-encrypted-recovery.md
+7
-7
@@ -24,13 +24,13 @@ CLI: `create-fixture`, `pack`, `restore-fixture`, `demo`; all require `--acknowl
24
25
## Verification ledger
26
27
-- [ ] Archive RED/GREEN and tamper/wrong-password/size/version checks.
28
-- [ ] Snapshot RED/GREEN, source hash unchanged, full field/ID round trip and invalid inputs.
29
-- [ ] CLI round trip on disk; close/reopen and independent SQL; no overwrite, interrupted/ENOSPC failure, no output before acknowledgement.
30
-- [ ] Existing Python APK/Android host tests; tracked-secret and naming checks.
31
-- [ ] CI on exact committed source; record success/failure, never infer Android acceptance from host tests.
32
-- [ ] Independent whole-branch review, correct issues, rerun affected tests.
33
-- [ ] PR and Persian runbook/evidence, exact VERIFIED/UNVERIFIED boundaries.
27
+- [x] Archive RED/GREEN and tamper/wrong-password/size/version checks.
28
+- [x] Snapshot RED/GREEN, source hash unchanged, full field/ID round trip and invalid inputs.
29
+- [x] CLI round trip on disk; close/reopen and independent SQL; no overwrite, simulated interrupted/ENOSPC failure, no output before acknowledgement. Actual disk exhaustion/power loss UNVERIFIED.
30
+- [x] Existing Python APK/Android host tests; tracked-secret and naming checks.
31
+- [x] Dedicated host CI39673314234 on exact source29fa2c7 PASS; general CI39673386647 initially pending. No Android acceptance inferred.
32
+- [x] Independent review: FIFO and source-path race reproduced, corrected, both original reproductions refuse; final55 recovery tests PASS.
33
+- [x] PR44 and Persian runbook/evidence. Android/owner data/key/Windows remain UNVERIFIED.
34
35
## Deferred separate acceptance package
36