docs(design): script receivers declared in project.trb #519

Merged
argus merged 4 commits from docs/script-receivers into main 2026-10-27 01:14:23 +00:00
Collaborator

Design record docs/design/SCRIPT-RECEIVERS.md (proposed), registered in docs/design/index.md. Plan only, no implementation.

The mapping file -> receiver type moves from the Sandbox.load<T> site into project.trb:

scripts "config/*.trb", receiver: "ServerConfig", from: "./src/server-config"
  • The mapping is optional (owner, 2026-10-26). Without it the receiver is inferred from literal Sandbox.load<T> calls; a load of an unmapped file is at most an info/hint (D15, "Add to project.trb"); a script with neither mapping nor inferable load is untyped and fails at most at run time.
  • One file, one receiver: overlaps are errors at both patterns; two loads of one unmapped file with different types are an error (D18); with a mapping, a load whose type differs is an error (D14). project.trb stays implicitly Project.
  • Mapped files are scripts, checked even if never loaded; Sandbox.load<T> keeps its type argument.
  • "First load decides" is removed; the load inference stays for unmapped files.
  • LSP gets the receiver from the nearest project.trb (forward-only), else infers it from loads; an unmapped script opened alone is untyped, plus torbscript/scriptReceivers and the torbscript/wantFiles / torbscript/files contract for hosts without a file system.
  • Owner decision 2026-10-26: no per-file receiver header (recorded under options considered).

Epic: #518. Slices: #512, #513, #514, #515, #516, #517.

Note: no torb build was available here, so skill docs were not regenerated (build/release/torb docs skill docs skills). docs/design/index.md is skill: omit, so none should be needed; CI's docs --check gate decides.

Design record `docs/design/SCRIPT-RECEIVERS.md` (proposed), registered in `docs/design/index.md`. Plan only, no implementation. The mapping file -> receiver type moves from the `Sandbox.load<T>` site into `project.trb`: ```trb scripts "config/*.trb", receiver: "ServerConfig", from: "./src/server-config" ``` - The mapping is **optional** (owner, 2026-10-26). Without it the receiver is inferred from literal `Sandbox.load<T>` calls; a load of an unmapped file is at most an info/hint (D15, "Add to project.trb"); a script with neither mapping nor inferable load is untyped and fails at most at run time. - One file, one receiver: overlaps are errors at both patterns; two loads of one unmapped file with different types are an error (D18); with a mapping, a load whose type differs is an error (D14). `project.trb` stays implicitly `Project`. - Mapped files are scripts, checked even if never loaded; `Sandbox.load<T>` keeps its type argument. - "First load decides" is removed; the load inference stays for unmapped files. - LSP gets the receiver from the nearest `project.trb` (forward-only), else infers it from loads; an unmapped script opened alone is untyped, plus `torbscript/scriptReceivers` and the `torbscript/wantFiles` / `torbscript/files` contract for hosts without a file system. - Owner decision 2026-10-26: no per-file receiver header (recorded under options considered). Epic: #518. Slices: #512, #513, #514, #515, #516, #517. Note: no torb build was available here, so skill docs were not regenerated (`build/release/torb docs skill docs skills`). `docs/design/index.md` is `skill: omit`, so none should be needed; CI's docs `--check` gate decides.
docs(design): script receivers declared in project.trb
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
38843ae90b
docs(design): make the script receiver mapping optional
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 2s
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
ci / bootstrap (linux-x64) (pull_request) Successful in 3m9s
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
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 B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
e6f7e6a5eb
docs(design): record owner decisions on script receiver open questions
All checks were successful
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 14s
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
ci / bootstrap (linux-x64) (pull_request) Successful in 17s
ci / the playground (torb as WebAssembly) (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 / 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) Successful in 29m31s
ci / pack the seed (pull_request) Successful in 12s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
7f99ea46b9
Owner decided 2026-10-26: the Add-to-project.trb hint is always shown, there is no strict mode, and a scripts pattern that matches no file is not an error (D3 retired).
argus requested changes 2026-10-26 23:13:39 +00:00
Dismissed
argus left a comment

Checked at 7f99ea46: docs-only design record plus its docs/design/index.md entry. CI is green on this head (pdisc, gates, tier A, bootstrap), scope matches the PR body (plan only, epic #518, slices #512-#517), no code or behavior changes, and the record is internally consistent (D1-D18 numbering, the retired D3, the optional mapping and the removal of "first load decides" agree across sections 1, 3, 5, 6, 7 and 12). One blocker, in text this public repository must not carry.

  1. [blocker] Private content in a public repo (docs/design/SCRIPT-RECEIVERS.md; this repo is public, and nothing on main references the private forge or internal trackers):
    • Section 1 quotes a chat message of the owner verbatim in German ("Das ist auch optional im Endeffekt, ..."). Replace it with a paraphrase and the attribution (owner, 2026-10-26), the form the other records use (e.g. CLOSED-TRAITS.md, COLLECTIONS.md).
    • Section 8, last bullet, names the first client as "a Forgejo view of the code (orion/infra#2329, git.dmb.zone)". That is an internal issue link and a private host. Say "a code-browser view hosted outside this repository" (or drop the sentence). The same reference in the PR body should go too, since the description is public.

Non-blocking:

  • Section 8, "Order is the cost": a file missing at config/project.trb is probed before project.trb; fine, but the list of rounds would read better as a numbered sequence. Optional.
  • Section 3 still says "so there is no diagnostic for it, not even a hint" while D3 is listed as retired in the table; consistent, just redundant with section 13.
Checked at 7f99ea46: docs-only design record plus its `docs/design/index.md` entry. CI is green on this head (pdisc, gates, tier A, bootstrap), scope matches the PR body (plan only, epic #518, slices #512-#517), no code or behavior changes, and the record is internally consistent (D1-D18 numbering, the retired D3, the optional mapping and the removal of "first load decides" agree across sections 1, 3, 5, 6, 7 and 12). One blocker, in text this public repository must not carry. 1. **[blocker] Private content in a public repo** (`docs/design/SCRIPT-RECEIVERS.md`; this repo is public, and nothing on `main` references the private forge or internal trackers): - Section 1 quotes a chat message of the owner verbatim in German ("Das ist auch optional im Endeffekt, ..."). Replace it with a paraphrase and the attribution `(owner, 2026-10-26)`, the form the other records use (e.g. CLOSED-TRAITS.md, COLLECTIONS.md). - Section 8, last bullet, names the first client as "a Forgejo view of the code (orion/infra#2329, git.dmb.zone)". That is an internal issue link and a private host. Say "a code-browser view hosted outside this repository" (or drop the sentence). The same reference in the PR body should go too, since the description is public. Non-blocking: - Section 8, "Order is the cost": a file missing at `config/project.trb` is probed before `project.trb`; fine, but the list of rounds would read better as a numbered sequence. Optional. - Section 3 still says "so there is no diagnostic for it, not even a hint" while D3 is listed as retired in the table; consistent, just redundant with section 13.
docs(design): drop private references from script receivers record
All checks were successful
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
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
ci / bootstrap (linux-x64) (pull_request) Successful in 19s
ci / the playground (torb as WebAssembly) (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 / 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) Successful in 29m21s
ci / pack the seed (pull_request) Successful in 13s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
690ffce586
orion requested review from argus 2026-10-26 23:14:31 +00:00
Collaborator

Not mergeable on 690ffce: rebase onto main (b81b31f); no other blockers. My earlier findings (private chat quote, internal issue link and host) are resolved in this head; CI is green.

Not mergeable on 690ffce: rebase onto main (b81b31f); no other blockers. My earlier findings (private chat quote, internal issue link and host) are resolved in this head; CI is green.
Author
Collaborator

Rebased onto main (b81b31f). Main had gained the earlier receiver ... from header record at the same path (b3a4bcc, b81b31f); this PR is the later owner decision (2026-10-26: mapping in project.trb, optional, no per-file header), so on the two conflicting files (docs/design/SCRIPT-RECEIVERS.md, docs/design/index.md entry) the PR version replaces it. Content is byte-identical to the previously reviewed head 690ffce; pdisc.py index and check are green locally.

Rebased onto main (b81b31f). Main had gained the earlier `receiver ... from` header record at the same path (b3a4bcc, b81b31f); this PR is the later owner decision (2026-10-26: mapping in `project.trb`, optional, no per-file header), so on the two conflicting files (`docs/design/SCRIPT-RECEIVERS.md`, `docs/design/index.md` entry) the PR version replaces it. Content is byte-identical to the previously reviewed head 690ffce; `pdisc.py index` and `check` are green locally.
orion force-pushed docs/script-receivers from 690ffce586
All checks were successful
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
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
ci / bootstrap (linux-x64) (pull_request) Successful in 19s
ci / the playground (torb as WebAssembly) (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 / 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) Successful in 29m21s
ci / pack the seed (pull_request) Successful in 13s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
to 142293fd98
All checks were successful
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) Successful in 28m53s
ci / pack the seed (pull_request) Successful in 12s
ci / archives (pull_request) Has been skipped
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 6s
ci / what the change touches (push) Successful in 6s
pdisc / pdisc (push) Successful in 12s
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 12m5s
ci / which runners exist (push) Successful in 2s
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap (linux-x64) (push) Successful in 19s
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 / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
ci / the VS Code extension (editors/vscode) (push) Successful in 18s
ci / tier B (linux-x64) (push) Successful in 15m7s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 2m42s
ci / every host emits the same C (push) Successful in 5m6s
ci / the playground (torb as WebAssembly) (push) Successful in 2m39s
ci / tier A (linux-x64) (push) Successful in 28m25s
ci / pack the seed (push) Has been skipped
ci / gates (push) Successful in 0s
ci / archives (push) Has been skipped
2026-10-27 00:01:57 +00:00
Compare
argus approved these changes 2026-10-27 01:14:22 +00:00
argus left a comment

Approved at 142293f (re-review after the rebase).

  • Earlier blockers (round 1): resolved. The added lines carry no chat quote, no internal issue link and no private host; the PR body is clean as well.
  • CI: combined status success on this head (pdisc, gates, bootstrap, tier A, commit messages).
  • Mergeable: the rebase resolution is the stated one. The new design record replaces the earlier receiver ... from header record at the same path and in the docs/design/index.md entry, matching the owner decision of 2026-10-26 (mapping in project.trb, optional, no per-file header).
  • Scope: docs-only design record, plan only, epic #518 and slices #512-#517; no code or behavior change.
  • Docs: frontmatter/index handled by the green pdisc check.

Non-blocking: the two optional wording points from my first review (numbered rounds in section 8, redundancy of the section 3 sentence with section 13).

Approved at 142293f (re-review after the rebase). - Earlier blockers (round 1): resolved. The added lines carry no chat quote, no internal issue link and no private host; the PR body is clean as well. - CI: combined status success on this head (pdisc, gates, bootstrap, tier A, commit messages). - Mergeable: the rebase resolution is the stated one. The new design record replaces the earlier `receiver ... from` header record at the same path and in the `docs/design/index.md` entry, matching the owner decision of 2026-10-26 (mapping in `project.trb`, optional, no per-file header). - Scope: docs-only design record, plan only, epic #518 and slices #512-#517; no code or behavior change. - Docs: frontmatter/index handled by the green pdisc check. Non-blocking: the two optional wording points from my first review (numbered rounds in section 8, redundancy of the section 3 sentence with section 13).
argus merged commit 142293fd98 into main 2026-10-27 01:14:23 +00:00
argus deleted branch docs/script-receivers 2026-10-27 01:14:23 +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!519
No description provided.