Repository navigation
Conversation
Automated AI review: locale fix verifiedA/B-tested
No blocking issue found. One optional regression-test improvement: stub The live samples establish valid output, not exact before/after CPU measurement accuracy. Alternate awk modes, graphical behavior, and the full repository suite were not verified. |
|
Thanks, @Bartok9. The bug is real and forcing the C locale on The VM also showed a shape the parsing missed. Tests on the VM at 7fd1d3a: Second opinion: Codex Medium reviewed the change in two rounds. The first round found the I/O-wait case and the inherited- Nothing is left for you to do. This is waiting on the maintainer: the shell suite has those unrelated failures on base and the PR has no CI run yet. |
|
Thanks — 7fd1d3a is the right follow-up. Under Leaving the unrelated |
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryThe PR fixes CPU percentages under decimal-comma locales.
Bartok9 explained that the comma fixtures intentionally catch removal of the locale override. Greptile withdrew the previous finding. No new actionable issues were found. Reviews (2) · Last reviewed commit: "Split top's CPU line on commas, so a 100..." · Reviewed by Greptile |
|
Thanks for the locale fix and the glued Prefer landing #15109 (omarchybot): it runs |
|
Agreed — #15109 is the one to land. It already runs Nothing left to rebase onto it from here. I'll close this once #15109 merges so #12315 stays covered until then. |
top prints 84,3 id when LC_NUMERIC uses a comma. Stripping every comma turned that into 843 and then 100-843. Keep C locale for top, treat comma as a decimal, and match the id label even when it still has a trailing comma. Closes omacom#12315
top prints a 100.0 without a space after the comma before it, so a fully idle CPU arrives as "0.0 ni,100.0 id," and a CPU stuck on I/O as "0.0 id,100.0 wa,". Stripping the comma from the label and turning it into a decimal point in the value read the first as 100% CPU and found no idle field in the second. With top under LC_ALL=C a comma is only ever a separator, so turning each into a space before splitting handles both, and the loop goes back to what it was on quattro. The test copied the awk program and grepped the script for its own lines, so it passed whatever the command did. It now runs bin/omarchy-system-stats against a stub top that prints decimal commas unless started under the C locale, with LC_ALL cleared so an inherited C locale cannot hide a missing override, and covers the busy, fully idle and I/O wait shapes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
7fd1d3a to
6839675
Compare
|
@Bartok9, the maintainer merged #15109 into One thing here is not in #15109: the I/O-wait case in To land what is left, drop the Second opinion: Codex Medium read both diffs. It agreed this PR is not obsolete for the reason above, and checked that the merged parser returns 100% for the I/O-wait line and 0% for the fully idle one. It found nothing else. Its agreement came after my conclusion had been written down, so it is not guaranteed to be independent. This is waiting on you. |
omarchy-system-stats(no-arg path) parsedtop -bn1by deleting every comma, then doing100 - idle. UnderLC_NUMERIC=es_ES.UTF-8(and other decimal-comma locales) top prints84,3 id. That became843, then a huge negative CPU% (-743%and similar).This keeps
LC_ALL=C LC_NUMERIC=Cfor thetopcall, treats comma as a decimal on the idle field, and matches theidlabel even when it still has a trailing comma.--bar-widgetis unchanged (it reads/proc/stat).Closes #12315