diff options
| author | Luke Hoersten <[email protected]> | 2026-07-28 18:09:57 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-28 18:09:57 -0500 |
| commit | cf5eabb9647e6d53ec29a3f7de599a38dbfd5490 (patch) | |
| tree | 89fcd6f00437c168f042760cc605277a957efc16 /README.md | |
| parent | 4129dcaeceab060d9f1cac599e9e29cab0f44fd7 (diff) | |
Merge the two device state files and reduce mutation
The registry (device names) and service-state (sync results) were two
JSON files keyed the same way, split only for a TypeScript-compatibility
that is moot now that the fabric identity cannot migrate between
implementations. Merge them into one devices.json with a DeviceRecord per
node, which also removes the parallel-map join in status and collapses the
per-command load/store pairs. identity.json stays separate as a write-once
secret.
Also, from a reduction/immutability review:
- Fix with_timeout passing a literal "{what}" instead of the error context
- Drop needless mut: CompactDuration and parse_wall_clock become immutable
expressions; run_status filters with a predicate instead of a mutator;
sync_one extracts write_zone_and_dst; InspectOutcome gains Default plus a
failed() constructor
- Share a join_ids helper and a devices_path helper; add IdentityReport
From; minor combinator tidy-ups
35 unit tests, clippy clean.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -51,8 +51,9 @@ The same principles as the TypeScript implementation this replaces, plus the Rus connects retry three times with backoff, since an mDNS resolve answer can be lost per-attempt. - **Flat files, no database.** All state is plain files under `storagePath`: rs-matter's KV blobs (`matter/k_XXXX`, written atomically via temp+rename), `identity.json` (the root CA private key; - mode 0600), `nodes.json` (device registry), and `service-state.json` (per-node sync results). The - config and `service-state.json` are file-compatible with the TypeScript implementation. + mode 0600, written once and never touched by a sync), and `devices.json` (one record per + commissioned device: cached names plus latest sync results). The config is compatible with the + TypeScript implementation. - **Time is jiff end to end.** Timestamps are `jiff::Timestamp`; Matter-epoch microseconds exist only at the wire boundary. DST transitions come directly from the IANA tzdb transition table, never from offset probing. Time zones are IANA names, never fixed offsets. @@ -170,7 +171,7 @@ Then `sudo systemctl enable --now mattertimesync.timer` (2 minutes after boot, h ## Migrating from the TypeScript implementation -The config file and `service-state.json` carry over unchanged, but the **Matter fabric identity does +The config file carries over unchanged, but the **Matter fabric identity does not**: matter.js and rs-matter persist fabrics in different formats, and the device is paired to a key, not a storage path. Migration is one re-pairing: |
