doc: make torb doc --check fail on a public construct without a doc comment #317

Closed
opened 2026-10-12 07:02:36 +00:00 by orion · 5 comments
Collaborator

Context

Last slice of #31. Once std/ has no undocumented required construct, the count in torb doc --check becomes a failure, and the existing tier A gate doc --check --no-run std (tools/gates.sh) then enforces it.

Source

Dependencies

Blocked by #311, #312, #313, #314, #315, #316 (merged; torb doc --check --no-run std on main must report 0 missing before this lands, otherwise the gate goes red).

Goal

A missing doc comment on a required public construct is a problem of --check, like a broken link.

Acceptance criteria

  • torb doc --check fails (exit 1, "N problems") for every required public construct without a doc comment, each finding naming file, line and construct (the listing of #311 becomes the problem list); the N of M ... have no doc comment line is dropped or kept as a summary.
  • Tests in compiler/tests/reference.test.trb: an undocumented required construct fails, a documented one and a non-required one (e.g. a member of extend ... with Trait) pass.
  • The gate doc --check --no-run std in tools/gates.sh is green on the PR (it is the gate that enforces the rule; no new gate needed). Comments in gates.sh, compiler/src/reference/command.trb and docs/tooling/torb-doc.md ("What --check does not fail on", the example output) updated; docs check docs green; skills/ regenerated.
  • ROADMAP "the strict torb doc --check" moves from open work to built, with the date.

Touches the seed?

No (a change of the doc tool's exit rule; no syntax, native, driver flag or looked-up std name). It must be confirmed that the seed compiler can still build the tool: no new language feature is used.

Size

One PR, one Conventional Commit feat(doc): fail the check on a missing doc comment. Sonnet/medium.

## Context Last slice of #31. Once `std/` has no undocumented required construct, the count in `torb doc --check` becomes a failure, and the existing tier A gate `doc --check --no-run std` (`tools/gates.sh`) then enforces it. ## Source - [ROADMAP.md, `torb doc`](https://git.torb.dev/torbscript/language/blob/main/docs/ROADMAP.md) and [tooling/torb-doc.md, "What `--check` does not fail on"](https://git.torb.dev/torbscript/language/blob/main/docs/tooling/torb-doc.md); standard: `compiler/CONTRIBUTING.md` (doc comments) ## Dependencies Blocked by #311, #312, #313, #314, #315, #316 (merged; `torb doc --check --no-run std` on `main` must report 0 missing before this lands, otherwise the gate goes red). ## Goal A missing doc comment on a required public construct is a problem of `--check`, like a broken link. ## Acceptance criteria - [ ] `torb doc --check` fails (exit 1, "N problems") for every required public construct without a doc comment, each finding naming file, line and construct (the listing of #311 becomes the problem list); the `N of M ... have no doc comment` line is dropped or kept as a summary. - [ ] Tests in `compiler/tests/reference.test.trb`: an undocumented required construct fails, a documented one and a non-required one (e.g. a member of `extend ... with Trait`) pass. - [ ] The gate `doc --check --no-run std` in `tools/gates.sh` is green on the PR (it is the gate that enforces the rule; no new gate needed). Comments in `gates.sh`, `compiler/src/reference/command.trb` and `docs/tooling/torb-doc.md` ("What `--check` does not fail on", the example output) updated; `docs check docs` green; `skills/` regenerated. - [ ] ROADMAP "the strict `torb doc --check`" moves from open work to built, with the date. ## Touches the seed? No (a change of the doc tool's exit rule; no syntax, native, driver flag or looked-up std name). It must be confirmed that the seed compiler can still build the tool: no new language feature is used. ## Size One PR, one Conventional Commit `feat(doc): fail the check on a missing doc comment`. Sonnet/medium.
Author
Collaborator

[loop:torbscript] refine: every dependency (#311 to #316) has landed on main (#316 via 4450da99d5, whose PR reported torb doc --check --no-run std at 0 missing). Goal, testable acceptance criteria and source are stated; one PR, no seed change. Labelled ready, next: implement

[loop:torbscript] refine: every dependency (#311 to #316) has landed on main (#316 via https://git.torb.dev/torbscript/language/commit/4450da99d59a8b9668f231f0b3b1525aeba0b60c, whose PR reported `torb doc --check --no-run std` at 0 missing). Goal, testable acceptance criteria and source are stated; one PR, no seed change. Labelled ready, next: implement
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261019 until 2026-10-19T04:00Z

[loop:torbscript] claim implement by session:loop-torbscript-20261019 until 2026-10-19T04:00Z
argus closed this issue 2026-10-18 22:50:11 +00:00
Author
Collaborator

[loop:torbscript] implement: torb doc --check now fails on a public construct without a doc comment (one problem line per construct with file and line, counted in the closing N problems; the summary line and reportMissing are gone; Reference.undocumentedLines became missingDocumentationProblems). Tests in compiler/tests/reference.test.trb cover an undocumented construct (fails with file:line), a documented package (passes) and the member of an extend ... with Trait (not required). Docs, the skills/ copy, CONTRIBUTING, the gates.sh comments and ROADMAP (strict check moved to built, 2026-10-19) updated; the CONTRIBUTING pdisc stamp refreshed. Forge CI went red twice on the runner action cache (shallow.lock in the act cache, the same flake hit a main push earlier) and once on format --check (canon command-call style, fixed); the final run is green, including doc --check --no-run std. PR #384 (one commit, Closes #317), CI green on 41b6874e60, next: review (waiting on merge gate argus). Claim released. Tokens: about 190k for this worker.

[loop:torbscript] implement: `torb doc --check` now fails on a public construct without a doc comment (one problem line per construct with file and line, counted in the closing `N problems`; the summary line and `reportMissing` are gone; `Reference.undocumentedLines` became `missingDocumentationProblems`). Tests in `compiler/tests/reference.test.trb` cover an undocumented construct (fails with file:line), a documented package (passes) and the member of an `extend ... with Trait` (not required). Docs, the `skills/` copy, CONTRIBUTING, the `gates.sh` comments and ROADMAP (strict check moved to built, 2026-10-19) updated; the CONTRIBUTING pdisc stamp refreshed. Forge CI went red twice on the runner action cache (`shallow.lock` in the act cache, the same flake hit a main push earlier) and once on `format --check` (canon command-call style, fixed); the final run is green, including `doc --check --no-run std`. PR https://git.torb.dev/torbscript/language/pulls/384 (one commit, `Closes #317`), CI green on 41b6874e60a6, next: review (waiting on merge gate argus). Claim released. Tokens: about 190k for this worker.
Author
Collaborator

[loop:torbscript] implement: update, PR #384 was approved and merged by argus while the worker wrote its report (landed as 41b6874e60, linear history). The PR CI was green before the merge; the push CI of main on that commit is still running. Next: close (main CI green on the landed commit, then close #317 with the commit link).

[loop:torbscript] implement: update, PR https://git.torb.dev/torbscript/language/pulls/384 was approved and merged by argus while the worker wrote its report (landed as https://git.torb.dev/torbscript/language/commit/41b6874e60a66822e1bfec403460d38fc149b7ed, linear history). The PR CI was green before the merge; the push CI of main on that commit is still running. Next: close (main CI green on the landed commit, then close #317 with the commit link).
Author
Collaborator

[loop:torbscript] close: landed as 41b6874e60 via #384; main CI on that commit is green. Issue closed, next: done

[loop:torbscript] close: landed as https://git.torb.dev/torbscript/language/commit/41b6874e60a66822e1bfec403460d38fc149b7ed via https://git.torb.dev/torbscript/language/pulls/384; main CI on that commit is green. Issue closed, next: done
Sign in to join this conversation.
No labels
loop
ready
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#317
No description provided.