registry: the documentation worker that runs torb doc for every version #17
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
The registry renders a package's reference with
torb doc --jsonfor every published version.Source
Acceptance criteria
torb doc --check --no-run)Dependencies
None known.
Moved from the planning lists of the docs; the design record stays the specification.
[loop:torbscript] intake: in scope (author orion, label loop). Registry doc worker per RELEASE.md section 7.11, in
tools/registry; security-relevant because it processes foreign packages (never executes them,--no-run), so opus/high worker plus architect review. Deploying the worker is outward-facing and not done by the loop. No collision with CONCEPT "Open Questions". Release freeze for 0.1.0 (2026-10-06) holds new PRs, next: refine (queued)[loop:torbscript] claim refine by session:loop-torbscript-20261008 until 2026-10-08T14:40:00Z
[loop:torbscript] owner decision: how the registry's documentation worker is built, served and reported (issue #17; RELEASE.md 7.7 and 7.11 leave the shape open and the result is public on packages.torb.dev).
What is settled (RELEASE.md 7.7, 7.11, torb-doc.md): the page of a version is
torb docof it; it runs none of the package's code (torb doc --check --no-run); the worker runs under time and memory limits; the worker is "the same program, or a second process, with the toolchain of every released version"; the files are static, served beside/indexand/archives.What is not settled (each is a choice a later reader of the registry depends on):
languageline names", but thelanguageline is a minimum version (RELEASE.md 3, no editions). The registry image carries one toolchain (the build stage's), not "every released version".torb doc --outputwrites a finished static site (index.html,search.js,reference.json, ...); 7.7 also says "rendered by the same site generator as torb.dev", which has no reader of the JSON model yet (RELEASE.md 6 calls that a follow-up). 7.7 names/<owner>/<name>/<version>/docs, the 7.11 diagram/docs.Options.
languageline is newer than the toolchain is rendered as soon as the registry image carries it; until then it ispending, not failed). (2) In-process: a queue table in the existing SQLite database, one worker task at a time,torb doc --check --no-runthentorb doc --outputrun as a child process throughsrc/program.trb's pipes, withulimit-style time and memory limits (defaults 120 s, 1 GiB, 50 MiB of output; configurable byREGISTRY_DOC_*). (3) Usetorb doc's own static site, written to<storage>/docs/<owner>/<name>/<version>/through the storage layer and written whole or not at all (rename of a finished directory), served atpackages.torb.dev/docs/<owner>/<name>/<version>/; the JSON-rendered site-generator look is a later issue. (4) Status in the database (pending,done,failedwith the first lines of the problem list and the attempt count), exposed read-only asGET /api/1/packages/<owner>/<name>/<version>/docsand linked from the version's page; the index is not touched. (5) A failure retries at most 3 times with growing delay, then staysfaileduntil a newer toolchain is deployed (operator re-queue endpoint) - never retried forever. Deployment of the new image stays the owner's.languagevalue (the literal reading of 7.7): more moving parts (a toolchain store fed by release-sync, a scheduler picking the toolchain) and a surface that grows with every release.docs-failed), so mirrors and clients see it: a public protocol change, hard to take back, and a render failure is operational data, not a fact about the release.Split after the answer (dependency-linked issues, label
loop): (i) the queue, status table and render step intools/registrywith tests; (ii) the status endpoint and the served path; (iii) docs: README "Not built yet" and RELEASE.md 7.7/7.11 updated to the chosen shape. Deploying the worker, the image and the server configuration are not loop work.Recommendation. Option A. Say "go A", "go B", "go C" or name the changes.
Question q1 for torben (decision, blocking): How should the registry's documentation worker be built, served and reported?
[loop:torbscript] refine: owner decision filed (q1), next: waiting (owner decision q1). Checked first: no answer by torben, no
[owner-answer], none recorded. Not ready: the toolchain choice, process shape, served URL and failure-report surface are open in RELEASE.md 7.7/7.11, and the result is public on packages.torb.dev. Size after the answer: three dependency-linked issues (queue/status/render intools/registry; status endpoint and served path; docs update), implementer opus/high plus architect review (foreign input), seed impact none expected. Refine worker usage: sonnet, about 90k tokens.[loop:torbscript] owner decision recorded (torben via WhatsApp, 2026-10-08 16:35 Europe/Berlin): "Okay" (option A).
Resolution: the registry's own newest toolchain, queue in SQLite, in-process worker,
torb docstatic site under/docs/<owner>/<name>/<version>/, failures in the database with a read endpoint, max 3 retries. Labelledready.[question-closed] q=q1 reason=answered-elsewhere
[loop:torbscript] claim implement by session:loop-torbscript-20261009 until 2026-10-09T04:04Z
[loop:torbscript] implement: PR #237, CI success, next: review (waiting on the merge gate argus)
Token usage: about 500k (implementer) plus about 200k (architect review and re-review).
Follow-ups filed: #233 (render isolation, before production), #234 (escape raw HTML in
torb doc, before production), #235 (inline head script vs CSP), #236 (smaller worker hardening and fairness items).Windowandwindows(CONCURRENCY slice F, gap 6) #4[loop:torbscript] review: CI on PR #237 died twice with a runner "context canceled" (dind docker.sock) after the tests had passed; there is no rerun endpoint, so the branch head was re-created with identical content (new head
4127482) to retrigger forge CI. next: waiting (CI running, then the merge gate argus)