test: allocate capacity slot IDs atomically - #48
Conversation
go test -race on internal/state failed on a sibling branch because nextCapacitySlotID mutated a package-level uint32 from parallel tests. Use atomic.Uint32 so main cannot flake the same way.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fixes the remaining live race behind GitHub-ActionRunner CI failures.
go test -racefailed ondev/codex/qts-live-source-runner(33350226801) innextCapacitySlotID(internal/state/sqlite_test.go). That helper still doesslotCounter++onmain, so the same race can flake default-branch CI.This ports the isolated atomic counter already proven on that branch HEAD (
89f72e72, CI green). Localgo test -race -count=1 ./internal/state/passes.Historical failed runs on superseded SHAs (closed Dependabot branches, pre-#43 sanitization) cannot be rewritten; current
mainsanitization is already green after #43.