Conversation
- chainStorage.Read cached to memory on error instead of success (inverted condition); now promotes successful persistent reads and no longer poisons the memory layer with zero values on failure - fileStorage.GetKeys propagates ReadDir errors (empty list only for a missing collection dir) - redisStorage.Write returns the HSet error instead of always nil - InitStorage/SetStorage/getStorage guard currentStorage with globalMu
- handleInteraction: skip block actions with an empty BlockActions slice - MessageRef.GetTime: handle timestamps without a microsecond part - ripeatlas: bounds-check hop Result entries before indexing [0..2] - retry: error out when the loaded history has no messages - traceroute: error on empty measurement list; raise scanner buffer to 1MB
- watcherCommand: guard the stopper map with a mutex - cron: map cron EntryID to its config so listing/scheduling stay aligned even when some crons fail to register; stop the scheduler on shutdown
startJob polled the queued build in an unbounded loop; now it respects context cancellation and gives up after 5 minutes instead of hanging the goroutine forever
add priorityName/statusName helpers so tickets without a priority or status no longer panic on a nil pointer dereference
- truncateMessages walked oldest->newest and dropped the most recent messages (including the current prompt); now walks newest->oldest and keeps the tail - gate verbose request logging behind cfg.LogTexts - raise the stream scanner buffer to 1MB and surface scanner errors - use slices.Reverse for channel history ordering
- GetLocks returns value copies so callers can't mutate internal state by accident - Unlock returns ErrNoLockedResourceFound instead of silently succeeding - mark the expiry warning via markWarningSent under the lock (the previous copy mutation had no effect) - drop the redundant delete-before-write in ExtendLock
- JenkinsJobs.GetSortedNames uses slices.Sorted(maps.Keys) - random splits options with strings.Fields to ignore extra whitespace - sendMessage uses GetUser() consistently - list_command only replies on an actual pin error - then_command uses the mutex-guarded GetRunningCommand helper - request uses the unicode reaction convention and fixes help examples
- check and log the previously-ignored Socket.Ack error - rewrite two if-else chains as switch statements - use context-aware exec/http APIs in vcs and openai clients - fix overflow-prone rune conversion in storage test (strconv.Itoa) - exclude false positives in .golangci.yml: G117 on config secret field names, G705/G706 taint in the CLI/test mock, musttag on config dumps, noctx in tests, and pre-existing package names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A pass over the bot focused on robustness: fixing latent bugs, adding bounds/nil guards against panics, closing concurrency holes, and modernizing a few spots. 8 themed commits, 31 files. New unit tests cover the storage, token-truncation, retry, and ripeatlas fixes.
make test,make test-race, andmake lintall pass.Notable bug fixes
Write/ReadDirerrors that were previously swallowed, and guardcurrentStoragewith the existing mutex.EntryID; the scheduler is also stopped on shutdown.GetLocksreturned internal pointers (callers could mutate pool state); it now returns value snapshots. The expiry-warning flag was set on a copy and had no effect — now done atomically under lock.UnlockreturnsErrNoLockedResourceFoundinstead of silently succeeding.Panic guards
Bounds/nil checks before indexing in: interaction block actions, message timestamps (
MessageRef.GetTime), ripeatlas hop results, retry history, traceroute measurements, and nil jiraPriority/Status.Concurrency
stoppermap is now mutex-guarded.