feat(doc): fail the check on a missing doc comment #384

Merged
argus merged 1 commit from loop/317-doc-check-fails-on-missing into main 2026-10-18 22:50:10 +00:00
Collaborator

Closes #317

What

A public construct that the standard asks a doc comment of and that has none is now a problem of torb doc --check, like a broken link: one line per construct (file:line: Type.member has no doc comment), sorted with the other problems, counted in the closing N problems, exit code 1. The separate N of M ... have no doc comment summary and reportMissing are dropped. The tier A gate doc --check --no-run std in tools/gates.sh therefore enforces the rule; no new gate.

  • compiler/src/reference/model.trb: Reference.undocumentedLines becomes missingDocumentationProblems (a DocumentationProblem per construct).
  • compiler/src/reference/command.trb: runDoc adds them to the problems; usage text and module comment updated.
  • Tests in compiler/tests/reference.test.trb: an undocumented required field fails with file and line, a fully documented package has no problem, and the member of an extend ... with Trait without a doc comment passes.
  • docs/tooling/torb-doc.md ("Missing doc comments", help text, example output), its copy in skills/, compiler/CONTRIBUTING.md, the tools/gates.sh comments and docs/ROADMAP.md (the strict check moves from open work to built, 2026-10-19).

No syntax, native, driver flag or looked-up std name changes, so the seed is untouched and uses no new language feature.

Test

Not run locally (no bootstrap or gates outside CI, orion/infra#947). Forge CI of this PR runs sh tools/gates.sh a, including doc --check --no-run std (must report 0 missing on main, #316 reported 0), docs skill --check, docs check docs and format --check. tools/check-commits.sh origin/main HEAD is clean.

Closes #317 ## What A public construct that the standard asks a doc comment of and that has none is now a problem of `torb doc --check`, like a broken link: one line per construct (`file:line: Type.member has no doc comment`), sorted with the other problems, counted in the closing `N problems`, exit code 1. The separate `N of M ... have no doc comment` summary and `reportMissing` are dropped. The tier A gate `doc --check --no-run std` in `tools/gates.sh` therefore enforces the rule; no new gate. - `compiler/src/reference/model.trb`: `Reference.undocumentedLines` becomes `missingDocumentationProblems` (a `DocumentationProblem` per construct). - `compiler/src/reference/command.trb`: `runDoc` adds them to the problems; usage text and module comment updated. - Tests in `compiler/tests/reference.test.trb`: an undocumented required field fails with file and line, a fully documented package has no problem, and the member of an `extend ... with Trait` without a doc comment passes. - `docs/tooling/torb-doc.md` ("Missing doc comments", help text, example output), its copy in `skills/`, `compiler/CONTRIBUTING.md`, the `tools/gates.sh` comments and `docs/ROADMAP.md` (the strict check moves from open work to built, 2026-10-19). No syntax, native, driver flag or looked-up std name changes, so the seed is untouched and uses no new language feature. ## Test Not run locally (no bootstrap or gates outside CI, orion/infra#947). Forge CI of this PR runs `sh tools/gates.sh a`, including `doc --check --no-run std` (must report 0 missing on `main`, #316 reported 0), `docs skill --check`, `docs check docs` and `format --check`. `tools/check-commits.sh origin/main HEAD` is clean.
feat(doc): fail the check on a missing doc comment
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Failing after 9s
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
c4693dee02
A public construct that the standard asks a doc comment of and that has none is now a problem of torb doc --check, one line per construct with its file and line, counted in the closing problems line. The tier A gate doc --check --no-run std enforces it. Docs, skills and the ROADMAP are updated.
orion force-pushed loop/317-doc-check-fails-on-missing from c4693dee02
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Failing after 9s
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
to 7b63923ad5
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
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
pdisc / pdisc (pull_request) Successful in 8s
ci / bootstrap (linux-x64) (pull_request) Failing after 6m36s
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 / tier A (linux-x64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 3s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-18 22:04:20 +00:00
Compare
orion force-pushed loop/317-doc-check-fails-on-missing from 7b63923ad5
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
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
pdisc / pdisc (pull_request) Successful in 8s
ci / bootstrap (linux-x64) (pull_request) Failing after 6m36s
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 / tier A (linux-x64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 3s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 381e6b507b
Some checks failed
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / bootstrap (linux-x64) (pull_request) Failing after 6m59s
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 / every host emits the same C (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 5s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-18 22:11:54 +00:00
Compare
orion force-pushed loop/317-doc-check-fails-on-missing from 381e6b507b
Some checks failed
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / bootstrap (linux-x64) (pull_request) Failing after 6m59s
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 / every host emits the same C (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 5s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 482c0b97a4
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
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
pdisc / pdisc (pull_request) Successful in 11s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m35s
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 / tier A (linux-x64) (pull_request) Failing after 5m32s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m50s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
2026-10-18 22:19:33 +00:00
Compare
orion force-pushed loop/317-doc-check-fails-on-missing from 482c0b97a4
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
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
pdisc / pdisc (pull_request) Successful in 11s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m35s
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 / tier A (linux-x64) (pull_request) Failing after 5m32s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m50s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
to 41b6874e60
All checks were successful
ci / tier B (linux-x64) (pull_request) Successful in 12m4s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Successful in 4m40s
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m2s
ci / gates (pull_request) Successful in 0s
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / commit messages (push) Successful in 4s
ci / what the change touches (push) Successful in 4s
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
pdisc / pdisc (push) Successful in 11s
ci / the VS Code extension (editors/vscode) (push) Successful in 15s
ci / bootstrap (linux-x64) (push) Successful in 3m32s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
ci / tier A (linux-x64) (push) Successful in 5m48s
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 11m35s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 2m54s
ci / every host emits the same C (push) Successful in 4m52s
ci / the playground (torb as WebAssembly) (push) Successful in 2m13s
ci / tier B (linux-x64) (push) Successful in 12m11s
ci / pack the seed (push) Has been skipped
ci / archives (push) Has been skipped
ci / gates (push) Successful in 0s
2026-10-18 22:32:00 +00:00
Compare
argus approved these changes 2026-10-18 22:50:09 +00:00
argus left a comment

Approved at 41b6874.

  • Tests: ok. Three tests in compiler/tests/reference.test.trb cover an undocumented required field (file, line, construct), a fully documented package, and the extend ... with Trait member that is not required. CI is green for this head, including tier A (doc --check --no-run std), tier B, pdisc and gates.
  • Correctness: ok. missingDocumentationProblems feeds runDoc's problem list, which is sorted and counted in the closing N problems (exit 1). reportMissing is removed together with its now-unused import.
  • Scope: ok. It matches #317 and the acceptance criteria. There is no new gate, and the seed is untouched with no new language feature.
  • Docs: ok. torb-doc.md and its skills/ copy, CONTRIBUTING.md, the gates.sh comments and ROADMAP are updated, and the pdisc sidecar hash/date match.
  • Security, data, workflows: nothing touched.
Approved at 41b6874. - Tests: ok. Three tests in `compiler/tests/reference.test.trb` cover an undocumented required field (file, line, construct), a fully documented package, and the `extend ... with Trait` member that is not required. CI is green for this head, including tier A (`doc --check --no-run std`), tier B, pdisc and gates. - Correctness: ok. `missingDocumentationProblems` feeds `runDoc`'s problem list, which is sorted and counted in the closing `N problems` (exit 1). `reportMissing` is removed together with its now-unused import. - Scope: ok. It matches #317 and the acceptance criteria. There is no new gate, and the seed is untouched with no new language feature. - Docs: ok. `torb-doc.md` and its `skills/` copy, `CONTRIBUTING.md`, the `gates.sh` comments and ROADMAP are updated, and the pdisc sidecar hash/date match. - Security, data, workflows: nothing touched.
argus merged commit 41b6874e60 into main 2026-10-18 22:50:10 +00:00
argus deleted branch loop/317-doc-check-fails-on-missing 2026-10-18 22:50:11 +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!384
No description provided.