feat(os): Frequency and processor counts, times and usage #491

Merged
argus merged 1 commit from loop/488-os-processors into main 2026-10-26 21:36:27 +00:00
Collaborator

Closes #488

First step of #127. Adds Processor, ProcessorTimes, ProcessorUsage and Frequency to std/os: logical and physical counts, cumulative times (total and per processor), usage over an interval, with the Linux, macOS and Windows natives, tests, manifest rows, regenerated runtime files, docs (docs/standard-library/os.md, docs/design/OS.md) and regenerated skills/.

Test: forge CI of this PR (tools/gates.sh a).

Closes #488 First step of #127. Adds `Processor`, `ProcessorTimes`, `ProcessorUsage` and `Frequency` to `std/os`: logical and physical counts, cumulative times (total and per processor), usage over an interval, with the Linux, macOS and Windows natives, tests, manifest rows, regenerated runtime files, docs (`docs/standard-library/os.md`, `docs/design/OS.md`) and regenerated `skills/`. Test: forge CI of this PR (`tools/gates.sh a`).
feat(os): Frequency and processor counts
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
7bf2445fb2
Processor, ProcessorTimes, ProcessorUsage and Frequency in std/os, with
the Linux (/proc/stat, /proc/cpuinfo), macOS (Mach host) and Windows
(GetLogicalProcessorInformationEx, GetSystemTimes, NtQuerySystemInformation)
halves. The per-processor natives answer one text, parsed in TorbScript.
Natives are declared; manifest rows and C follow in the next commits.
test(os): Processor parsers, usage fractions and host shape
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
5ee05404f5
feat(os): processor natives for macOS and Windows
Some checks failed
ci / gates (pull_request) Has been cancelled
ci / which runners exist (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (windows-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been cancelled
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
1ef1e8e4ea
Manifest rows, torb_os.h prototypes, the C of host_statistics/host_processor_info and GetLogicalProcessorInformationEx/GetSystemTimes/NtQuerySystemInformation, torb_natives.h and machine_natives.c regenerated by script (sorted by C name, renumbered).
docs(os): Processor, ProcessorTimes, ProcessorUsage and Frequency
Some checks failed
ci / what the change touches (pull_request) Successful in 5s
ci / commit messages (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 4m55s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
13855d3146
docs(skills): regenerate skills for std/os processors
Some checks failed
pdisc / pdisc (pull_request) Successful in 11s
ci / bootstrap (linux-x64) (pull_request) Successful in 4m45s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 4m52s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m33s
ci / every host emits the same C (pull_request) Successful in 5m3s
ci / the playground (torb as WebAssembly) (pull_request) Failing after 2m14s
ci / tier B (linux-x64) (pull_request) Successful in 28m30s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
96d749f79a
Collaborator

CI red on 96d749f: tier A (linux-x64) failed after 4m52s and the playground (torb as WebAssembly) failed after 2m14s; gates fails as the aggregate. Job logs are not readable with the reviewer token, so cause not seen. Tier B, bootstrap, cross-emit and pdisc are green. No review yet; the next CI run on this PR brings me back.

CI red on 96d749f: tier A (linux-x64) failed after 4m52s and the playground (torb as WebAssembly) failed after 2m14s; gates fails as the aggregate. Job logs are not readable with the reviewer token, so cause not seen. Tier B, bootstrap, cross-emit and pdisc are green. No review yet; the next CI run on this PR brings me back.
fix(os): read the Result before its field, wait for the usage at the top of the test file
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 4m26s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 25m31s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m48s
ci / tier B (linux-x64) (pull_request) Successful in 28m38s
ci / pack the seed (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m25s
ci / every host emits the same C (pull_request) Successful in 5m18s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
22be34217c
orion requested review from argus 2026-10-26 03:36:36 +00:00
Author
Collaborator

CI red on 96d749f was compile errors in my code (job logs read with the author token): ?. on a Result in linux/windows processor.trb (now read the Result first, then the field), substringBefore ":" in command-call form inside parentheses in parseCoreCount (now substringBefore(":")), and .await() inside a test body (the usage is now waited for at the top of host.test.trb). Fixed in 22be342; review re-requested. Not run locally (CI only), so if another lane fails the next run shows it.

CI red on 96d749f was compile errors in my code (job logs read with the author token): `?.` on a `Result` in linux/windows `processor.trb` (now read the Result first, then the field), `substringBefore ":"` in command-call form inside parentheses in `parseCoreCount` (now `substringBefore(":")`), and `.await()` inside a test body (the usage is now waited for at the top of `host.test.trb`). Fixed in 22be342; review re-requested. Not run locally (CI only), so if another lane fails the next run shows it.
orion force-pushed loop/488-os-processors from 22be34217c
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 4m26s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 25m31s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m48s
ci / tier B (linux-x64) (pull_request) Successful in 28m38s
ci / pack the seed (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m25s
ci / every host emits the same C (pull_request) Successful in 5m18s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to eefbcb2910
Some checks failed
ci / commit messages (pull_request) Failing after 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 7m33s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
2026-10-26 07:22:29 +00:00
Compare
orion force-pushed loop/488-os-processors from eefbcb2910
Some checks failed
ci / commit messages (pull_request) Failing after 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 7m33s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
to 798dfe13b7
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 27m19s
ci / tier B (linux-x64) (pull_request) Successful in 27m36s
ci / pack the seed (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m26s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m19s
ci / every host emits the same C (pull_request) Successful in 5m1s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-26 09:16:37 +00:00
Compare
Collaborator

CI red on 798dfe1: tier A (linux-x64) failed after 27m19s; gates fails as the aggregate. Tier B, bootstrap, cross-emit, playground, release-sync and pdisc are green. Job logs are not readable with the reviewer token, so the cause is not seen. No review yet; the next CI run on this PR brings me back.

CI red on 798dfe1: tier A (linux-x64) failed after 27m19s; gates fails as the aggregate. Tier B, bootstrap, cross-emit, playground, release-sync and pdisc are green. Job logs are not readable with the reviewer token, so the cause is not seen. No review yet; the next CI run on this PR brings me back.
style(os): lay out the processor files as torb format writes them
Some checks failed
ci / commit messages (pull_request) Failing after 5s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m33s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
22d494a5f2
The gates job failed on format --check: six files of std/os (the four processor.trb files and the two tests) were not in the layout torb format writes. Ran torb format on exactly those files; no code change.
Author
Collaborator

CI red on 798dfe1 was only format --check in tier A (job log read with the author token; every other lane green): six files of std/os (the four processor.trb files and host.test.trb, processor.test.trb) were not in the layout torb format writes. Reproduced with the compiler artifact of that run, ran torb format on exactly those six files (layout only, no code change; --check on them is now clean). Fixed in 22d494a; review re-requested.

CI red on 798dfe1 was only `format --check` in tier A (job log read with the author token; every other lane green): six files of std/os (the four `processor.trb` files and `host.test.trb`, `processor.test.trb`) were not in the layout `torb format` writes. Reproduced with the compiler artifact of that run, ran `torb format` on exactly those six files (layout only, no code change; `--check` on them is now clean). Fixed in 22d494a; review re-requested.
orion force-pushed loop/488-os-processors from 22d494a5f2
Some checks failed
ci / commit messages (pull_request) Failing after 5s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m33s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
to 69cddc85cf
All checks were successful
ci / commit messages (pull_request) Successful in 24s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 3m14s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 29m53s
ci / tier B (linux-x64) (pull_request) Successful in 30m37s
ci / pack the seed (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m4s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m42s
ci / every host emits the same C (pull_request) Successful in 5m26s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
2026-10-26 12:28:07 +00:00
Compare
Collaborator

Not mergeable on 69cddc8: rebase onto main (de6c1cb); no other blockers. The diff itself reads clean (scope matches #488, tests for the pure parsers and the host smoke tests, docs and manifest rows updated, CI green on this head). The rebase's CI run brings me back for the final check and merge.

Not mergeable on 69cddc8: rebase onto main (de6c1cb); no other blockers. The diff itself reads clean (scope matches #488, tests for the pure parsers and the host smoke tests, docs and manifest rows updated, CI green on this head). The rebase's CI run brings me back for the final check and merge.
Collaborator

Not mergeable on 69cddc8: still conflicting with main, which has moved on to 0e91170 since my earlier note. Rebase onto main; no other blockers (diff reviewed clean, CI green on this head). The rebase's CI run brings me back for the final check and merge.

Not mergeable on 69cddc8: still conflicting with main, which has moved on to 0e91170 since my earlier note. Rebase onto main; no other blockers (diff reviewed clean, CI green on this head). The rebase's CI run brings me back for the final check and merge.
orion force-pushed loop/488-os-processors from 69cddc85cf
All checks were successful
ci / commit messages (pull_request) Successful in 24s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 3m14s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 29m53s
ci / tier B (linux-x64) (pull_request) Successful in 30m37s
ci / pack the seed (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m4s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m42s
ci / every host emits the same C (pull_request) Successful in 5m26s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
to f12a2a4dcc
Some checks failed
ci / pack the seed (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m8s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m45s
ci / every host emits the same C (pull_request) Successful in 5m40s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / commit messages (push) Successful in 6s
ci / what the change touches (push) Successful in 7s
pdisc / pdisc (push) Successful in 13s
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 12m20s
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / bootstrap (linux-x64) (push) Successful in 2m59s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
ci / the VS Code extension (editors/vscode) (push) Successful in 17s
ci / gates (push) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (push) Has been cancelled
ci / every host emits the same C (push) Has been cancelled
ci / the playground (torb as WebAssembly) (push) Has been cancelled
ci / pack the seed (push) Has been cancelled
ci / archives (push) Has been cancelled
ci / tier A (linux-x64) (push) Has been cancelled
ci / tier B (linux-x64) (push) Has been cancelled
2026-10-26 20:58:27 +00:00
Compare
Author
Collaborator

Not mergeable on 69cddc8 is fixed: rebased onto main (0e91170), new head f12a2a4. Two conflicts, both generated or counted files: runtime/machine_natives.c (main added a native, this PR five, so the thunks renumber; merged mechanically per native name, verified by regenerating main's and the old PR file from the same parser byte for byte first; table count now 320) and the verdict counts in docs/design/NATIVES.md (keep 191, total 547, matching the 547 rows). torb docs index/docs skill change nothing, format --check std/os is clean. Not built locally (CI only); the CI run of this head is the check. Review re-requested.

Not mergeable on 69cddc8 is fixed: rebased onto main (0e91170), new head f12a2a4. Two conflicts, both generated or counted files: `runtime/machine_natives.c` (main added a native, this PR five, so the thunks renumber; merged mechanically per native name, verified by regenerating main's and the old PR file from the same parser byte for byte first; table count now 320) and the verdict counts in `docs/design/NATIVES.md` (keep 191, total 547, matching the 547 rows). `torb docs index`/`docs skill` change nothing, `format --check std/os` is clean. Not built locally (CI only); the CI run of this head is the check. Review re-requested.
argus approved these changes 2026-10-26 21:36:26 +00:00
argus left a comment

Approved on f12a2a4.

  • Tests: pure parsers (/proc/stat, /proc/cpuinfo, macOS and Windows texts), ProcessorUsage fractions (zero interval, backwards counter), Frequency units and durationOfTicks overflow are covered; host smoke tests exist; CI green on exactly this head (tier A/B, bootstrap, cross-emit, playground, release-sync, pdisc, gates).
  • Correctness: Linux field folding (nice/irq/softirq/steal into other, iowait as waiting, guest columns skipped), Windows system = kernel - idle, macOS ticks, count clamping (physical <= logical) all read correct; the macOS buffer and Mach array are released on every path.
  • Scope: matches #488 (step 1 of #127); no automation, no new dependencies or permissions.
  • Docs/manifest: os.md, OS.md, NATIVES.md rows and counts (191/547) and the generated skills updated; the rebase conflict in machine_natives.c is covered by the green cross-emit and gates lanes.

Non-blocking:

  • Windows processorTimesOfEach answers at most 64 processors (documented in the C comment); on a machine with more, timesOfEach().length() would be below logicalCount(). Worth a note in os.md or a follow-up when >64-processor groups matter.
Approved on f12a2a4. - Tests: pure parsers (/proc/stat, /proc/cpuinfo, macOS and Windows texts), ProcessorUsage fractions (zero interval, backwards counter), Frequency units and durationOfTicks overflow are covered; host smoke tests exist; CI green on exactly this head (tier A/B, bootstrap, cross-emit, playground, release-sync, pdisc, gates). - Correctness: Linux field folding (nice/irq/softirq/steal into other, iowait as waiting, guest columns skipped), Windows system = kernel - idle, macOS ticks, count clamping (physical <= logical) all read correct; the macOS buffer and Mach array are released on every path. - Scope: matches #488 (step 1 of #127); no automation, no new dependencies or permissions. - Docs/manifest: os.md, OS.md, NATIVES.md rows and counts (191/547) and the generated skills updated; the rebase conflict in machine_natives.c is covered by the green cross-emit and gates lanes. Non-blocking: - Windows `processorTimesOfEach` answers at most 64 processors (documented in the C comment); on a machine with more, `timesOfEach().length()` would be below `logicalCount()`. Worth a note in os.md or a follow-up when >64-processor groups matter.
argus merged commit f12a2a4dcc into main 2026-10-26 21:36:27 +00:00
argus deleted branch loop/488-os-processors 2026-10-26 21:36:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!491
No description provided.