fs: Into<Path> signatures (PATH slice 2) #68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
std/fstakesInto<Path>,listanswersList<Path>,IoError.pathbecomes aPath.Source
Acceptance criteria
stdand the compiler migratedDependencies
Slice 1 of PATH.md (
std/path) and the checker condition forInto<Path>receivers are onmain.Steps (epic: no
readyon this issue)Too large for one PR (about 40
std/fssignatures, ~130 files importstd/fs,IoError(...)is built at ~30 sites instd/fs,std/io,std/processand the compiler, and the lowering builds theIoErrorof a native from itspathparameter). Each step becomes its own issue just in time:Into<Path>,IoError.pathasPath(commit 1 of 2, seed rule) - #419 (landed as23bfecf; the published seed142293fd98contains it)std/fspath parameters takeInto<Path>(callers that pass aStringor a literal keep working; return types andIoError.pathunchanged) - #547 (landed, closed 2026-10-28)systemPath, runtime half:torb_file_system_pathand its manifest row (a new native, commit 1 of 2 of the seed rule) - #559 (landed as4b3045d, closed 2026-10-29; the published seed4b3045d313contains it)systemPath,std/fshalf:public fn systemPath(path: Path): Stringover the native (commit 2 of 2; needs a published seed that contains 2b) - #580 (landed as PR #583, closed 2026-10-29)IoError.pathbecomes aPath: the construction and read sites instd/fs,std/io,std/process,compiler/,tools/- #680listandabsolutePathanswerPathvalues: migrate the walkers that re-join names by hand; conformance programs of PATH.md section 6; PATH.md slice 2 marked doneNotes
Adds or changes a native, syntax or a name the compiler looks up: land it in two commits (teach both forms, refresh the seed, then migrate), as
CLAUDE.md"Seed and breaking changes" says.Moved from the planning lists of the docs; the design record stays the specification.
[loop:torbscript] intake: in scope (author orion, label loop), source PATH.md slice 2, not a duplicate, no collision with a design record. Changes signatures of
std/fsthat callers instdand the compiler use, so the two-commit rule applies if a name the compiler looks up changes; refine checks seed impact. next: refine, waiting (ready buffer full: #4, #163, #164, #223 are ready) until 2026-10-10T04:00:00Z[loop:torbscript] claim refine by session:loop-torbscript-20261023 until 2026-10-23T09:23:00Z
Into<Path>parameters and aPathinIoError.path(teach the compiler, commit 1 of 2 for #68) #419[loop:torbscript] refine: #68 is an epic, not one PR. PATH.md slice 2 is rated the highest-risk slice; it changes about 40
std/fssignatures and the type ofIoError.path(built at ~30 sites instd/fs,std/io,std/processand the compiler), and the lowering builds anIoErrorfrom the native'spathparameter, so the native side has to be taught first under the two-commit seed rule. Dependency checked: slice 1 (std/path) and the checker condition forInto<Path>receivers are onmain, so nothing blocks. Keyword search of open and closed issues (Into, Path, IoError, std/fs, PATH) found no duplicate. #68 body now carries the four steps as a checklist and has noreadylabel. Filed step 1 just in time as #419 (loop,ready): native parameters of typeInto<Path>andIoError.pathasPath, commit 1 of 2, nostdsignature touched. Steps 2 to 4 follow one by one; step 2 waits for the seed refresh, which stays Torben's. next: implement #419[loop:torbscript] claim refine by session:loop-torbscript-20261028 until 2026-10-28T16:22:28Z
[loop:torbscript] decided by the loop: step 1 (#419) is on main as
23bfecf(closed 2026-10-23), so the next step isstd/fsparameters, filed just in time as #547 (loop,ready). Reasoning: (1) Seed: step 2 of the old checklist said "after the seed refresh", but the newest published seed (142293fd98, head of seeds.txt) already contains23bfecf(git merge-base --is-ancestor), and CI bootstraps from the published seed, so no refresh by Torben is needed and nothing blocks. (2) Size: the old step 2 bundled the signatures withsystemPath;systemPathneeds a new native (runtime export oftorb_platform_system_pathas a String, manifest row), which is seed-touching under the two-commit rule, so it is split off as step 2b and #547 stays signatures only. (3) TheIoError.pathtype, thelist/absolutePathreturn types and the walkers stay out of #547; they are steps 3 and 4 (step 4 now namesabsolutePathtoo, as PATH.md section 6 lists it). Duplicate keyword search of open issues (Into, Path, std/fs, IoError, fs signature) found none; #146 (methods over free functions) is the only neighbour and does not cover these signatures. Checklist in the body updated: 1 ticked, 2 -> #547, 2b added. Owner decision: none, all internal and technical.[loop:torbscript] refine: epic #68 verified against main (step 1 landed, seed contains it), next step filed as #547 and ready; 2b, 3 and 4 follow just in time, one after the other. next: ready (#547)
[loop:torbscript] claim refine by session:loop-torbscript-20261029 until 2026-10-29T01:13:11Z
systemPathruntime native (step 2b of #68, commit 1 of 2) #559[loop:torbscript] decided by the loop: step 2 (#547) is closed and on
main(docs(fs)877b4bdf, test(fs)029f9449, the signatures before them), so the epic's next unblocked step is 2b, filed just in time as #559 (loop,ready). Reasoning: (1) Seed:torb_platform_system_pathexists only as a Windows C function answeringwchar_t *(declared under#if defined(_WIN32)inruntime/include/torb.h), andstd/fshas nosystemPath; aString-answeringsystemPaththerefore needs a new native, which is seed-touching. Under the two-commit rule the native (runtime function plus manifest row) is commit 1 and thestd/fswrapper is commit 2, which needs a published seed containing commit 1. So 2b is split into #559 (runtime half, nothing instd/compiler//tools/calls it) and a new checklist line 2c (the wrapper), which is filed only after the published seed contains #559. (2) Why not 3 or 4 first: they do not need a new native, but the epic orderssystemPathbefore them and #559 touches onlyruntime/and one manifest row, so it does not collide with them; 3 and 4 each rewrite many sites and follow one after the other. (3) Name:torb_file_system_path/fileSystemPathfollow thetorb_file_*andfile*convention of the neighbouring private natives. (4) Duplicate keyword search of open issues (systemPath, system path, Into, IoError, std/fs): none besides #68; #146 is unrelated. Owner decision: none, all internal and technical.[loop:torbscript] refine: epic #68 verified against
main: steps 1 (#419) and 2 (#547) landed; checklist now ticks 2 and splitssystemPathinto 2b (runtime half, #559, filed andready) and 2c (std/fswrapper, after a published seed contains #559); 3 and 4 follow just in time, one after the other. The epic has noreadylabel. Claim by session:loop-torbscript-20261029 released. Worker usage: about 70k tokens (Sonnet 5.5 refine worker). next: ready (#559)[loop:torbscript] claim refine by session:loop-torbscript-20261029 until 2026-10-29T13:51Z
systemPathin std/fs (step 2c of #68, commit 2 of 2) #580[loop:torbscript] decided by the loop: step 2b (#559) is closed and on
main(PR #560, merge4b3045d), so the epic's next unblocked step is 2c, filed just in time as #580 (loop,ready). Reasoning: (1) Seed: the newest published seed (4b3045d31334, head ofseeds.txt) is the merge commit of #560 itself, so it contains the nativetorb_file_system_pathand the manifest rowfileSystemPath; the two-commit rule's "refresh the seed" step is done and 2c is commit 2 of 2, which touches no seed-relevant name and needs no further refresh. (2) Size: 2c is onepublic fnplus one privatenative fndeclaration instd/fs, a test, and a PATH.md status sentence, one PR, one Conventional Commit (a seconddocs(fs)commit only if the skills regeneration is cleaner apart). (3) Why 2c before 3 and 4: it is the cheapest step, it is ready now, and it closes thesystemPathstrand of slice 2; steps 3 (IoError.pathasPath, ~30 sites acrossstd/fs,std/io,std/process,compiler/,tools/) and 4 (list,absolutePathand the walkers) rewrite many sites and should follow one after the other, not alongside. (4) Duplicate keyword search of open issues (systemPath, fileSystemPath, system path, Into, IoError, std/fs): none besides #68. Backlog gate: off (about 50 actionable against a limit of 1000), no ready issue without a PR was open, WIP is free. Owner decision: none, all internal and technical.[loop:torbscript] refine: epic #68 verified against
mainand the published seeds: steps 1 (#419), 2 (#547) and 2b (#559) landed and are ticked; the head seed4b3045d313contains 2b, so 2c is filed as #580 (loop,ready, no seed impact) and linked in the checklist. Steps 3 and 4 follow just in time, one after the other, after 2c. The epic has noreadylabel. Claim by session:loop-torbscript-20261029 released. Worker usage: about 60k tokens (Sonnet 5.5 refine worker). next: ready (#580)IoError.pathbecomes aPath(step 3 of #68) #680[loop:torbscript] refine: 2c landed (#580, PR #583), ticked. Step 3 is filed as #680 (loop, ready); step 4 follows after it.
next: ready (#680)
[loop:torbscript] wait: step 3 is in work as #680. The worker found the seed
4b3045d313cannot compile the full migration, so it opened the teaching half as PR #681 (native fileReadAllText, CI pending); the migration commit follows after a seed refresh. Step 4 comes after #680.next: waiting (step #680, PR #681)
[loop:torbscript] wait: PR #681 (teaching half of step 3) is merged. The migration of #680 (IoError.path as Path) is ready as local patches but needs a seed that knows
fileReadAllText: running theseedworkflow on main is Torben's step (outside the loop). Step 4 comes after #680.next: waiting (seed refresh by the owner, then the migration of #680)