Skip to content

ci: run the Go race detector on the control-loop packages - #1676

Merged
frahlg merged 4 commits into
masterfrom
agent-plan/race-in-ci
Oct 17, 2026
Merged

frahlg merged 4 commits into
masterfrom
agent-plan/race-in-ci

Conversation

@frahlg

@frahlg frahlg commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Add the Go race detector to CI for the 16 package trees that share state with the control loop. The required go test + vet check waits for it. Editing .github/scripts/race.sh alone now selects the Core jobs, and the classifier test covers that case.

Validation:

  • bash .github/scripts/test-change-classifier.sh
  • make verify (tests, vet and build)
  • The original race job passed in CI in 4 min 20 s. CI reruns on this revision.

The historical reproductions on the parents of #787 and #789 found races in test fixtures. They prove that -race detects those exercised races; they do not show a production race or establish coverage of ordering, restart or shutdown bugs. The proposed S2 lifecycle harness is outside this PR.

The race run skips only TestForecastRetentionLargeOverflowWithinScoringBudget, whose wall-clock assertion is unsuitable under race instrumentation. The plain Core job still runs it.

Part of #1679. CI-only change; no changeset. Remains draft for the owner's merge decision.

CI runs go test without -race. Agents report "race tests pass" from
local runs, and two races still merged: #787 and #789 fixed test fakes
that raced after landing. On their parent commits (ee416d1, 5d5f810)
this check fails with WARNING: DATA RACE.

.github/scripts/race.sh runs -race on the 16 package trees that share
state with the control loop. The same command runs locally and in the
new race job, which the required go test + vet check now waits for.
All of them pass on master today.
The race detector slows code 5-10x, so the 3-second retention budget in
TestForecastRetentionLargeOverflowWithinScoringBudget failed on CI with
no data race. The plain test job still enforces the budget.
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T05:46:14.761968Z 079b96e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@frahlg
frahlg merged commit 07ad1cb into master Oct 17, 2026
13 checks passed
frahlg added a commit that referenced this pull request Oct 17, 2026
…1679)

* docs: propose a stepwise plan to make FTW safe for agents to change

Agents write most of FTW, and review bots raised 1,150 findings on 573
of their pull requests. This plan groups those findings into recurring
mistake classes, proposes a structural fix for each at the highest level
that works, backtests each fix against the history, and orders the fixes
into independently mergeable steps. Steps 1, 2 and 4 are draft PRs
#1676, #1677 and #1678.

tools/agent-pitfalls holds the script and the labels so a reviewer can
rerun or spot-check every number.

* docs: keep the pitfall lever under docs/ so the PR stays docs-only

* docs: distinguish model estimates from executable evidence

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>

---------

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
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.

1 participant