Repository navigation
test(coderd/x/chatd): prove a busy chat family survives a chatd restart - #279
Conversation
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93fe63fca9
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd0bb101ef
ℹ️ 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".
|
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9178fab5de
ℹ️ 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".
…messages are queued
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Merged as 607a95b (squash, Gates on head 4e9afdb:
Not exercised: this PR adds a test only. No runtime code changed. |
Part of #252
What
Adds
TestChatFamilySurvivesRestartincoderd/x/chatd/fork_family_restart_test.go. It stops one chatd server under a busy family and starts a new server on the same database.The family at the moment of the stop:
wait_for_eventswatch of it.wait_agentcalls, one per worker. The test checks that each call runs: a pubsub wrapper on the first server counts the state subscription that each wait takes on its worker.message_family_chatto the busy coordinator after the coordinator committed its wait batch, so exactly two messages are queued and none is in its history yet.After the restart the test checks:
wait_agentresult from the coordinator,Experiments:
fork-nested-subagents,fork-family-messages,fork-chat-wakeups. The test uses the fake OpenAI model and the existing chatd test helpers. It runs in the fork-ci chat-tests job (./coderd/x/..., name matches(?i)chat).Cases found that duplicate work (follow-up PRs)
These are not in this test because they fail today. Each gets its own fix PR with a test that fails without the fix.
spawn_agentcall in a batch that the restart cuts runs again on replay and spawns a second child.message_agentcall in a batch that the restart cuts runs again on replay and delivers the message twice.Tests
flock ~/.fork-go.lock go test ./coderd/x/chatd -run 'TestChatFamilySurvivesRestart$' -count=3: ok (47s).-race -count=3: ok (49s).golangci-lint run ./coderd/x/chatd/...: no finding in the new file.Not covered
InFlightChatStaleAfterbefore it takes the chats.