mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
CI's `go test -race` flagged two races introduced over the recent extension work: 1. ext.commands / ext.tools were appended to from the read-loop goroutine without a lock, while Commands() / Tools() / HasCommand read them under m.mu. Same for the toolIndex pre-check. Fix: take m.mu around the appends and the index dedup so writers and readers serialise on the same lock. 2. assumeReadyAfterIdle read ext.lastFrameTime once on entry without the per-extension lock (the read inside the loop already had it). Fix: take ext.mu for the initial snapshot too. Verified locally with `go test -race ./...`; all packages pass. The corresponding CI run for the scratchpad-persistence commit failed for exactly these two races on linux + macos. |
||
|---|---|---|
| .. | ||
| extensions | ||
| modes | ||
| tools | ||
| args.go | ||
| botcmd.go | ||
| botcmd_unix.go | ||
| botcmd_windows.go | ||
| build.go | ||
| cli.go | ||
| config.go | ||
| extcmd.go | ||
| modelsync.go | ||
| rpc.go | ||
| systemprompt.go | ||
| update.go | ||