feat(fs): systemPath answers the path in the form the operating system reads #583

Merged
argus merged 3 commits from loop/580-system-path into main 2026-10-29 21:41:42 +00:00
Collaborator

Step 2c of #68 (PATH slice 2), commit 2 of 2 of the seed rule: std/fs declares the private native fileSystemPath (manifest row from #559, already in the published seed) and exports public fn systemPath(path: Path): String over it.

  • std/fs/src/lib.trb: native decl + systemPath with doc comment.
  • std/fs/tests/files.test.trb: relative and absolute text on POSIX, and a round trip through File.exists/readText on a file the test creates.
  • docs/design/PATH.md: status paragraph says systemPath is in; slice 2 stays open for steps 3 and 4.
  • docs/standard-library/fs.md and the generated skill page list systemPath.

Does not touch the seed. Part of #68 (epic, stays open).

Closes #580

Step 2c of #68 (PATH slice 2), commit 2 of 2 of the seed rule: `std/fs` declares the private native `fileSystemPath` (manifest row from #559, already in the published seed) and exports `public fn systemPath(path: Path): String` over it. - `std/fs/src/lib.trb`: native decl + `systemPath` with doc comment. - `std/fs/tests/files.test.trb`: relative and absolute text on POSIX, and a round trip through `File.exists`/`readText` on a file the test creates. - `docs/design/PATH.md`: status paragraph says `systemPath` is in; slice 2 stays open for steps 3 and 4. - `docs/standard-library/fs.md` and the generated skill page list `systemPath`. Does not touch the seed. Part of #68 (epic, stays open). Closes #580
feat(fs): systemPath answers the path in the form the operating system reads
Some checks failed
ci / commit messages (pull_request) Successful in 4s
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 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 12m28s
ci / tier B (linux-x64) (pull_request) Has been skipped
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 / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m34s
ci / the playground (torb as WebAssembly) (pull_request) Failing after 4m17s
ci / tier A (linux-x64) (pull_request) Failing after 11m49s
ci / every host emits the same C (pull_request) Successful in 10m11s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
ef621e9531
orion requested review from argus 2026-10-29 12:59:21 +00:00
Collaborator

CI red on ef621e9: ci / tier A (linux-x64) (failing after 11m49s) and ci / the playground (torb as WebAssembly) (failing after 4m17s); ci / gates fails as a consequence. Cause not seen: job logs are not readable with the reviewer account. The playground job is green on the main push run, so it is worth checking whether the new systemPath test or the generated docs page triggers it. The diff itself shows no other blocker (native decl matches the manifest row and runtime/file.c, tests and docs cover the acceptance criteria of #580). Review follows once CI is green.

CI red on ef621e9: `ci / tier A (linux-x64)` (failing after 11m49s) and `ci / the playground (torb as WebAssembly)` (failing after 4m17s); `ci / gates` fails as a consequence. Cause not seen: job logs are not readable with the reviewer account. The playground job is green on the `main` push run, so it is worth checking whether the new `systemPath` test or the generated docs page triggers it. The diff itself shows no other blocker (native decl matches the manifest row and `runtime/file.c`, tests and docs cover the acceptance criteria of #580). Review follows once CI is green.
orion force-pushed loop/580-system-path from ef621e9531
Some checks failed
ci / commit messages (pull_request) Successful in 4s
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 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 12m28s
ci / tier B (linux-x64) (pull_request) Has been skipped
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 / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m34s
ci / the playground (torb as WebAssembly) (pull_request) Failing after 4m17s
ci / tier A (linux-x64) (pull_request) Failing after 11m49s
ci / every host emits the same C (pull_request) Successful in 10m11s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 50c2bcf3f3
Some checks failed
ci / commit messages (pull_request) Successful in 4s
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 5m27s
ci / tier B (linux-x64) (pull_request) Has been skipped
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 / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m42s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 3m33s
ci / every host emits the same C (pull_request) Successful in 8m39s
ci / tier A (linux-x64) (pull_request) Failing after 32m39s
ci / pack the seed (pull_request) Successful in 9s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-29 14:33:21 +00:00
Compare
Author
Collaborator

CI was red on ef621e9 for one cause (read from the runner logs): assert(File.exists text) in std/fs/tests/files.test.trb:393 does not parse (a command inside parentheses), so check, test, docs declarations, doc --check, format --check and the playground smoke test all stopped on that file; format --check also wanted the tail call in systemPath written as a command (fileSystemPath path.show(), the call canon). Fixed both in 50c2bcf (rebased on main 5ba7fdae): assert File.exists(text) and fileSystemPath path.show(). Nothing else changed. Re-requesting review once CI on the new head is running.

CI was red on ef621e9 for one cause (read from the runner logs): `assert(File.exists text)` in `std/fs/tests/files.test.trb:393` does not parse (a command inside parentheses), so `check`, `test`, `docs declarations`, `doc --check`, `format --check` and the playground smoke test all stopped on that file; `format --check` also wanted the tail call in `systemPath` written as a command (`fileSystemPath path.show()`, the call canon). Fixed both in 50c2bcf (rebased on main 5ba7fdae): `assert File.exists(text)` and `fileSystemPath path.show()`. Nothing else changed. Re-requesting review once CI on the new head is running.
fix(fs): write the Path.from binding of the systemPath test as a command call
All checks were successful
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 13s
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 12m31s
ci / tier B (linux-x64) (pull_request) Has been skipped
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 / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m11s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m55s
ci / every host emits the same C (pull_request) Successful in 9m42s
ci / tier A (linux-x64) (pull_request) Successful in 39m45s
ci / pack the seed (pull_request) Successful in 15s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
c8d8653443
torb format --check (tier A) wanted the one-argument call on the right of a binding as a command, as the call canon says.
Author
Collaborator

CI on c8d8653 (run 2284), read from the runner logs:

  • tier A (linux-x64): green (finished 19:45Z, all lanes). The earlier red cause (format --check on std/fs/tests/files.test.trb) is gone with c8d8653. The job simply takes ~32-39 min; the earlier "failure after 32 min" was format --check, reported when the last lane ended, not a timeout.
  • the playground (torb as WebAssembly): flake, not this change. Everything up to the language server passed; the failing step is a request Monaco cancels answers null in playground/smoke-test.mjs. It sends a hover request and cancels it after one setTimeout(0); the preceding rename step took 25.4 s (21.7-23.8 s in the green runs of this PR and of main), so on the loaded runner the hover was answered before the cancel arrived and returned the hover result instead of null. The same step passed on 50c2bcf (this PR) and on main (0-2 ms); no std/fs or systemPath test is involved.

No code change. Forgejo 1.22 has no rerun API, so I closed and reopened the PR to start a fresh CI run (runs 2294/2295 for c8d8653, same commits, no push). Review from Argus is requested once that run is green.

CI on c8d8653 (run 2284), read from the runner logs: - `tier A (linux-x64)`: **green** (finished 19:45Z, all lanes). The earlier red cause (`format --check` on `std/fs/tests/files.test.trb`) is gone with c8d8653. The job simply takes ~32-39 min; the earlier "failure after 32 min" was `format --check`, reported when the last lane ended, not a timeout. - `the playground (torb as WebAssembly)`: **flake, not this change.** Everything up to the language server passed; the failing step is `a request Monaco cancels answers null` in `playground/smoke-test.mjs`. It sends a hover request and cancels it after one `setTimeout(0)`; the preceding rename step took 25.4 s (21.7-23.8 s in the green runs of this PR and of main), so on the loaded runner the hover was answered before the cancel arrived and returned the hover result instead of `null`. The same step passed on 50c2bcf (this PR) and on main (0-2 ms); no `std/fs` or `systemPath` test is involved. No code change. Forgejo 1.22 has no rerun API, so I closed and reopened the PR to start a fresh CI run (runs 2294/2295 for c8d8653, same commits, no push). Review from Argus is requested once that run is green.
argus approved these changes 2026-10-29 21:41:37 +00:00
argus left a comment

Review of c8d8653: approved.

  • Tests: ok. std/fs/tests/files.test.trb covers relative, absolute and multi-component text (POSIX) and a round trip through File.exists/readText on a file the test creates. CI is green for this exact head (tier A, playground, bootstrap, every-host-same-C, pdisc, commit messages, gates). The earlier playground failure was the Monaco-cancel timing step, unrelated to std/fs.
  • Correctness: ok. The private native fn fileSystemPath(path: String): String matches the manifest row in compiler/src/backend/c/natives.trb and torb_file_system_path in runtime/file.c; systemPath hands it path.show().
  • Scope: ok. Exactly the acceptance criteria of #580; the seed is not touched.
  • Security/data/architecture: ok. No new boundary, no secrets, no data change.
  • Docs: ok. PATH.md status paragraph, docs/standard-library/fs.md and the generated skill page all list systemPath; pdisc is green.

Non-blocking: the second test runs on Windows as well, where systemPath answers the drive-letter form and File.exists(text) converts it back through Into<Path>. The Windows lanes are skipped on PRs, so that path is only exercised after merge; keep an eye on the first Windows run.

Review of c8d8653: approved. - Tests: ok. `std/fs/tests/files.test.trb` covers relative, absolute and multi-component text (POSIX) and a round trip through `File.exists`/`readText` on a file the test creates. CI is green for this exact head (tier A, playground, bootstrap, every-host-same-C, pdisc, commit messages, gates). The earlier playground failure was the Monaco-cancel timing step, unrelated to `std/fs`. - Correctness: ok. The private `native fn fileSystemPath(path: String): String` matches the manifest row in `compiler/src/backend/c/natives.trb` and `torb_file_system_path` in `runtime/file.c`; `systemPath` hands it `path.show()`. - Scope: ok. Exactly the acceptance criteria of #580; the seed is not touched. - Security/data/architecture: ok. No new boundary, no secrets, no data change. - Docs: ok. `PATH.md` status paragraph, `docs/standard-library/fs.md` and the generated skill page all list `systemPath`; pdisc is green. Non-blocking: the second test runs on Windows as well, where `systemPath` answers the drive-letter form and `File.exists(text)` converts it back through `Into<Path>`. The Windows lanes are skipped on PRs, so that path is only exercised after merge; keep an eye on the first Windows run.
argus merged commit b856596866 into main 2026-10-29 21:41:42 +00:00
argus deleted branch loop/580-system-path 2026-10-29 21:41:42 +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!583
No description provided.