Skip to content

Commit 8453356

Browse files
committed
fix: prevent Siri suspension file-lock termination
1 parent 10e31ea commit 8453356

18 files changed

Lines changed: 542 additions & 34 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"task": "hourleaf-siri-suspension-v1",
3+
"status": "PARTIAL",
4+
"acceptance": [
5+
{"id": "AC1", "status": "PASS", "proof": ["raw/build16-diagnosis.md"]},
6+
{"id": "AC2", "status": "PASS", "proof": ["raw/focused-tests-summary.json"]},
7+
{"id": "AC3", "status": "PASS", "proof": ["raw/focused-tests-summary.json"]},
8+
{"id": "AC4", "status": "PASS", "proof": ["raw/full-unit-summary.json", "raw/ui-summary.json", "raw/release17-package.md"]},
9+
{"id": "AC5", "status": "PENDING", "proof": []},
10+
{"id": "AC6", "status": "PENDING", "proof": []}
11+
]
12+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Evidence
2+
3+
## Current verdict
4+
5+
PARTIAL. AC1 through AC4 have current PASS evidence. AC5 and AC6 require the
6+
signed build 17 TestFlight install, physical Siri runs, fresh device crash-log
7+
comparison, and deletion of diagnostic entries through Hourleaf.
8+
9+
## AC1 — PASS: physical failure identified
10+
11+
- Both build 16 Siri actions persisted the exact requested service and credit
12+
entries through the shortcut source.
13+
- Each action was followed by its own `RUNNINGBOARD` `0xdead10cc` termination.
14+
- Matching dSYM symbolication placed both terminations in the host app's shared
15+
quick-surface file lock during post-persistence reconciliation.
16+
- See `raw/build16-diagnosis.md`.
17+
18+
## AC2 — PASS: exact write and balanced resource lifetime
19+
20+
- Existing App Intent tests prove service and credit remain separate and each
21+
writes exactly once through the shared command path.
22+
- Production host reconciliation now begins one UIKit background assertion
23+
before shared-file access and ends it after successful or failed readback.
24+
- Dedicated tests cover normal completion, expiration before activation,
25+
expiration after activation, an invalid task grant, and sidecar failure.
26+
27+
## AC3 — PASS: focused regression contract
28+
29+
- The injected execution-activity spy observes the sidecar publish while the
30+
activity is active and verifies exactly one begin/end pair.
31+
- The same balance is enforced on the error path. Removing the wrapper makes
32+
these assertions fail without changing the ledger or adding a writer.
33+
- Focused result: 38 of 38 PASS; see `raw/focused-tests-summary.json`.
34+
35+
## AC4 — PASS: automated and package safety
36+
37+
- Full unit/integration result: 523 of 523 PASS.
38+
- App-owned non-screenshot UI result: 53 of 53 PASS.
39+
- Release guard, guard self-test, unsigned Release build, embedded extension
40+
and Watch validation, privacy manifests, App Intents metadata, and dSYM all
41+
pass for `1.0.4 (17)`.
42+
- See `raw/full-unit-summary.json`, `raw/ui-summary.json`, and
43+
`raw/release17-package.md`.
44+
45+
## AC5 — PENDING: physical build 17 acceptance
46+
47+
- Requires one service and one credit Siri action from the processed build 17
48+
TestFlight package plus exact read-only ledger and fresh crash-log comparison.
49+
50+
## AC6 — PENDING: diagnostic cleanup
51+
52+
- Requires deleting build 16 diagnostic entries and build 17 canaries through
53+
Hourleaf, followed by read-only proof that unrelated active entries did not
54+
change.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Implementation notes
2+
3+
The build 16 Siri actions persisted correctly, but each run produced an iOS `RUNNINGBOARD` termination with code `0xdead10cc`. The production fix must address persistence-resource lifetime rather than changing the intent's user-facing result.
4+
5+
lazy-senior check:
6+
- lower rung: use UIKit's native background assertion around the existing short App Group lock
7+
- GitHub prior art: skipped because this is a repo-local regression and Apple documents the exact termination and API
8+
- new code justified: expiration and normal completion must balance one assertion without changing the shared file protocol
9+
10+
Focused verification on 2026-08-28:
11+
- canonical iPhone 17 / iOS 26.5 simulator
12+
- 38 selected App Intent and quick-surface lifecycle tests passed with zero failures
13+
- coverage includes normal completion, expiration-before-activation, invalid task grants, sidecar failure, and publish/readback while the execution activity is held
14+
- release guard and its mutation self-test passed before the focused run
15+
16+
Full verification on 2026-08-28:
17+
- 523 unit and integration tests passed with zero failures after the final expiration-path test was added
18+
- 53 non-screenshot UI tests passed with zero failures
19+
- the UI run included quick-surface stop/review/save/discard, timer persistence across termination and relaunch, data management, history, reports, reminders, accessibility sizes, reduced motion, and EN/RU/UK launches
20+
21+
Adversarial review claim: the new assertion must cover every `flock` operation reached by the post-Siri reconciliation and must end exactly once without changing the extension or ledger writer. No actionable source finding remains after inspecting both call paths and failure paths. The residual gap is physical suspension behavior, which requires a new signed TestFlight build and fresh crash-log comparison.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Sanitized build 16 diagnosis
2+
3+
- Physical platform: iPhone 15 Pro, iOS 26.6, Hourleaf 1.0.4 (16).
4+
- Two intentional Siri actions produced exactly two new active ledger entries and two matching create revisions: one service entry and one credit entry, each with the requested minute value and `shortcut` source.
5+
- Both post-action databases passed SQLite integrity checks. No raw row values, object identifiers, device identifiers, or personal ledger totals are retained here.
6+
- Each action was followed by a separate `RUNNINGBOARD` `SIGKILL` with termination code `0xdead10cc`.
7+
- Symbolication with the matching retained build 16 dSYM placed both terminations in the shared quick-surface file lock during host-app reconciliation. One path was launched by the scene-phase refresh and the other by the ledger-change refresh.
8+
- The evidence therefore identifies a post-persistence suspension race, not a failed or duplicated Siri write.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"status": "PASS",
3+
"tests": 38,
4+
"failures": 0,
5+
"suites": [
6+
"AppIntentTests",
7+
"QuickSurfaceApplicationBackgroundTaskTests",
8+
"QuickSurfaceHostControllerTests"
9+
],
10+
"destination": "iPhone 17 simulator, iOS 26.5"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"status": "PASS",
3+
"tests": 523,
4+
"failures": 0,
5+
"destination": "iPhone 17 simulator, iOS 26.5"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Unsigned Release package receipt
2+
3+
- Release-readiness guard: PASS.
4+
- Release-readiness mutation self-test: PASS.
5+
- Unsigned generic iOS Release build: PASS.
6+
- iPhone app: `com.kikuai.hourleaf`, version `1.0.4 (17)`.
7+
- WidgetKit extension: `com.kikuai.hourleaf.quick-surfaces`, version `1.0.4 (17)`.
8+
- Watch app: `com.kikuai.hourleaf.watchkitapp`, version `1.0.4 (17)`.
9+
- All three bundles contain their privacy manifests.
10+
- The iPhone bundle contains compiled App Intents metadata and the build produced a dSYM.
11+
- Xcode embedded-binary validation passed for both the extension and Watch app.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"status": "PASS",
3+
"tests": 53,
4+
"failures": 0,
5+
"excludedSuite": "HourleafAppStoreScreenshotTests",
6+
"destination": "iPhone 17 simulator, iOS 26.5"
7+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Hourleaf Siri suspension fix
2+
3+
Class: temporary task artifact. GitHub Issue #3 owns the public task state; code and tests own the accepted behavior. Finalization keeps only the compact PASS evidence needed to audit the release fix.
4+
5+
## Goal
6+
7+
Prevent iOS from terminating Hourleaf after a successful Siri/App Intent write while preserving the exact persisted result and the existing local-first ledger.
8+
9+
## Acceptance criteria
10+
11+
- AC1: The physical build 16 failure is identified from a sanitized device crash receipt, including the termination class and its relationship to the Siri runs.
12+
- AC2: Service and credit App Intents each persist exactly one requested minute value through the shared command path, then release persistence resources before suspension.
13+
- AC3: A focused regression test fails for the unsafe lifecycle and passes for the corrected lifecycle without introducing another ledger writer or dependency.
14+
- AC4: Focused tests, the relevant full test suite, Release build, and release guard pass from current source.
15+
- AC5: A new signed TestFlight build on the same physical iPhone records one service and one credit entry with the exact prompt, and fresh crash-log comparison shows no new Hourleaf termination for either run.
16+
- AC6: The two build 16 diagnostic entries and any final-canary entries are removed through Hourleaf's interface; read-only persistence comparison proves no unrelated active entry changed.
17+
18+
## Constraints
19+
20+
- Preserve the production bundle ID, App Group, Core Data model, user records, notes, settings, and Watch packaging.
21+
- No new dependency, analytics, telemetry, direct database mutation, or destructive storage cleanup.
22+
- Keep private ledger values, identifiers, device identifiers, and raw crash reports out of Git and GitHub.
23+
- Do not attach or submit a build to App Store review until physical acceptance passes.
24+
25+
## Non-goals
26+
27+
- Redesign Siri phrasing, quick-entry UI, reporting rules, or CloudKit behavior.
28+
- Treat a Siri confirmation dialog as persistence proof.
29+
- Diagnose unrelated historical device crashes.
30+
31+
## Verification plan
32+
33+
1. Preserve a sanitized build 16 crash signature and exact before/after ledger deltas.
34+
2. Add the smallest lifecycle fix and a focused regression test.
35+
3. Run focused and full automated checks plus Release validation.
36+
4. Archive/upload a new build only after local proof and the existing release gate are current.
37+
5. Repeat both Siri actions on the physical device, compare the ledger and device crash logs, then remove canary entries through the UI and verify cleanup.

‎AppStore/release-checklist.md‎

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hourleaf delivery checklist
22

3-
## Active release: 1.0.4 (16)
3+
## Active release: 1.0.4 (17)
44

55
This active section is the maintained release contract. It is superseded when
66
the next version becomes the source candidate; dated receipts below remain
@@ -9,39 +9,55 @@ immutable history.
99
### Source and package
1010

1111
- [x] All iPhone, WidgetKit, and Watch shipping configurations use version
12-
`1.0.4` build `16`.
12+
`1.0.4` build `17`.
1313
- [x] Release guard and self-test pass.
14-
- [x] Full unit suite passes: 517 of 517 tests on the canonical iPhone 17 /
15-
iOS 26.5 simulator.
14+
- [x] Full unit suite passes: 523 of 523 tests on the canonical iPhone 17 /
15+
iOS 26.5 simulator; 53 of 53 app-owned UI tests also pass.
1616
- [x] Unsigned Release build contains the iPhone app, small/medium WidgetKit
1717
extension, and embedded Watch app.
18-
- [x] Signed App Store archive is created and inspected after owner
18+
- [ ] Signed App Store archive is created and inspected after owner
1919
authorization.
2020

2121
### Physical acceptance
2222

23-
- [x] Install build `16` without losing the existing iPhone ledger.
23+
- [ ] Install build `17` without losing the existing iPhone ledger.
2424
- [x] Add the small and medium Hourleaf widgets on iPhone using the build 15
2525
TestFlight baseline.
2626
- [ ] With the same Apple Account and a nearby iPhone, add the medium widget on
2727
Mac. The small Continuity widget is already verified.
2828
- [x] Verify Russian copy, opt-in totals,
2929
privacy redaction, refresh after an entry, and the quick-entry deep link.
30-
- [x] Verify the repaired production Shortcut route: two intentional service
31-
invocations created exactly two distinct one-minute service entries, with
32-
no duplicate write.
33-
- [ ] Verify that build 16 asks “Сколько минут?” and that both service and
34-
credit voice actions create the correct production entry.
30+
- [ ] Verify that build `17` asks “Сколько минут?” and that service and credit
31+
voice actions each create exactly one requested entry.
32+
- [ ] Compare fresh device crash logs after both actions and confirm no new
33+
Hourleaf `0xdead10cc` termination.
34+
- [ ] Remove the build `16` diagnostic entries and build `17` canaries through
35+
Hourleaf, then verify that no unrelated active entry changed.
3536

3637
### Owner-controlled distribution
3738

38-
- [x] Create the signed archive and inspect production entitlements.
39-
- [x] Upload build `16` to App Store Connect after explicit owner approval.
40-
- [x] Wait for App Store Connect processing and verify the build is ready for
39+
- [ ] Create the signed archive and inspect production entitlements.
40+
- [ ] Upload build `17` to App Store Connect after explicit owner approval.
41+
- [ ] Wait for App Store Connect processing and verify the build is ready for
4142
internal testing.
42-
- [ ] Attach build `16` to version `1.0.4`, save EN/RU/UK release notes, and
43+
- [ ] Attach build `17` to version `1.0.4`, save EN/RU/UK release notes, and
4344
submit only after explicit owner approval.
4445

46+
### Build 17 local candidate receipt — 2026-08-28
47+
48+
- Build `16` persisted both requested Siri entries correctly, but physical
49+
crash logs showed two separate `RUNNINGBOARD` `0xdead10cc` terminations after
50+
the actions. Matching dSYM symbolication placed both in the shared
51+
quick-surface file lock during host-app reconciliation.
52+
- Build `17` adds a balanced UIKit background assertion around only that short
53+
host-app reconciliation. It does not change the ledger writer, Core Data
54+
model, App Intent phrases, WidgetKit extension, or Watch app behavior.
55+
- Focused verification passed 38 of 38 tests. The complete source candidate
56+
passed 523 of 523 unit/integration tests and 53 of 53 app-owned UI tests.
57+
- Release guard, guard mutation self-test, and unsigned Release package
58+
inspection passed for build `17`. Signed archive, TestFlight processing, and
59+
physical crash-log acceptance remain pending their fresh receipts.
60+
4561
### Build 16 TestFlight receipt — 2026-08-28
4662

4763
- Source candidate: `079bed9b2a6bcf0c6d4a46418cc543b19aaeb43a`;

0 commit comments

Comments
 (0)