book: Std pages, io, path, console (slice of #593) #656

Closed
opened 2026-10-30 01:48:38 +00:00 by orion · 8 comments
Collaborator

Slice of #593 (Std pages, system and I/O), which is a slice of the epic #582. Starts after nothing; #585 is merged. The other Std slices (#591, #592, #594, #595) and the Guide and Reference slices are independent of this one. Governing note: book/CONCEPT.md ("How a page is written", "What CI checks"). Touches the seed: no (documentation only; no syntax change, no native, no driver flag, no std name looked up by the compiler).

Goal

Write the Std page(s) book/std/io.md, book/std/path.md, book/std/console.md. Read like book/std/json.md (merged in #585): the page opens with what the module is for and an example of the most common task, then covers the handful of tasks people use it for, each with a real program and its output. It does not list every declaration; the generated API reference of torb doc std does that.

Replaces in docs/

  • docs/standard-library/io.md
  • docs/standard-library/path.md
  • docs/standard-library/console.md

Acceptance criteria

  • Every page has the kind page, status: stable, front matter in the shape of book/std/json.md (title, summary, order, package; the summary within the docs check limit), names its module (package: std/io, package: std/path, package: std/console), and is written as book/CONCEPT.md, "How a page is written", says: the first paragraph says in two to four sentences what the page covers, headings name ideas, prose first, no history words, no internal references (no issue numbers, no links into docs/design, docs/contributing, docs/internals, CONCEPT.md), no Related/Next/See also sections, lists of at most seven items, every section starts with a sentence; links only to book pages that exist on main
  • Every trb run and trb error block is followed by its output block with the real output (a trb error block shows what torb check prints, from error: on); no fragments, no // prints comments
  • The signature features of book/CONCEPT.md that the area touches are shown, not just named
  • book/std/index.md lists the new page(s) (generated block via torb docs index book); torb docs check book, torb docs index --check book and torb docs site book --check pass, and tools/gates.sh passes in CI
  • The old pages listed under "Replaces in docs/" are deleted in the same PR unless a skill is still built from them (skills are generated by torb docs skill docs skills): for every old page a skill still needs, it stays in docs/ unpublished and the PR description names it and why; the others are deleted together with every link to them, and the skills are regenerated so docs skill --check stays green
  • No other book page is changed except the links that must follow from the deletion; the other Std pages of #593 are not started

Notes for the implementer

  • Read book/CONCEPT.md, book/std/json.md and the old pages first; run every example with torb before pasting its output. A behaviour that only the old page states and that you cannot reproduce is checked against the compiler or the std source, not copied.
  • Commits: one or two Conventional Commits, for example docs(book): std io and, if needed, docs: retire the pages the std pages replace.
  • Size: one PR, 30-40 minutes. Do not write the other Std pages.
Slice of #593 (Std pages, system and I/O), which is a slice of the epic #582. Starts after nothing; #585 is merged. The other Std slices (#591, #592, #594, #595) and the Guide and Reference slices are independent of this one. Governing note: `book/CONCEPT.md` ("How a page is written", "What CI checks"). Touches the seed: no (documentation only; no syntax change, no native, no driver flag, no std name looked up by the compiler). ## Goal Write the Std page(s) `book/std/io.md`, `book/std/path.md`, `book/std/console.md`. Read like `book/std/json.md` (merged in #585): the page opens with what the module is for and an example of the most common task, then covers the handful of tasks people use it for, each with a real program and its output. It does not list every declaration; the generated API reference of `torb doc std` does that. ## Replaces in `docs/` - `docs/standard-library/io.md` - `docs/standard-library/path.md` - `docs/standard-library/console.md` ## Acceptance criteria - [ ] Every page has the kind `page`, `status: stable`, front matter in the shape of `book/std/json.md` (`title`, `summary`, `order`, `package`; the summary within the `docs check` limit), names its module (`package: std/io`, `package: std/path`, `package: std/console`), and is written as `book/CONCEPT.md`, "How a page is written", says: the first paragraph says in two to four sentences what the page covers, headings name ideas, prose first, no history words, no internal references (no issue numbers, no links into `docs/design`, `docs/contributing`, `docs/internals`, `CONCEPT.md`), no Related/Next/See also sections, lists of at most seven items, every section starts with a sentence; links only to book pages that exist on main - [ ] Every `trb run` and `trb error` block is followed by its `output` block with the real output (a `trb error` block shows what `torb check` prints, from `error:` on); no fragments, no `// prints` comments - [ ] The signature features of `book/CONCEPT.md` that the area touches are shown, not just named - [ ] `book/std/index.md` lists the new page(s) (generated block via `torb docs index book`); `torb docs check book`, `torb docs index --check book` and `torb docs site book --check` pass, and `tools/gates.sh` passes in CI - [ ] The old pages listed under "Replaces in `docs/`" are deleted in the same PR unless a skill is still built from them (skills are generated by `torb docs skill docs skills`): for every old page a skill still needs, it stays in `docs/` unpublished and the PR description names it and why; the others are deleted together with every link to them, and the skills are regenerated so `docs skill --check` stays green - [ ] No other book page is changed except the links that must follow from the deletion; the other Std pages of #593 are not started ## Notes for the implementer - Read `book/CONCEPT.md`, `book/std/json.md` and the old pages first; run every example with `torb` before pasting its output. A behaviour that only the old page states and that you cannot reproduce is checked against the compiler or the std source, not copied. - Commits: one or two Conventional Commits, for example `docs(book): std io` and, if needed, `docs: retire the pages the std pages replace`. - Size: one PR, 30-40 minutes. Do not write the other Std pages.
Author
Collaborator

[loop:torbscript] intake: in scope (label loop, slice of #593, book/std pages for io, path and console), not a duplicate, documentation only, no seed touch, no owner decision needed; the body states goal and acceptance. next: refine (waits while the ready buffer holds 4 or more issues)

[loop:torbscript] intake: in scope (label loop, slice of #593, book/std pages for io, path and console), not a duplicate, documentation only, no seed touch, no owner decision needed; the body states goal and acceptance. next: refine (waits while the ready buffer holds 4 or more issues)
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-656-re until 2026-11-15T22:25:00Z

[loop:torbscript] claim refine by session:loop-torbscript-656-re until 2026-11-15T22:25:00Z
Author
Collaborator

[loop:torbscript] release refine: ready

Checked against the definition of ready; no edit to the body was needed.

  • Goal and testable acceptance criteria: stated (page front matter, real output blocks, signature features shown, gates docs check, docs index --check, docs site --check, tools/gates.sh in CI).
  • Governing record: book/CONCEPT.md "How a page is written" plus the parent slice #593 (epic #582). Model page book/std/json.md exists on main.
  • Dependency: #585 is closed (merged), so nothing is open. The sibling slices #657 to #662 are independent.
  • Seed impact: stated, none (documentation only).
  • Size: three short pages (io 100 lines, path 140, console 67 in the old pages) in one PR, 1 or 2 Conventional Commits; fits the stated 30-40 minutes.
  • Replaced pages docs/standard-library/{io,path,console}.md exist; the deletion rule against the generated skills/ (torbscript-standard-library) is in the criteria.
  • No owner decision: no public statement, cost, product direction or reserved design question.

Next: implement.

[loop:torbscript] release refine: ready Checked against the definition of ready; no edit to the body was needed. - Goal and testable acceptance criteria: stated (page front matter, real `output` blocks, signature features shown, gates `docs check`, `docs index --check`, `docs site --check`, `tools/gates.sh` in CI). - Governing record: `book/CONCEPT.md` "How a page is written" plus the parent slice #593 (epic #582). Model page `book/std/json.md` exists on main. - Dependency: #585 is closed (merged), so nothing is open. The sibling slices #657 to #662 are independent. - Seed impact: stated, none (documentation only). - Size: three short pages (io 100 lines, path 140, console 67 in the old pages) in one PR, 1 or 2 Conventional Commits; fits the stated 30-40 minutes. - Replaced pages `docs/standard-library/{io,path,console}.md` exist; the deletion rule against the generated `skills/` (torbscript-standard-library) is in the criteria. - No owner decision: no public statement, cost, product direction or reserved design question. Next: implement.
Author
Collaborator

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

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

[loop:torbscript] release implement: #826

PR #826 adds book/std/path.md, io.md and console.md and the index entries; review requested from argus. The three old docs pages stay in docs/standard-library, unpublished, because the skill torbscript-standard-library is built from them. No local build ran; the PR description lists the outputs derived by hand from the std source that CI should confirm first (Path in JSON, print/addLine ordering, buffered end).

[loop:torbscript] release implement: https://git.torb.dev/torbscript/language/pulls/826 PR #826 adds book/std/path.md, io.md and console.md and the index entries; review requested from argus. The three old docs pages stay in docs/standard-library, unpublished, because the skill torbscript-standard-library is built from them. No local build ran; the PR description lists the outputs derived by hand from the std source that CI should confirm first (Path in JSON, print/addLine ordering, buffered end).
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-656-fix until 2026-11-16T04:50Z

[loop:torbscript] claim implement by session:loop-torbscript-656-fix until 2026-11-16T04:50Z
Author
Collaborator

[loop:torbscript] release implement: fix commit 52109a1 on loop/656-std-io-path-console (PR #826)

Cause: ci / tier A (linux-x64) and ci / gates failed on ce1eecb in docs check book (103 s, the only failing lane). The job log named six findings in the three new pages:

  • book/std/console.md:22: print ["Ada", "Grace"] parses as indexing; a list argument needs print(["Ada", "Grace"]).
  • book/std/io.md:94: the trb run block with standardOutput().buffered(capacity: 4096) and addLine fails in the native back end (internal error on the Sink<Buffer<UInt8>, Failure>.addLine instantiation, not a content error).
  • book/std/path.md:18: the word "usually" is rejected by the exact-wording rule.
  • book/std/path.md:33, :137, :274, :282: calls written with parentheses where the grammar allows a command call (Path.from ..., directory.joined ..., Site ...).

Fix (52109a1, docs(book): fix the docs check findings in std io, path and console, 3 files, tools/check-commits.sh 6b2b420 HEAD clean): parentheses added at console.md:22; the io.md buffered block is now trb check with its output shown as a console block (it still compiles, it just is not executed); "usually" reworded; the four calls in path.md written as command calls. The failing log shows only these findings; nothing else in the docs lanes failed (docs check, docs index --check, docs skill --check were not reported).

Not fixed: the native back end internal error on Sink.addLine over a Buffer is a compiler bug the page now only avoids. It is a separate follow-up and was not filed from this fix.

CI must show: on 52109a1 (runs 3093/3094 pending when this was written) ci / tier A (linux-x64) and ci / gates green, with docs check book passing. No local build was run; this fix was derived from the CI log of run 3076 (job tier A).

[loop:torbscript] release implement: fix commit 52109a1 on loop/656-std-io-path-console (PR #826) Cause: ci / tier A (linux-x64) and ci / gates failed on ce1eecb in `docs check book` (103 s, the only failing lane). The job log named six findings in the three new pages: - `book/std/console.md:22`: `print ["Ada", "Grace"]` parses as indexing; a list argument needs `print(["Ada", "Grace"])`. - `book/std/io.md:94`: the `trb run` block with `standardOutput().buffered(capacity: 4096)` and `addLine` fails in the native back end (internal error on the `Sink<Buffer<UInt8>, Failure>.addLine` instantiation, not a content error). - `book/std/path.md:18`: the word "usually" is rejected by the exact-wording rule. - `book/std/path.md:33`, `:137`, `:274`, `:282`: calls written with parentheses where the grammar allows a command call (`Path.from ...`, `directory.joined ...`, `Site ...`). Fix (52109a1, `docs(book): fix the docs check findings in std io, path and console`, 3 files, `tools/check-commits.sh 6b2b420 HEAD` clean): parentheses added at console.md:22; the io.md buffered block is now `trb check` with its output shown as a `console` block (it still compiles, it just is not executed); "usually" reworded; the four calls in path.md written as command calls. The failing log shows only these findings; nothing else in the docs lanes failed (`docs check`, `docs index --check`, `docs skill --check` were not reported). Not fixed: the native back end internal error on `Sink.addLine` over a `Buffer` is a compiler bug the page now only avoids. It is a separate follow-up and was not filed from this fix. CI must show: on 52109a1 (runs 3093/3094 pending when this was written) `ci / tier A (linux-x64)` and `ci / gates` green, with `docs check book` passing. No local build was run; this fix was derived from the CI log of run 3076 (job tier A).
Author
Collaborator

[loop:torbscript] implement: fix worker pushed the rebased head 1332212 to PR #826 (docs check findings fixed); forge CI on that head is pending and the merge gate has not reviewed it yet. next: waiting (CI on 1332212, then the merge gate)

[loop:torbscript] implement: fix worker pushed the rebased head 1332212 to PR #826 (docs check findings fixed); forge CI on that head is pending and the merge gate has not reviewed it yet. next: waiting (CI on 1332212, then the merge gate)
argus closed this issue 2026-11-16 06:26:26 +00:00
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#656
No description provided.