You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 027b5b0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: ROADMAP.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,7 @@ Phase 1 software progress is also underway:
64
64
-[x] Notes and ride summaries use recoverable backup replacement; rides publish only after durable sync, and health logs repair incomplete final rows.
65
65
-[x] Notes loads complete files up to 65,535 bytes, replacing a silent 2,047-byte prefix. Recovery/read/close errors, oversized files and NUL data disable Save; byte-length and SD checks run before storage changes. Its launcher leave hook clears editor ownership. Four preceding-source controls reproduce full-note truncation; 36 native file/fault cases and five real LVGL cases pass, including maximum ASCII/UTF-8 notes and 25 reopens without retained resources in the unchanged 96 KiB pool. Linux and Windows CI retain separate source-bound evidence. Physical SD/panel and power cuts remain open.
66
66
-[x] Ride history reports recovery/open/read/close errors as unavailable instead of showing zero or partial totals. Summary appends check SD availability and preparation errors, reject failed read chunks before copying, and retain the first error through cleanup. All 50 native file/fault cases pass; the preceding callbacks fail 24 controls. Exact final/backup/temporary bytes and 25 reopens are checked with closed modeled handles. Linux CI retains source hashes and logs, and the unflashed firmware builds with unchanged configuration. Physical SD/panel and power cuts remain open.
67
+
-[x] Ring logging commits its saved timestamp only after tail recovery and a complete, successfully closed read. Failed loads retain queued samples and defer history requests until a successful retry; known SD unavailability also blocks a cached checkpoint. Appends check directory errors and preserve the first seek/tell/header/row error through close and repair. All 59 native file/queue/fault cases pass; the preceding callbacks fail 32 controls. Checks verify exact bytes, retry/deduplication, timeout handling while blocked and 25 checkpoint reopens with closed modeled handles. Linux CI retains source hashes and logs. Physical SD, BLE, panel and power cuts remain open.
67
68
-[x] Shared CSV tail recovery now scans backwards in 512-byte blocks. Eight previous-source controls exceed stdio seek budgets; a 64 KiB partial tail drops from 65,538 seeks to 130 with the same retained prefix. All 32 native byte/boundary/fault cases, original storage checks and five MQTT/HTTP logging cases pass with closed modeled handles. The unflashed firmware builds with unchanged configuration. Linux CI retains source hashes and compilation/result logs; physical SD timing and power cuts remain open.
68
69
-[x] Built-in SD paths, timestamps, units, 8.3-safe collision names, `.TMP`, and `.BAK` behavior are documented.
69
70
-[x] Persisted brightness choices, a dimmed two-minute screen, and configurable 5/10/30-minute or Never screen-off behavior are implemented.
Copy file name to clipboardExpand all lines: docs/architecture.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,8 @@ Notes uses a temporary PSRAM buffer to load an entire file of up to 65,535 bytes
87
87
88
88
Ride history shows totals only after recovery, reading and closing the summary succeed; a missing index is valid empty history. Storage errors display an unavailable message and update the shared SD error. Appending checks known SD availability, directory creation and temporary-file removal before copying. A failed read chunk is rejected before writing, and the first read/write/open error survives source/destination close and temporary cleanup failures. The existing replacement helper still owns sync, backup, publication and rollback. Native tests verify exact file bytes and closed modeled handles; physical FAT/SD and panel behavior remain open.
89
89
90
+
Ring's saved heart-rate timestamp becomes loaded only after incomplete-tail repair, seek/size checks, the expected bounded tail read and close succeed. Read or close errors leave the checkpoint unchanged and retryable. Its existing health timer retains queued samples and defers history requests until that load succeeds, then filters timestamps against the recovered checkpoint. Known SD unavailability blocks queue processing even when a checkpoint is cached; timeout state still advances before the storage gate. Appends preserve the first error through close and tail repair. Native files and controlled queue/timer/SD boundaries verify this behavior; physical SD, BLE and scheduling remain open.
91
+
90
92
See [Storage and compatibility contract](compatibility.md) and [Data formats](data-formats.md).
Copy file name to clipboardExpand all lines: docs/data-formats.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,8 @@ Heart-rate header:
59
59
unix_time,local_time,bpm
60
60
```
61
61
62
+
Ring loads its saved timestamp from the repaired final 512 bytes only after successful seek, size, complete read and close checks. A failed checkpoint load leaves queued samples pending and defers history requests until recovery; known SD unavailability also blocks a previously cached checkpoint. Directory and append failures preserve the first error through close and tail repair. An unconfirmed flush/sync/close can leave a complete row; a failed write or repair can retain an unfinished suffix. A retry can repeat a row whose persistence was unconfirmed, so consumers should use `unix_time` when handling duplicates. Native checks cover file bytes and controlled queue/error behavior; physical SD and BLE remain hardware checks.
Copy file name to clipboardExpand all lines: docs/testing.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ Python 3 and Node.js are needed for the quick checks. The configuration checks a
13
13
| Storage writes or incomplete CSV rows |[Core command reference](#core-command-reference), [CSV tail recovery](#csv-tail-recovery) and a firmware build. |
14
14
| Notes loading, saving or lifecycle |[Notes storage and UI](#notes-storage-and-ui) and a firmware build. |
15
15
| Ride history loading or summary appends |[Ride history storage](#ride-history-storage) and a firmware build. |
16
+
| Ring heart-rate logging, saved timestamps or queue processing |[Ring history storage](#ring-history-storage) and a firmware build. |
16
17
| Offline apps, SPI or I2C editor/result flows |[Offline and peripheral UI](#offline-and-peripheral-ui). |
17
18
| Serial, saved serial logs or RTU Frames |[Serial and RTU UI](#serial-and-rtu-ui). |
18
19
| Modbus TCP, NTP, Wake-on-LAN, UDP or HTTP fixtures |[Network fixtures and UI](#network-fixtures-and-ui). |
@@ -124,6 +125,18 @@ The preceding callbacks fail 24 controls, including misleading totals after reco
124
125
125
126
Generated callbacks/storage source, full main/function/storage/header/test hashes and compile/result logs stay under `build/ride-history/`. Linux CI runs the fixture and retains these files as `ride-history-logs`, including diagnostics when compilation or execution fails. Its 50 cases are separate from the Windows native total.
This portable fixture compiles the three actual Ring append/checkpoint/health-timer callbacks extracted from `main/main.c` and the complete `storage_io.c`. Its 59 cases use native files to check exact headers/rows, missing/empty logs, bounded long-tail loads, incomplete-tail repair, seek/size/read/close failures, short reads without an error flag, full-count reads with an error flag, stored SD errors and directory/append/flush/sync/close/repair faults. Every case verifies exact file bytes with no remaining modeled file handles. Twenty-five checkpoint reopens retain the same bytes and close every read.
135
+
136
+
The preceding callbacks fail 32 controls, including prematurely caching failed reads, consuming samples against an uncertain checkpoint, ignoring directory errors and losing seek/tell/header/row errors during close. Timer cases retain queued samples and stop history requests after failed loads, retry successfully without appending historical duplicates, clear recovered errors, retain a failed append for retry and update timeout state while storage is blocked. A cached checkpoint cannot bypass known SD unavailability. Missing I/O errno falls back to `EIO`, and an earlier successful seek cannot supply stale errno for a failed read. Sync/close errors can follow a complete append; repair failure can retain an unfinished suffix. These checks do not promise rollback, exactly-once logging or power-loss durability.
137
+
138
+
Queue/timer and SD error APIs are controlled, time conversion uses UTC for independently expected rows, and no BLE traffic occurs. They do not run FreeRTOS/NimBLE or establish physical SD removal/full-card behavior, radio delivery, scheduling or panel rendering. Generated callbacks/storage source, full main/function/storage/header/test hashes and compile/result logs stay under `build/ring-history/`. Linux CI retains these files as `ring-history-logs`, including compiler/test failures; the 59 cases are separate from the Windows native total.
0 commit comments