docs(design): receiver header for scripts (SCRIPT-RECEIVERS.md) #504

Merged
argus merged 2 commits from docs/adr-receiver-types into main 2026-10-26 23:16:20 +00:00
Collaborator

Design record only, no implementation. Decision: a script states its receiver in a first-line header receiver T from "path"; project.trb is reserved by name; load-site inference and "the first load decides" go away; LSP types scripts alone, browser contract torbscript/wantFiles/torbscript/files.

End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: https://git.dmb.zone/orion/infra/issues/2329).

Note: no torb is built in the authoring environment, so torb docs skill docs skills --check was not run; CI decides. Open question (header vs file name only) is posed on the epic.

Design record only, no implementation. Decision: a script states its receiver in a first-line header `receiver T from "path"`; `project.trb` is reserved by name; load-site inference and "the first load decides" go away; LSP types scripts alone, browser contract `torbscript/wantFiles`/`torbscript/files`. End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: https://git.dmb.zone/orion/infra/issues/2329). Note: no `torb` is built in the authoring environment, so `torb docs skill docs skills --check` was not run; CI decides. Open question (header vs file name only) is posed on the epic.
docs(design): record the receiver header for scripts
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 12s
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 3m23s
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 / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 30m20s
ci / pack the seed (pull_request) Successful in 13s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
8ac5e970c8
Author
Collaborator

Tracked by epic #505; slices #506-#511.

Tracked by epic #505; slices #506-#511.
Collaborator

CI red on 8ac5e97: ci / tier A (linux-x64) (-> gates) - docs index --check (and docs check) fail: "docs/design/index.md:1: The generated part of this index is not up to date. Run torb docs index". The hand-edited index.md must be regenerated with torb docs index and committed; the rest of tier A (compiler tests, format, std tests, lock) was green. No other blockers seen; the next CI run brings the review back.

CI red on 8ac5e97: ci / tier A (linux-x64) (-> gates) - `docs index --check` (and `docs check`) fail: "docs/design/index.md:1: The generated part of this index is not up to date. Run `torb docs index`". The hand-edited index.md must be regenerated with `torb docs index` and committed; the rest of tier A (compiler tests, format, std tests, lock) was green. No other blockers seen; the next CI run brings the review back.
orion force-pushed docs/adr-receiver-types from 8ac5e970c8
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 12s
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 3m23s
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 / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 30m20s
ci / pack the seed (pull_request) Successful in 13s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to b81b31f497
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 29m0s
ci / what the change touches (push) Successful in 6s
ci / pack the seed (pull_request) Successful in 11s
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
pdisc / pdisc (push) Successful in 11s
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap (linux-x64) (push) Successful in 3m20s
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 / the VS Code extension (editors/vscode) (push) Successful in 23s
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 12m0s
ci / tier A (linux-x64) (push) Successful in 29m11s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 3m16s
ci / every host emits the same C (push) Successful in 5m20s
ci / tier B (linux-x64) (push) Successful in 15m27s
ci / pack the seed (push) Has been skipped
ci / archives (push) Has been skipped
ci / the playground (torb as WebAssembly) (push) Successful in 2m35s
ci / gates (push) Successful in 0s
2026-10-26 22:27:44 +00:00
Compare
orion requested review from argus 2026-10-26 22:27:50 +00:00
argus approved these changes 2026-10-26 23:16:18 +00:00
argus left a comment

Approved on b81b31f.

Checklist:

  • Tests/CI: docs-only change; CI green on this head (tier A incl. docs index --check, pdisc, bootstrap). The earlier red index (8ac5e97) is fixed: docs/design/index.md lists the new record in both the frontmatter and the body.
  • Correctness: the design is internally consistent (header as the single source of a script's receiver, project.trb reserved by name, load-site conflict becomes a compile error, forward-only reads for the browser). Options A-D are weighed with a clear rationale.
  • Scope: design record only, nothing built; tracked by epic #505 and slices #506-#511, which the slice table mirrors.
  • Security: no secrets; the header is explicitly not an import and not a grant (sections 3 and 8).
  • Data/migration: pre-1.0 migration of all in-repo scripts is spelled out (section 6).
  • Docs: index.md and frontmatter/body are consistent; status line states that nothing is implemented.

Non-blocking:

  • [suggestion] The record cites orion/infra#2329, an issue in a tracker that is not public; consider describing the browser LSP work in words so the public design stands alone.
  • [suggestion] Section 10 leaves the header-vs-file-name question to the owner while the status says "proposed"; fine as is, just keep the status in sync once decided.
Approved on b81b31f. Checklist: - Tests/CI: docs-only change; CI green on this head (tier A incl. `docs index --check`, pdisc, bootstrap). The earlier red index (8ac5e97) is fixed: `docs/design/index.md` lists the new record in both the frontmatter and the body. - Correctness: the design is internally consistent (header as the single source of a script's receiver, `project.trb` reserved by name, load-site conflict becomes a compile error, forward-only reads for the browser). Options A-D are weighed with a clear rationale. - Scope: design record only, nothing built; tracked by epic #505 and slices #506-#511, which the slice table mirrors. - Security: no secrets; the header is explicitly not an import and not a grant (sections 3 and 8). - Data/migration: pre-1.0 migration of all in-repo scripts is spelled out (section 6). - Docs: index.md and frontmatter/body are consistent; status line states that nothing is implemented. Non-blocking: - [suggestion] The record cites `orion/infra#2329`, an issue in a tracker that is not public; consider describing the browser LSP work in words so the public design stands alone. - [suggestion] Section 10 leaves the header-vs-file-name question to the owner while the status says "proposed"; fine as is, just keep the status in sync once decided.
argus merged commit b81b31f497 into main 2026-10-26 23:16:20 +00:00
argus deleted branch docs/adr-receiver-types 2026-10-26 23:16:20 +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!504
No description provided.