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 f3e3db9
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
@@ -69,6 +69,7 @@ Phase 1 software progress is also underway:
69
69
-[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.
70
70
-[x] Notes confirms directory/TMP preparation before opening a writer and preserves each load/write failure through cleanup. Missing errno uses EIO; a failed open cannot become an empty editable note, and a stream-flagged positive write cannot publish. All 63 native file/fault cases and 12 real LVGL cases pass; the preceding callbacks fail 18 and six controls respectively. Exact final/backup/TMP bytes, blocked stale Save events, accepted existing-directory/missing-TMP responses and 25 failure/retry pairs are checked with closed resources and unchanged LVGL allocation counts. Logical directory/mount responses, faults and PSRAM APIs are controlled. CI retains source hashes and logs; physical SD/panel and power cuts remain open.
71
71
-[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.
72
+
-[x] Default ebook downloads capture their first write error independently of ignored SDK callback returns, stop later file writes and reject publication after failed chunks. Probe/TMP preparation failures preserve existing bytes; missing errno uses EIO and cleanup cannot replace the first cause. All 58 native callback/storage cases pass; the preceding callbacks fail 32 controls. All three default profiles, status/installation boundaries, retained TMPs, init/transport/status cleanup failures and 25 failure/retry/installed-recheck cycles are checked with closed controlled clients and native streams. Linux CI retains source hashes and logs. The unflashed firmware builds with the actual SDK; worker/timer scheduling, Wi-Fi/TLS, physical SD/panel and power cuts remain open.
72
73
-[x] Ride history and summary writers now isolate errno at every I/O boundary. Failed opens cannot become empty history or replace an existing index; flagged positive-count reads/writes stop before later parsing, writes or publication, preserving the first cause through cleanup. All 95 history and 41 recording cases pass; the preceding history callbacks fail 32 controls and the Stop flow fails one additional missing-errno source-open control. Exact generations, retained TMPs, four 25-pair failure/retry paths and successful reloads are checked with closed resources. A published ride remains saved when its index update fails, and the failure is reported separately. Logical directory/mount responses, UI, BLE data, time and faults are controlled. The unflashed firmware builds; physical SD/panel and power cuts remain open.
73
74
-[x] Ride Start checks both directories, stops on noncollision creation errors and preserves their first cause. Rejected headers/rows, periodic sync failures and known SD loss retain the named TMP and clear recording ownership without retrying publication. All 39 native recording/history/storage cases pass; the preceding source fails 27 controls. Exact CSV/index/backup bytes, 100-name limits, tick wrap and 25 same-second restart pairs are checked with closed streams/descriptors. Linux CI retains source hashes and logs. Physical SD, BLE, panel and power cuts remain open.
74
75
-[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.
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
@@ -109,6 +109,8 @@ Files directory browsing resets errno before each directory read so per-entry `s
109
109
110
110
The ebook library verifies regular-file metadata before offering a `.txt` entry, excluding matching directories and unconfirmed paths. Directory setup/open failures show their cause; read/stat/close failures keep confirmed rows visible with an incomplete-list warning. Fresh errno checks preserve the first failure, and failed or skipped listings cannot claim the library is empty. The existing 64-entry and 256-byte path bounds are disclosed. Native checks use an existing BOOKS directory with controlled UI, timer, SD, download and fault boundaries; welcome creation and physical storage remain separate checks.
111
111
112
+
Default ebook downloads keep the file pointer and first write error in a per-download stack context passed to the HTTP callback. The pinned SDK body parser ignores callback return codes, so this context stops later file writes and gates publication independently of the client result. Fresh errno at probe/preparation/write/close boundaries prevents stale causes; close/removal cannot overwrite a captured write error. Confirmed 2xx downloads still use the existing new-file commit helper. Callback state lives until SDK cleanup finishes, then file ownership is closed or consumed by storage. Native file tests control HTTP events and faults; the unflashed build checks the actual SDK interface. Worker/timer scheduling, Wi-Fi/TLS, physical SD and panel behavior remain separate checks.
113
+
112
114
Scope captures the first rejected header/row write before cleanup and closes an invalid temporary stream without attempting publication. I2C uses a shared finish path for explicit Stop and error cleanup: known row/flush/sync/SD failures close and release recording ownership, preserve the first cause, and report once; only a healthy Stop attempts publication. This prevents a successful retry during cleanup from turning an earlier failure into a Saved result. Native bytes and closed handles are checked with controlled UI/data/time/fault boundaries; sampling, drivers and physical SD behavior remain separate gates.
113
115
114
116
Scope and I2C constructors clear errno before each directory/metadata/open/stream boundary and stop on a non-collision failure. Scope closes the descriptor, attempts to remove its new empty TMP and reports a failed stream conversion without another filename attempt. I2C retains that empty file, and clears capture paths/ownership after a rejected header. Its watch flag is enabled only after an accepted header. Native constructor checks verify both 100-name bounds, retained-TMP restart, first errors and closed handles; existing path buffers, sample data, CSV formats and watch timing remain unchanged.
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
@@ -41,6 +41,8 @@ Choose a record from the current page and tap **COPY ROW** to put its original 1
41
41
42
42
The ebook library accepts case-insensitive `.txt` names only after confirming regular-file metadata, and skips directories or entries with failed metadata. It stores at most 64 paths of 256 bytes, disclosing filled slots and overlong names. Setup/open errors show their cause; read/stat/close errors mark retained confirmed entries incomplete and reach the SD callback with the first failure. The copy-books hint appears only after an error-free listing with no accepted or overlong entries. Native existing-directory checks cover these transitions with controlled UI, timer, mount and error boundaries; welcome creation and physical SD/panel behavior remain separate checks.
43
43
44
+
Default ebook downloads stop before opening a writer when the installation probe or old-TMP removal fails. Each write checks its own errno and stream flag, using EIO when a failure supplies no cause. The first failed chunk stops later file writes and prevents publication even if the HTTP client later reports success. A failed download attempts to close/remove its TMP and preserves the first storage error through cleanup; failed removal can retain partial bytes. Healthy 2xx downloads use the existing new-file sync/close/publication helper, which retains an unpublished TMP on commit failure and never overwrites an existing final. Native file checks use controlled HTTP events and faults; physical SD/TLS and power-loss behavior remain open.
45
+
44
46
Scope and I2C capture failures never retry publication during cleanup. Rejected header/row writes and failed I2C periodic flush/sync stop recording into the current TMP, close it, preserve the first cause and report failure. Known SD unavailability also closes an active I2C capture before adding another row. Healthy explicit saves still use the existing flush/sync/close/rename helper and CSV formats. A failed TMP can contain partial or complete-looking bytes; check the named file before recovery. Native byte/fault checks do not establish physical durability or power-loss recovery.
45
47
46
48
Scope and I2C creation advance through the 100 same-second names only on an existing CSV or TMP collision. Directory/stat/open/stream-creation failures stop the attempt, preserve the first cause through cleanup and use `EIO` when errno is absent. Scope attempts to remove its newly created empty TMP after a failed `fdopen`; I2C retains and names that empty file. A rejected I2C header retains its partial TMP and leaves capture ownership clear without enabling watch. Restart skips retained files and preserves their bytes; exhausting all names reports `EEXIST`.
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
@@ -17,6 +17,7 @@ Python 3 and Node.js are needed for the quick checks. The configuration checks a
17
17
| Ring heart-rate logging, saved timestamps or queue processing |[Ring history storage](#ring-history-storage) and a firmware build. |
18
18
| Ebook page loading or navigation |[Ebook pages](#ebook-pages) and a firmware build. |
19
19
| Ebook library enumeration |[Ebook library](#ebook-library) and a firmware build. |
20
+
| Default ebook downloads or their file publication |[Ebook downloads](#ebook-downloads) and a firmware build. |
20
21
| Scope/I2C CSV writes or publication |[Capture writers](#capture-writers) and a firmware build. |
21
22
| Scope/I2C capture or saved serial CSV viewers |[CSV viewer storage and UI](#csv-viewer-storage-and-ui), existing serial-copy checks and a firmware build. |
22
23
| Files fallback text previews |[Files text previews](#files-text-previews) and a firmware build. |
@@ -207,6 +208,18 @@ Windows Find APIs and POSIX directory APIs supply the entries; native dot entrie
207
208
208
209
The library retains 64 stored paths of 256 bytes. The entry-limit message means those slots filled; no extra read proves that more entries exist. Generated callback/config source, full main/function/test hashes and compile/result logs stay under `build/ebook-library/`. Linux CI retains `ebook-library-logs`, including available failure diagnostics. These 28 checks are separate from the Windows native total.
The portable runner compiles the actual `ebook_http_event`, `ebook_default_installed` and `ebook_download_default` functions, their actual book/download types and default profiles, and the complete `storage_io.c`. Its 58 native-file cases check all three default profiles, the existing 1,024-byte installation boundary, 200/299 success and 199/300/404 rejection, first-probe failures with existing or absent files, TMP removal/open failures, client-init/transport failures, rejected and full-count stream-flagged writes, flush/sync/close/publication errors, missing errno and compounded cleanup failures. Every case checks exact final/TMP bytes and no remaining controlled clients or file handles. Twenty-five rejected-write/retry/installed-recheck cycles verify recovery without a redundant client.
218
+
219
+
The preceding callbacks fail 32 controls. The transport adapter delivers all three data chunks even after the callback returns failure, matching the ignored data-callback return in the pinned SDK's body parser. The download keeps its first write cause in per-download state, stops later file writes and rejects publication even if the modeled client returns success. Cleanup cannot replace that cause; failed removal can leave a partial TMP. Separate init/transport/status cleanup controls report close/removal failures with their own cause, preserving the first close failure when removal also fails. Probe/preparation failures stop before a writer/client is opened, preserving existing files. Successful commit behavior, default URLs, TLS bundle, User-Agent, 30-second I/O timeout and 1,024-byte SDK buffer stay the same. An existing small final is preserved and leaves the completed download as an unpublished TMP when new-file publication refuses the collision.
220
+
221
+
Files are native; SDK types, events, status/transport results, SD error reporting and I/O faults are controlled. This fixture does not execute the SDK client, the download worker/timer, LVGL, Wi-Fi/TLS, physical SD or power-loss behavior. The unflashed firmware build checks the callback/config interface against the actual SDK. Generated callbacks/types/config/storage source, full input/executable hashes and compile/result logs stay under `build/ebook-download/`. Linux CI retains `ebook-download-logs`, including available failure diagnostics. These 58 cases are separate from the Windows native total.
0 commit comments