Repository navigation
fix(skills): count the CPUs of a cgroup v2 quota for the TLC workers - #332
Conversation
check.sh read the CPU count from getconf, which counts every online CPU, also in a container whose cgroup v2 quota allows fewer. In a container with 96 online CPUs and a quota of 32, the 15 runs that expect pass got 6 TLC workers each, 90 threads for 32 CPUs. check.sh now takes the smaller of getconf and the quota in /sys/fs/cgroup/cpu.max, rounded up, and keeps getconf when the file is missing or reads max. It prints the CPU count and the workers of a run that expects pass.
|
@codex review |
|
@codex security review |
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. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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 Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Follow-up to #330.
What changed
check.shnow counts the CPUs of a cgroup v2 quota when it gives TLC workers to the runs that expect pass (.agents/skills/verify-session-lifecycle/scripts/check.sh).check.shread the CPU count fromgetconf _NPROCESSORS_ONLN. getconf counts every online CPU, also in a container whose cgroup v2 quota allows fewer. fix(host): stop the marker watch once the host has a new parent, give long TLC runs more workers #330 made this worse, because it divides that count among the runs that expect pass. My dev container has 96 online CPUs and a quota of 32 (/sys/fs/cgroup/cpu.maxreads3200000 100000). WithCHECK_JOBS=90, the 15 runs that expect pass each got 6 TLC workers: 90 threads for 32 CPUs.check.shreads/sys/fs/cgroup/cpu.max. When it reads<quota> <period>, the CPU count is the smaller of getconf andceil(quota / period). When the file is missing (macOS, cgroup v1, a host without a quota file) or readsmax, getconf stays.check.shnow prints one line before the TLC runs:CPUs: <n>. TLC workers of a run that expects pass: <m>.It shows the count in local runs and in the CI logs.coverage.jsonsync for thecheck.shhash.No change to the model, the facts, the CLI or the product code. CI runners have 4 vCPUs and no smaller quota, so CI gets the same workers as before.
Validation
I ran the new block alone with a test file in place of
cpu.max:cpu.maxmax 1000003200000 100000150000 10000050000 10000025000000 100000abc 100000CHECK_SHARD=2/8 CHECK_JOBS=12 check.sh --update-coverageon this machine printedCPUs: 32. TLC workers of a run that expects pass: 16.The 2 runs that expect pass ran with 16 workers (with 16 workersin theirtlc.out). Before this change, they would have got 48 (96 / 2). All results were as expected (rc 0).check.sh --drift-only:Covered code matches the sync record.bash -n check.shandshellcheck -S warning check.sh(0.11.0): clean.oxfmt --check .: clean.CI at f10d8d1: all 25 checks pass. The 8
lifecycle-modelshares ran all 90 runs (coverage.jsondiffers from the base) and took 7 to 31 min. Share 5 printedCPUs: 4. TLC workers of a run that expects pass: 2., the same workers as before this change.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh