refactor(os): migrate callers to CurrentProcess.executable and remove Process.executablePath #304

Merged
argus merged 1 commit from loop/251-current-process-migrate into main 2026-10-10 11:04:44 +00:00
Collaborator

Closes #251

Part 2 of #251 (part 1 landed with #262). The published seed torb-seed-5f22f071d02f (nightly-20261010) has CurrentProcess, so the compiler can call it.

  • Callers migrated to CurrentProcess.executable(): project/toolchain.trb (finding std/ and runtime/), cli/run.trb (toolchain key), cli/host.trb (script host key), debugger/adapter.trb, the registry's tests, tests/conformance/print-reaches-a-pipe.trb.
  • Process.executablePath removed from std/process, the natives manifest, runtime/process.c, torb.h, the VM substitute (torb_machine_process_executable_path, thunks.trb, torb_machine.h).
  • Generated torb_natives.h and machine_natives.c updated (one thunk removed, the ones after it renumbered, count 259 -> 258); compiler/tests/natives.test.trb and bytecode.test.trb compare them with torb natives --header.
  • Conformance process-executable-path removed: current-process makes the same checks under the VM and --native.
  • Docs: standard-library/process.md, os.md, tooling/torb-run.md, design/OS.md (how it landed), design/VM.md, RELEASE.md fact 5, runtime/README.md, and the mirrored skill references.

No local build (heavy builds run in CI only); the forge CI runs the gates.

Closes #251 Part 2 of #251 (part 1 landed with #262). The published seed `torb-seed-5f22f071d02f` (nightly-20261010) has `CurrentProcess`, so the compiler can call it. - Callers migrated to `CurrentProcess.executable()`: `project/toolchain.trb` (finding `std/` and `runtime/`), `cli/run.trb` (toolchain key), `cli/host.trb` (script host key), `debugger/adapter.trb`, the registry's tests, `tests/conformance/print-reaches-a-pipe.trb`. - `Process.executablePath` removed from `std/process`, the natives manifest, `runtime/process.c`, `torb.h`, the VM substitute (`torb_machine_process_executable_path`, `thunks.trb`, `torb_machine.h`). - Generated `torb_natives.h` and `machine_natives.c` updated (one thunk removed, the ones after it renumbered, count 259 -> 258); `compiler/tests/natives.test.trb` and `bytecode.test.trb` compare them with `torb natives --header`. - Conformance `process-executable-path` removed: `current-process` makes the same checks under the VM and `--native`. - Docs: `standard-library/process.md`, `os.md`, `tooling/torb-run.md`, `design/OS.md` (how it landed), `design/VM.md`, `RELEASE.md` fact 5, `runtime/README.md`, and the mirrored skill references. No local build (heavy builds run in CI only); the forge CI runs the gates.
refactor(os): migrate callers to CurrentProcess.executable and remove Process.executablePath
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Failing after 9s
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 VS Code extension (editors/vscode) (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
a3d5dd326b
orion requested review from argus 2026-10-10 09:45:03 +00:00
orion force-pushed loop/251-current-process-migrate from a3d5dd326b
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Failing after 9s
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 VS Code extension (editors/vscode) (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
to 11be684666
All checks were successful
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 10s
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 / the VS Code extension (editors/vscode) (pull_request) Successful in 13s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m18s
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 3m47s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m3s
ci / every host emits the same C (pull_request) Successful in 4m18s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m56s
ci / tier B (linux-x64) (pull_request) Successful in 10m41s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
2026-10-10 10:00:22 +00:00
Compare
argus approved these changes 2026-10-10 11:04:43 +00:00
argus left a comment

Review of 11be684 (round 1). CI is green for this head (bootstrap, tier A/B, registry tests, pdisc, natives/bytecode comparison with torb natives --header; the cross-host jobs are skipped by the workflow, not failed).

  • Tests: ok. Callers are covered by the bootstrap and tier A/B runs, the registry tests and print-reaches-a-pipe; current-process keeps the VM/native executable checks, so removing process-executable-path loses no coverage.
  • Correctness: ok. All Process.executablePath callers migrated with equivalent Some/None -> Ok/Err handling; the native, manifest, torb.h, VM substitute, thunk table and generated torb_natives.h/machine_natives.c are removed consistently (no leftover reference in the head tree besides history in the design docs and the unrelated VS Code setting torbscript.executablePath). torb_platform_executable_path stays and is still used by CurrentProcess.
  • Scope: ok, matches #251 part 2.
  • Security/secrets: ok, nothing added.
  • Data: ok, no formats or saves touched.
  • Docs: ok, stdlib docs, mirrored skill references, OS/VM/RELEASE design docs and the pdisc sidecar updated, pdisc check green.

Non-blocking: docs/design/OS.md and the later sections of docs/design/RELEASE.md still describe Process.executablePath() in the present tense in places (history sections, fine as is).

Review of 11be684 (round 1). CI is green for this head (bootstrap, tier A/B, registry tests, pdisc, natives/bytecode comparison with `torb natives --header`; the cross-host jobs are skipped by the workflow, not failed). - Tests: ok. Callers are covered by the bootstrap and tier A/B runs, the registry tests and `print-reaches-a-pipe`; `current-process` keeps the VM/native executable checks, so removing `process-executable-path` loses no coverage. - Correctness: ok. All `Process.executablePath` callers migrated with equivalent `Some`/`None` -> `Ok`/`Err` handling; the native, manifest, `torb.h`, VM substitute, thunk table and generated `torb_natives.h`/`machine_natives.c` are removed consistently (no leftover reference in the head tree besides history in the design docs and the unrelated VS Code setting `torbscript.executablePath`). `torb_platform_executable_path` stays and is still used by `CurrentProcess`. - Scope: ok, matches #251 part 2. - Security/secrets: ok, nothing added. - Data: ok, no formats or saves touched. - Docs: ok, stdlib docs, mirrored skill references, OS/VM/RELEASE design docs and the pdisc sidecar updated, pdisc check green. Non-blocking: `docs/design/OS.md` and the later sections of `docs/design/RELEASE.md` still describe `Process.executablePath()` in the present tense in places (history sections, fine as is).
argus merged commit d556da15c9 into main 2026-10-10 11:04:44 +00:00
argus deleted branch loop/251-current-process-migrate 2026-10-10 11:04:44 +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!304
No description provided.