fs: IoError.path becomes a Path (step 3 of #68) #680

Closed
opened 2026-10-30 07:08:18 +00:00 by orion · 10 comments
Collaborator

Context

Step 3 of #68 (PATH slice 2): IoError.path becomes a Path. Steps 1 (#419), 2 (#547), 2b (#559) and 2c (#580, PR #583) are on main; the compiler already understands Path in IoError.path (step 1 taught the lowering both forms).

Source

Goal

Every construction and read site of IoError.path uses a Path: std/fs, std/io, std/process, compiler/ and tools/. The type of the field changes from String to Path; messages and describe output stay byte-identical.

Acceptance criteria

  • IoError.path is declared as Path; all IoError(...) construction sites (about 30 in std/fs, std/io, std/process, the compiler) pass a Path, and all read sites handle a Path.
  • The lowering that builds the IoError of a native from its path parameter yields the Path form (verify against what #419 landed before changing anything).
  • Tests in std/fs/tests cover the error path: the path of an IoError for a missing file reads back as the Path that was passed, and its text is unchanged.
  • docs/design/PATH.md status paragraph says step 3 is in; slice 2 stays open for step 4. Docs regenerated into skills/ as needed; tools/check-commits.sh clean; sh tools/gates.sh a green in forge CI.

Seed

Decide first, from CLAUDE.md "Seed and breaking changes": if the change needs a seed that does not exist yet (the field type changes in a form the published seed 4b3045d31334 cannot compile), do NOT land it in one go; push the teaching half as its own commit and report in the release comment what the seed refresh needs. If the published seed compiles both forms, one PR with one Conventional Commit (refactor(fs): IoError.path is a Path) is enough.

Dependencies

#68 steps 1 to 2c (all landed). Step 4 (list, absolutePath answer Path) follows this one.

Part of #68 (epic; do not close it).

## Context Step 3 of #68 (PATH slice 2): `IoError.path` becomes a `Path`. Steps 1 (#419), 2 (#547), 2b (#559) and 2c (#580, PR #583) are on `main`; the compiler already understands `Path` in `IoError.path` (step 1 taught the lowering both forms). ## Source - [PATH.md slice 2](https://git.torb.dev/torbscript/language/src/branch/main/docs/design/PATH.md#L665) - Epic #68, step 3. ## Goal Every construction and read site of `IoError.path` uses a `Path`: `std/fs`, `std/io`, `std/process`, `compiler/` and `tools/`. The type of the field changes from `String` to `Path`; messages and `describe` output stay byte-identical. ## Acceptance criteria - [ ] `IoError.path` is declared as `Path`; all `IoError(...)` construction sites (about 30 in `std/fs`, `std/io`, `std/process`, the compiler) pass a `Path`, and all read sites handle a `Path`. - [ ] The lowering that builds the `IoError` of a native from its `path` parameter yields the `Path` form (verify against what #419 landed before changing anything). - [ ] Tests in `std/fs/tests` cover the error path: the `path` of an `IoError` for a missing file reads back as the `Path` that was passed, and its text is unchanged. - [ ] `docs/design/PATH.md` status paragraph says step 3 is in; slice 2 stays open for step 4. Docs regenerated into `skills/` as needed; `tools/check-commits.sh` clean; `sh tools/gates.sh a` green in forge CI. ## Seed Decide first, from `CLAUDE.md` "Seed and breaking changes": if the change needs a seed that does not exist yet (the field type changes in a form the published seed `4b3045d31334` cannot compile), do NOT land it in one go; push the teaching half as its own commit and report in the release comment what the seed refresh needs. If the published seed compiles both forms, one PR with one Conventional Commit (`refactor(fs): IoError.path is a Path`) is enough. ## Dependencies #68 steps 1 to 2c (all landed). Step 4 (`list`, `absolutePath` answer `Path`) follows this one. Part of #68 (epic; do not close it).
Author
Collaborator

[loop:torbscript] ready: scoped from the epic; the seed question is the worker's first check.
next: ready
[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T13:00:00Z

[loop:torbscript] ready: scoped from the epic; the seed question is the worker's first check. next: ready [loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T13:00:00Z
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T13:00:00Z

[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T13:00:00Z
Author
Collaborator

[loop:torbscript] release: worker finished. The teaching half is PR #681 (head 74e0d095, native fileReadAllText, CI green, argus requested). The migration (IoError.path: Path across std/fs, std/io, std/process and compiler, File.readAll as a wrapper over fileReadAllText with a private ReadFailure, PATH.md and fs.md) is done and checked locally (torb check clean, std/fs 41/41) but cannot be pushed until the seed knows the new native. Patches are kept on the loop host. Order: merge #681, run the seed workflow on main, then a worker rebases and pushes the migration.
next: waiting (merge of PR #681, then seed refresh)

[loop:torbscript] release: worker finished. The teaching half is PR #681 (head 74e0d095, native `fileReadAllText`, CI green, argus requested). The migration (`IoError.path: Path` across std/fs, std/io, std/process and compiler, `File.readAll` as a wrapper over `fileReadAllText` with a private `ReadFailure`, PATH.md and fs.md) is done and checked locally (torb check clean, std/fs 41/41) but cannot be pushed until the seed knows the new native. Patches are kept on the loop host. Order: merge #681, run the `seed` workflow on main, then a worker rebases and pushes the migration. next: waiting (merge of PR #681, then seed refresh)
Author
Collaborator

[loop:torbscript] wait: PR #681 merged. Next is the seed refresh (Actions, seed, run on main), which is the owner's step; the migration commit is pushed by a worker after it.
next: waiting (seed refresh by the owner)

[loop:torbscript] wait: PR #681 merged. Next is the seed refresh (Actions, `seed`, run on main), which is the owner's step; the migration commit is pushed by a worker after it. next: waiting (seed refresh by the owner)
Author
Collaborator

[loop:torbscript] decision: the seed refresh (Actions workflow seed on main) is a technical step inside this project's own repo, so it is the agent's, not a question for the owner (triage row 3, orion/infra#2731). The wait on the owner is cleared. PR #681 is merged; the migration patches stay on the loop host. Next: an interactive agent turn runs the seed workflow on main, then a worker rebases and pushes the IoError.path: Path migration.
next: ready (seed refresh by the interactive agent, then migration push)

[loop:torbscript] decision: the seed refresh (Actions workflow `seed` on main) is a technical step inside this project's own repo, so it is the agent's, not a question for the owner (triage row 3, orion/infra#2731). The wait on the owner is cleared. PR #681 is merged; the migration patches stay on the loop host. Next: an interactive agent turn runs the `seed` workflow on main, then a worker rebases and pushes the `IoError.path: Path` migration. next: ready (seed refresh by the interactive agent, then migration push)
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-680-impl until 2026-11-16T02:10:00Z

[loop:torbscript] claim implement by session:loop-torbscript-680-impl until 2026-11-16T02:10:00Z
Author
Collaborator

[loop:torbscript] release implement: #822

Seed check: the newest published seed 56ea5b416df5 (seeds.txt, 2026-11-15) is built from a commit 157 commits after the merge of #681 (6ec3571c), and main HEAD 6b2b420a is 21 commits ahead of it, so the seed knows fileReadAllText; the migration lands as one commit refactor(fs): IoError.path is a Path. The old patches (base 4b6c139c) were applied onto current main: one conflict in File.list/namesOf resolved (kept main's namesOf, listStorage takes Into<Path>), plus new IoError(...) test sites fixed in std/fs/tests and tools/release-sync/tests. No local builds, gates or bootstrap run (CI only); only check-commits.sh was run locally and is clean. Review by argus requested.

next: waiting (forge CI and merge-gate review of PR 822)

[loop:torbscript] release implement: https://git.torb.dev/torbscript/language/pulls/822 Seed check: the newest published seed `56ea5b416df5` (seeds.txt, 2026-11-15) is built from a commit 157 commits after the merge of #681 (`6ec3571c`), and main HEAD `6b2b420a` is 21 commits ahead of it, so the seed knows `fileReadAllText`; the migration lands as one commit `refactor(fs): IoError.path is a Path`. The old patches (base 4b6c139c) were applied onto current main: one conflict in `File.list`/`namesOf` resolved (kept main's `namesOf`, `listStorage` takes `Into<Path>`), plus new `IoError(...)` test sites fixed in `std/fs/tests` and `tools/release-sync/tests`. No local builds, gates or bootstrap run (CI only); only `check-commits.sh` was run locally and is clean. Review by argus requested. next: waiting (forge CI and merge-gate review of PR 822)
Author
Collaborator

[loop:torbscript] claim review by session:loop-torbscript-680-fix until 2026-11-16T09:35:00Z

Reason: PR #822 (head 8305675) is mergeable but forge CI is red on ci / tier A (linux-x64), ci / tier B (linux-x64) and ci / tools/release-sync and tools/registry (linux-x64); the merge gate (argus) has only a pending review request. A fix worker reads the failed runs, fixes the branch and re-checks CI.

[loop:torbscript] claim review by session:loop-torbscript-680-fix until 2026-11-16T09:35:00Z Reason: PR #822 (head 8305675) is mergeable but forge CI is red on `ci / tier A (linux-x64)`, `ci / tier B (linux-x64)` and `ci / tools/release-sync and tools/registry (linux-x64)`; the merge gate (argus) has only a pending review request. A fix worker reads the failed runs, fixes the branch and re-checks CI.
Author
Collaborator

[loop:torbscript] checkpoint review by session:loop-torbscript-680-fix: PR #822 head 8305675d. The red tier A, tier B and release-sync/registry jobs were not a code failure: run 3102 was cancelled (no test failure in any log; the logs end together at 03:14Z) and PR #822 is mergeable, main only gained CLI/book commits that do not touch std/fs. I reran CI on the same head (run 3117/3167, no new commit). Since 03:33Z that run is still queued: the forge runner pool is saturated by long-running and queued runs of other PRs (3162, 3165, 3164 and a queue of 8+ runs). Next: wait for the queue, then read the CI result; if red, a code fix round follows. Claim kept until 2026-11-16T09:35:00Z.

[loop:torbscript] checkpoint review by session:loop-torbscript-680-fix: PR https://git.torb.dev/torbscript/language/pulls/822 head 8305675d. The red tier A, tier B and release-sync/registry jobs were not a code failure: run 3102 was cancelled (no test failure in any log; the logs end together at 03:14Z) and PR #822 is mergeable, main only gained CLI/book commits that do not touch std/fs. I reran CI on the same head (run 3117/3167, no new commit). Since 03:33Z that run is still queued: the forge runner pool is saturated by long-running and queued runs of other PRs (3162, 3165, 3164 and a queue of 8+ runs). Next: wait for the queue, then read the CI result; if red, a code fix round follows. Claim kept until 2026-11-16T09:35:00Z.
argus closed this issue 2026-11-16 06:36:32 +00:00
Author
Collaborator

[loop:torbscript] note: PR #822 landed as a merge commit (17298cd0), so main's push check 'ci / commit messages' is red (tools/check-commits.sh refuses merge commits; main is linear). Content is fine; the check clears with the next rebase or squash landing. Rewriting main needs a force push, which is Torben's call, not the loop's.
next: waiting (next landing on main)

[loop:torbscript] note: PR #822 landed as a merge commit (17298cd0), so main's push check 'ci / commit messages' is red (tools/check-commits.sh refuses merge commits; main is linear). Content is fine; the check clears with the next rebase or squash landing. Rewriting main needs a force push, which is Torben's call, not the loop's. next: waiting (next landing on main)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#680
No description provided.