Skip to content

models: correct the lantern-box version in user_failures comments#8931

Merged
myleshorton merged 1 commit into
mainfrom
fisk/fix-user-failures-comment-version
Jul 25, 2026
Merged

models: correct the lantern-box version in user_failures comments#8931
myleshorton merged 1 commit into
mainfrom
fisk/fix-user-failures-comment-version

Conversation

@myleshorton

@myleshorton myleshorton commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #8929. Comments only — no behavior change.

The comments I added in #8929 name v0.0.104 as the lantern-box release that changed each user_failures entry from a bare RFC3339 string to a {"at", "kind"} object. Wrong: v0.0.104 was just the edge of the module cache I sampled. Verified against the actual tags:

lantern-box TagHistory.UserFailures
v0.0.99, v0.0.100 []time.Time
v0.0.101 … v0.0.106 []UserFailure
$ for v in v0.0.99 v0.0.100 v0.0.101 v0.0.104 v0.0.106; do
    printf '%-10s ' "$v"; git show "${v}:adapter/autoselect_history.go" | grep -E 'UserFailures\s+\[\]'
  done
v0.0.99     UserFailures []time.Time   `json:"user_failures,omitempty"`
v0.0.100    UserFailures []time.Time   `json:"user_failures,omitempty"`
v0.0.101    UserFailures []UserFailure `json:"user_failures,omitempty"`
v0.0.104    UserFailures []UserFailure `json:"user_failures,omitempty"`
v0.0.106    UserFailures []UserFailure `json:"user_failures,omitempty"`

The change is lantern-box #286 (b2c28bb, 2026-07-09), first tagged v0.0.101.

The whole job of these comments is to send a future reader to the version where the shape changed, so an off-by-three defeats their only purpose. #8929's description was corrected before merge; the comments and its commit message weren't. The commit message is immutable now — this fixes the code.

Four occurrences, all in comments:

  • lib/core/models/available_servers.dart — the _userFailureAt doc comment, and the toJson note about the pre-change shape
  • test/core/models/available_servers_test.dart — the user_failures deserialization group preamble (2)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Corrected version references for supported user_failures timestamp formats.
    • Clarified that both bare RFC3339 timestamps and object-form timestamps remain supported.

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 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 17:56
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dcbf26b4-0e4d-4fca-a184-b80224b48e6f

📥 Commits

Reviewing files that changed from the base of the PR and between 6fc4c97 and 7d5dcb3.

📒 Files selected for processing (2)
  • lib/core/models/available_servers.dart
  • test/core/models/available_servers_test.dart

📝 Walkthrough

Walkthrough

Updated SelectionHistory documentation and test comments to identify lantern-box v0.0.101 as the transition point between bare RFC3339 timestamps and object-form user_failures entries. No runtime behavior changed.

Changes

SelectionHistory timestamp documentation

Layer / File(s) Summary
Update timestamp migration references
lib/core/models/available_servers.dart, test/core/models/available_servers_test.dart
Model serialization comments and deserialization test documentation now reference lantern-box v0.0.101 for the timestamp format change.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • getlantern/lantern#8929: Updates SelectionHistory.fromJson to parse both legacy bare timestamps and {at, kind} objects.

Suggested reviewers: copilot, atavism

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the comments-only update correcting the lantern-box version in user_failures documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fisk/fix-user-failures-comment-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Corrects the lantern-box version referenced in user_failures documentation/comments so future readers are pointed to the actual release where the JSON shape changed (v0.0.101), without altering runtime behavior.

Changes:

  • Update user_failures deserialization test group comment to reference lantern-box v0.0.101 (was v0.0.104).
  • Update SelectionHistory documentation and toJson note to reference pre-/post-v0.0.101 shapes consistently.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/core/models/available_servers.dart Fixes version references in user_failures doc/toJson comments to match the actual lantern-box tag where the shape changed.
test/core/models/available_servers_test.dart Fixes version references in the user_failures deserialization test preamble comment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@myleshorton
myleshorton merged commit 65c165f into main Jul 25, 2026
10 checks passed
@myleshorton
myleshorton deleted the fisk/fix-user-failures-comment-version branch July 25, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants