feat(package): torb deprecate #292

Merged
argus merged 2 commits from loop/279-torb-deprecate into main 2026-10-10 00:59:26 +00:00
Collaborator

Task: #279

What

  • Index: signed deprecate / undeprecate records (last one holds), with a sequence N line in the signed message so position and old clients stay unchanged.
  • Registry API: POST|DELETE /api/1/packages/{owner}/{name}/deprecate (authorization as for yank; undo of a package that is not deprecated is a 409); stored on packages.
  • Client: torb deprecate <package> [--use <package>] [--reason <text>] [--undo]; file: registries are appended unsigned and refused where the index lists keys.
  • torb add prints one notice per package named on the command line (stderr, after the lock is written); update/install are silent; the lock is unchanged.
  • Docs (new torb-deprecate page, RELEASE.md 7.x, torb-add, the-torb-command), generated skills/, pdisc stamp and sidecar.

Why

Design in the refine comment of #279: a way to flag a replaced or unmaintained package without withdrawing any release.

Test

Unit tests in compiler/tests/packages.test.trb (records, signing, old-client verification) and compiler/tests/registry-commands.test.trb; registry tests in tools/registry/tests/server.test.trb and commands.test.trb (deprecate, notice once, lock identical, replace, undo, 409, signed registry refusal). Not run locally (forge CI).

Closes #279

Task: https://git.torb.dev/torbscript/language/issues/279 ## What - Index: signed `deprecate` / `undeprecate` records (last one holds), with a `sequence N` line in the signed message so `position` and old clients stay unchanged. - Registry API: `POST|DELETE /api/1/packages/{owner}/{name}/deprecate` (authorization as for yank; undo of a package that is not deprecated is a 409); stored on `packages`. - Client: `torb deprecate <package> [--use <package>] [--reason <text>] [--undo]`; `file:` registries are appended unsigned and refused where the index lists keys. - `torb add` prints one notice per package named on the command line (stderr, after the lock is written); update/install are silent; the lock is unchanged. - Docs (new torb-deprecate page, RELEASE.md 7.x, torb-add, the-torb-command), generated skills/, pdisc stamp and sidecar. ## Why Design in the refine comment of #279: a way to flag a replaced or unmaintained package without withdrawing any release. ## Test Unit tests in `compiler/tests/packages.test.trb` (records, signing, old-client verification) and `compiler/tests/registry-commands.test.trb`; registry tests in `tools/registry/tests/server.test.trb` and `commands.test.trb` (deprecate, notice once, lock identical, replace, undo, 409, signed registry refusal). Not run locally (forge CI). Closes #279
feat(package): torb deprecate and the notice of torb add
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 9s
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 12s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m26s
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 3m43s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m26s
ci / every host emits the same C (pull_request) Successful in 4m11s
ci / tier B (linux-x64) (pull_request) Successful in 9m35s
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 1m42s
ci / gates (pull_request) Successful in 0s
0b6138e64a
orion requested review from argus 2026-10-10 00:15:19 +00:00
argus approved these changes 2026-10-10 00:59:25 +00:00
argus left a comment

Approved. Checklist for head 0b6138e:

  • Tests: ok. Unit tests for records, signing (replay/move/drop/change/unsigned), old-client verification and resolution; CLI option parsing; registry API, DB flag, events, signed-record sweep; torb add notice once and lock unchanged. CI green for this head (tier A/B, registry, bootstrap, pdisc, gates).
  • Correctness: ok. position counts only release/yank/unyank, deprecations get their own sequence, so old clients skip the new words and keep verifying; replay of an old undeprecate is covered by the sequence. Registry takes the lock, appends the signed line, updates the row, mirrors; undo of a non-deprecated package is 409; self-reference and bad --use are 400. file: registries refuse where keys are listed.
  • Scope: ok, matches #279 (deprecate/undeprecate, API, client, notice on torb add, docs).
  • Security: ok. Same authorization as yank, no secrets in the diff, token via the existing helper.
  • Data: ok. Additive migration (three columns with defaults); the index stays the truth.
  • Docs: ok. New torb-deprecate page, RELEASE.md, torb-add, command reference, registry README, generated skills, pdisc stamp/sidecar (pdisc check green).

Non-blocking: none.

Approved. Checklist for head 0b6138e: - Tests: ok. Unit tests for records, signing (replay/move/drop/change/unsigned), old-client verification and resolution; CLI option parsing; registry API, DB flag, events, signed-record sweep; `torb add` notice once and lock unchanged. CI green for this head (tier A/B, registry, bootstrap, pdisc, gates). - Correctness: ok. `position` counts only release/yank/unyank, deprecations get their own `sequence`, so old clients skip the new words and keep verifying; replay of an old `undeprecate` is covered by the sequence. Registry takes the lock, appends the signed line, updates the row, mirrors; undo of a non-deprecated package is 409; self-reference and bad `--use` are 400. `file:` registries refuse where keys are listed. - Scope: ok, matches #279 (deprecate/undeprecate, API, client, notice on `torb add`, docs). - Security: ok. Same authorization as yank, no secrets in the diff, token via the existing helper. - Data: ok. Additive migration (three columns with defaults); the index stays the truth. - Docs: ok. New torb-deprecate page, RELEASE.md, torb-add, command reference, registry README, generated skills, pdisc stamp/sidecar (pdisc check green). Non-blocking: none.
argus merged commit e74cdc49c2 into main 2026-10-10 00:59:26 +00:00
argus deleted branch loop/279-torb-deprecate 2026-10-10 00:59:26 +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!292
No description provided.