From 7d5dcb34d86929787dd8c6dcdcf4c82332ca850e Mon Sep 17 00:00:00 2001 From: Adam Fisk Date: Sat, 25 Jul 2026 11:56:27 -0600 Subject: [PATCH] models: correct the lantern-box version in user_failures comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comments introduced in #8929 cite v0.0.104 as the release that changed each `user_failures` entry from a bare RFC3339 string to a {"at", "kind"} object. That was the edge of the module cache I sampled, not the actual boundary. Verified against the tags: v0.0.99, v0.0.100 UserFailures []time.Time v0.0.101 .. v0.0.106 UserFailures []UserFailure The change landed in lantern-box #286 (b2c28bb), first tagged v0.0.101. These comments exist to point a future reader at the version where the shape changed, so the wrong number defeats their only purpose. Comments only — no behavior change. Co-Authored-By: Claude --- lib/core/models/available_servers.dart | 4 ++-- test/core/models/available_servers_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/models/available_servers.dart b/lib/core/models/available_servers.dart index d6e4e92eab..b8a8510af2 100644 --- a/lib/core/models/available_servers.dart +++ b/lib/core/models/available_servers.dart @@ -268,7 +268,7 @@ class SelectionHistory { ); /// Timestamp of one `user_failures` entry, or null if it has none we can - /// read. lantern-box v0.0.104 changed each entry from a bare RFC3339 string + /// read. lantern-box v0.0.101 changed each entry from a bare RFC3339 string /// to a `{"at": ..., "kind": ...}` object; both are accepted so this parses /// against either version, matching Go's `UserFailure.UnmarshalJSON`. /// Unreadable entries are dropped rather than thrown on: one entry in the @@ -285,7 +285,7 @@ class SelectionHistory { if (lastOutcomeAt != null) "last_outcome_at": lastOutcomeAt!.toIso8601String(), "consecutive_failures": consecutiveFailures, - // Bare timestamps, i.e. the pre-v0.0.104 shape, which Go still accepts. + // Bare timestamps, i.e. the pre-v0.0.101 shape, which Go still accepts. // Nothing sends this back to Go today; emitting the object form would mean // inventing a `kind` we never parsed. if (userFailures.isNotEmpty) diff --git a/test/core/models/available_servers_test.dart b/test/core/models/available_servers_test.dart index 2316e9b16d..7b700d9422 100644 --- a/test/core/models/available_servers_test.dart +++ b/test/core/models/available_servers_test.dart @@ -263,10 +263,10 @@ void main() { }); group('user_failures deserialization', () { - // lantern-box v0.0.104 changed each entry from a bare RFC3339 timestamp to + // lantern-box v0.0.101 changed each entry from a bare RFC3339 timestamp to // a {"at": ..., "kind": ...} object. Both have to parse: the object form is // what current lantern-box sends, the string form is what a client paired - // with a pre-v0.0.104 one would see. + // with a pre-v0.0.101 one would see. test('parses the object form', () { final history = SelectionHistory.fromJson({ 'last_success_delay_ms': 2556,