Conversation
…ure for URL signing
…rious message formats
- make startup, shutdown, config, and plugin registration explicit - bound WebSocket concurrency and restore group member cache refresh - centralize black-box tests under test
Dev refactor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3db04e18a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| s.mu.Lock() | ||
| delete(s.dirtyDates, date) | ||
| s.mu.Unlock() |
There was a problem hiding this comment.
Do not clear dirtiness created during a flush
If a message updates this date after the snapshot is cloned but before this deletion, incrementMessage/addWordCounts sets dirtyDates[date] = true and this unconditional delete immediately erases that newer marker. When no later message arrives—or shutdown follows—the in-memory update is never written, so persisted statistics lose messages. Preserve a generation/version for the snapshot or only clear the flag while excluding concurrent updates.
Useful? React with 👍 / 👎.
| return | ||
| } | ||
|
|
||
| err = os.WriteFile("bili_info.dat", data, 0644) |
There was a problem hiding this comment.
Restrict persisted Bilibili credentials to the owner
On a multi-user Unix host with the usual umask, this creates bili_info.dat as mode 0644 even though it contains session-cookie values and the refresh token from BiliLogin. Other local users can therefore read and reuse the authenticated Bilibili session; write this credential file with owner-only permissions and also correct permissions on an existing file.
Useful? React with 👍 / 👎.
| plugin.mu.Lock() | ||
| func() { | ||
| defer recoverPlugin(plugin.Name, "stop") | ||
| if err := stopper.Stop(); err != nil { | ||
| log.Printf("Stop plugin %q: %v", plugin.Name, err) | ||
| } | ||
| }() | ||
| plugin.mu.Unlock() |
There was a problem hiding this comment.
Unblock plugin callbacks before locking them during shutdown
When the outbound queue is full, such as while the WebSocket is unavailable or writes are stalled, a callback can block on a bare send <- while holding plugin.mu. Canceling the worker context does not unblock that send, and Client.Run abandons the worker after its timeout; the deferred StopPlugins then waits forever here for enabled Stopper plugins such as JM or Statics, so SIGTERM never completes. Make plugin sends cancellation-aware or ensure the outbound queue is drained before acquiring this mutex.
Useful? React with 👍 / 👎.
Fix Bilibili live parsing and address PR #48 review findings
Summary
devbranch intomainfor v1.0.0.devbranch after merge.Validation
devGitHub Actions build has passed and the resulting program has been run successfully, as confirmed by the maintainer.devversions; merge commit3db04e1has the same tree as the priordevtip.Release
After merge, tag the resulting
maincommit asv1.0.0to run the release workflow.