Repository navigation
stats: running_processes counts foreground commands - #716
Conversation
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: 65d224b5d5
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 947c4ce17b
ℹ️ 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".
08d98b8 to
3a0eb27
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE9yc1n2RvseSR8ahH
3a0eb27 to
dad5b85
Compare
|
The Generated by Claude Code |
Wave 2 (#670), H-c1. Daemon bug fix (announced in the thread before this PR).
Cause
stats.running_processeswasSELECT count(*) FROM processes WHERE status='running'. Only background commands get aprocessesrow, so a foreground command holding one ofprocess_limit's slots showedrunning_processes: 0besideprocess_limit: 1. The docs say the bound covers foreground and background.Change
Registrycounts foreground commands while they hold a slot (Counted, an atomic increment on taking the slot and decrement on drop, beside the existingpendingcounter).statsreportsrunning_processes= the store's count (background commands not yet recorded, queued or running) + foreground commands running now.queued_processesunchanged and still a subset.Fast and light
One relaxed atomic add and sub per foreground command; no store work added;
statsreads one more atomic. Same cost at 1 bot or thousands.Tests
tests/test_runtime.py
test_running_processes_counts_a_foreground_command: 1 while a foregroundsleepruns, 0 after. Fails on main (0 while running). The background-command tests still pass.Upgrade notes
None. Monitors reading
running_processesnow see foreground commands.