feat(package): torb vendor #320

Merged
argus merged 2 commits from loop/24-torb-vendor into main 2026-10-12 08:22:41 +00:00
Collaborator

Closes #24

torb vendor [--offline] [--project <dir>] copies every registry package the lock pins into vendor/<owner>/<name>/ after checking each tree hash (from the cache or fetched), before a file is written. project.trb gets one source ... path: line per copy, the lock is rewritten, and a second run changes nothing and says so. A dependency that left the graph leaves vendor/ and project.trb. --offline names the first package missing from the cache; no lock and path-only projects get their own messages. torb publish refuses a project that depends on a vendored copy.

  • compiler/src/package/vendor.trb, runVendor in cli/packages.trb, withSource/withoutSource in manifest-edit.trb with unit tests.
  • tools/vendor.sh (wired into tools/gates.sh): e2e against a file: registry fixture; the vendored project builds with an empty cache and no network, the same run fails before vendor.
  • Docs: docs/tooling/torb-vendor.md, index and the-torb-command.md, RELEASE.md 7.5 "As built", skills regenerated by hand (CI will show any drift).

Not run locally (no bootstrap): CI is the verification.

Closes #24 `torb vendor [--offline] [--project <dir>]` copies every registry package the lock pins into `vendor/<owner>/<name>/` after checking each tree hash (from the cache or fetched), before a file is written. `project.trb` gets one `source ... path:` line per copy, the lock is rewritten, and a second run changes nothing and says so. A dependency that left the graph leaves `vendor/` and `project.trb`. `--offline` names the first package missing from the cache; no lock and path-only projects get their own messages. `torb publish` refuses a project that depends on a vendored copy. - `compiler/src/package/vendor.trb`, `runVendor` in `cli/packages.trb`, `withSource`/`withoutSource` in `manifest-edit.trb` with unit tests. - `tools/vendor.sh` (wired into `tools/gates.sh`): e2e against a `file:` registry fixture; the vendored project builds with an empty cache and no network, the same run fails before `vendor`. - Docs: `docs/tooling/torb-vendor.md`, index and `the-torb-command.md`, RELEASE.md 7.5 "As built", skills regenerated by hand (CI will show any drift). Not run locally (no bootstrap): CI is the verification.
docs(tooling): torb vendor
Some checks failed
ci / commit messages (pull_request) Successful in 13s
ci / what the change touches (pull_request) Successful in 15s
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 / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m12s
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 4m14s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m39s
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 / every host emits the same C (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
c3854b4f7e
orion force-pushed loop/24-torb-vendor from c3854b4f7e
Some checks failed
ci / commit messages (pull_request) Successful in 13s
ci / what the change touches (pull_request) Successful in 15s
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 / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m12s
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 4m14s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m39s
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 / every host emits the same C (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
to dfd01e318e
All checks were successful
ci / commit messages (pull_request) Successful in 8s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m2s
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) Successful in 4m30s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m59s
ci / every host emits the same C (pull_request) Successful in 4m34s
ci / tier B (linux-x64) (pull_request) Successful in 11m10s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m57s
ci / gates (pull_request) Successful in 0s
2026-10-12 07:38:44 +00:00
Compare
argus approved these changes 2026-10-12 08:22:37 +00:00
argus left a comment

Reviewed at dfd01e3. CI is green on this head (gates includes the new tools/vendor.sh; pdisc green).

  • Tests: unit tests for withSource/withoutSource; e2e tools/vendor.sh wired into gates (offline build with empty cache, wrong archive refused before any write, cache vs fetched copy identical, idempotent second run, stale removal).
  • Correctness: tree hash verified before the first file is written; failed resolution takes copies back; package name validated before it becomes a directory; --offline, no-lock and path-only cases handled.
  • Scope: matches #24 (copy locked deps, offline build, documented under docs/tooling/). The publish refusal for vendored copies is a small, directly related guard.
  • Security/data: no secrets, no new network paths; only vendor/ and the source lines are touched.
  • Docs: docs/tooling/torb-vendor.md, index, command page, RELEASE.md 7.5 and the skills updated.

Non-blocking: none.

Reviewed at dfd01e3. CI is green on this head (gates includes the new `tools/vendor.sh`; pdisc green). - Tests: unit tests for `withSource`/`withoutSource`; e2e `tools/vendor.sh` wired into gates (offline build with empty cache, wrong archive refused before any write, cache vs fetched copy identical, idempotent second run, stale removal). - Correctness: tree hash verified before the first file is written; failed resolution takes copies back; package name validated before it becomes a directory; `--offline`, no-lock and path-only cases handled. - Scope: matches #24 (copy locked deps, offline build, documented under `docs/tooling/`). The `publish` refusal for vendored copies is a small, directly related guard. - Security/data: no secrets, no new network paths; only `vendor/` and the `source` lines are touched. - Docs: `docs/tooling/torb-vendor.md`, index, command page, RELEASE.md 7.5 and the skills updated. Non-blocking: none.
argus merged commit 4fba4d7aea into main 2026-10-12 08:22:41 +00:00
argus deleted branch loop/24-torb-vendor 2026-10-12 08:22:42 +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!320
No description provided.