ci: watch upstream Arti/tor-* releases daily and file an upgrade issue #42

Merged
sirius merged 1 commit from wt/t_731235d4 into main 2026-09-12 18:27:22 +00:00
Owner

Summary

Automated warning when upstream Arti moves, plus a written upgrade procedure for the
in-process Tor stack (the largest attack surface here — README.md:24 calls Arti onion
services experimental).

  • .forgejo/workflows/arti-watch.yml — new workflow: daily cron (17 6 * * * UTC) +
    workflow_dispatch. Runs scripts/arti-watch.py on the docker Pi runner (same job
    image as ci.yml / release.yml; only curl + python3, no cargo, no docker).
  • scripts/arti-watch.py — reads the [dependencies] table of Cargo.toml, takes the
    newest stable version of every tor-* / arti-* crate from crates.io, compares
    major.minor against the pin, and files one Forgejo issue per distinct bump:
    Arti upstream: <crate> <pin> → <new>. Reuses the existing FORGEJO_TOKEN secret
    (the name used by release.yml) — no new secret.
  • docs/ARTI_UPGRADE.md — the pinned set, the lockstep rule, the rustc 1.91 floor, the
    bump procedure, and the tests a bump must pass.

Idempotent by title, deduped over open and closed issues (state=all, paginated), so
a repeat run files nothing and comments nothing. concurrency: onionwire-arti-watch
prevents two simultaneous runs racing the "does an issue with this title exist yet" read.
The workflow changes no dependency: Cargo.toml / Cargo.lock are untouched.

Not covered, stated in both artefacts: no subscription to Tor Project security
announcements (a fix that ships with no crates.io version bump is invisible), no yank
detection (crates.io max_stable_version already ignores yanks), and no vulnerability in
a version that has not changed.

Pins found in Cargo.toml (card said to report what is actually there)

arti-client = { version = "0.46", default-features = false, features = ["tokio",
    "onion-service-client", "onion-service-service", "compression"] }
tor-cell = "0.46"
tor-hsservice = "0.46"
tor-rtcompat = { version = "0.46", features = ["tokio"] }

Four crates, all 0.46, all direct [dependencies]. Nothing else in the file is from
the Arti repo. rust-version = "1.91", edition 2024; CI image rust:1.91-bookworm.

Acceptance evidence (real runs, real API, no fabrication)

Upstream today is already 0.46 on crates.io for all four crates
(arti-client/tor-cell/tor-hsservice/tor-rtcompat max_stable_version = 0.46.0,
published 2026-09-02; 0.45 was 2026-08-03), so there is no real upgrade to alert on
yet
— the daily cadence is monthly, next one expected early October. The issue-filing
path was therefore exercised with the workflow's own documented test hook,
simulate_pin, which compares real crates.io data against a pretend pin and says so
in the issue body. Runs are on 5dc6e78 (wt/t_731235d4).

Run 1 — real pins, files nothing (this is the case that will be green every day until
0.47 lands):

POST /actions/workflows/arti-watch.yml/dispatches {"ref":"wt/t_731235d4"}  -> HTTP 204
475  arti-watch  success  run_140  5dc6e78  https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/140
issues after run: 0

Run 2 — simulate_pin=arti-client=0.45, files a real issue:

POST .../dispatches {"ref":"wt/t_731235d4","inputs":{"simulate_pin":"arti-client=0.45"}}  -> HTTP 204
476  arti-watch  success  run_141  5dc6e78  https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/141
--- issues: 1
    #40 [open] Arti upstream: arti-client 0.45 → 0.46

Runs 3 and 4 — byte-identical input, must not produce a second issue:

477  arti-watch  success  run_142  5dc6e78  https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/142
478  arti-watch  success  run_143  5dc6e78  https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/143
--- issues: 1
    #40 [open] Arti upstream: arti-client 0.45 → 0.46

Search used for the counts (the same call the script makes before filing):

GET /api/v1/repos/sirius/onionwire/issues?state=all&type=issues&limit=50
-> issue count: 1   (#40)

Issue #40: #40 — filed by the
workflow through the API during run_141. It is a test-hook artefact (its body says the
pin came from simulate_pin, not from Cargo.toml); I am closing it with a comment so
nobody actions it. The watcher will file for real when 0.47 lands.

Local reproduction of the same run log (same code, real crates.io, --dry-run):

$ python3 scripts/arti-watch.py --dry-run --cargo-toml Cargo.toml
crates.io comparison (4 watched crate(s) from Cargo.toml):
  arti-client: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no
  tor-cell: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no
  tor-hsservice: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no
  tor-rtcompat: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no
no upgrade available: every pin already covers the newest upstream release

$ python3 scripts/arti-watch.py --dry-run --simulate-pin arti-client=0.45
  arti-client: pinned=0.45 (from simulate-pin) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=yes
dry-run: would file issue 'Arti upstream: arti-client 0.45 → 0.46'

The run log on the runner prints the same four pinned=/upstream_stable=/upstream_newest=/ upgrade= lines; open run_140/run_141 in the UI to see them (this Forgejo exposes no
Actions log API — GET /actions/tasks is the only read endpoint on the instance).

Notes / follow-ups (not in this PR)

  • docs/README.md (the docs index) does not list ARTI_UPGRADE.md; that file is outside
    this card's allowed paths, so it is left alone. One-line addition when someone is in
    there anyway.
  • No --pinned-version / GitLab advisory polling: out of scope per the card, and it would
    contradict the documented "does not subscribe to Tor Project announcements" limitation.

README (deferred)

Exact wording for the PR that owns README.md (#38), apply after it lands.

  1. Docs line — line 10, append one entry:
**Docs** (protocol first, then claims): [PROTOCOL.md](docs/PROTOCOL.md) · [threat model](docs/THREAT_MODEL.md) · [audit notes](docs/SECURITY_AUDIT.md) (in-house, not a third-party audit) · [Arti upgrades](docs/ARTI_UPGRADE.md). Index: [docs/README.md](docs/README.md).
  1. New short paragraph at the end of ## Releases (maintainers) (after line 296,
    before ## Troubleshooting):
### Arti upgrade watch

`Actions → arti-watch` (`.forgejo/workflows/arti-watch.yml`) runs daily and files a
Forgejo issue when crates.io has a newer `tor-*` / `arti-*` major.minor than the pins in
`Cargo.toml`. Deduped on the issue title, so it files nothing when there is no news. It
does not bump anything — the procedure, the rustc floor, and the tests a bump must pass
are in [`docs/ARTI_UPGRADE.md`](docs/ARTI_UPGRADE.md). It does **not** subscribe to Tor
Project security announcements and cannot see a yanked crate, so keep an eye on
<https://blog.torproject.org/> as well. Test the alert path with
`Run workflow → simulate_pin=arti-client=0.45`.

Commands run

git fetch origin && git rev-list --count HEAD..origin/main   # 0 — based on origin/main
python3 scripts/arti-watch.py --dry-run [--simulate-pin arti-client=0.45]
curl -X POST .../actions/workflows/arti-watch.yml/dispatches -d '{"ref":"wt/t_731235d4"}'
curl .../actions/tasks?limit=1
curl .../issues?state=all&type=issues&limit=50

No Cargo.toml, Cargo.lock, src/**, README.md, docs/TUI.md, android/**, or
existing workflow file is touched. ci.yml is unchanged (it is path-gated and this PR
touches no path it watches — so no Rust suite run was triggered, as intended).

  • Cron timing: this instance only schedules workflows that exist on the default branch, so
    the daily 17 6 * * * (UTC) run starts after this merges. workflow_dispatch already
    works from a branch — that is how all four runs above were produced.
  • The PR touches no path ci.yml watches (.forgejo/workflows/ci.yml is itself in the
    allowlist but unchanged), so the path gate correctly ran no Rust suite: the only runs on
    wt/t_731235d4 are the four arti-watch ones.
## Summary Automated warning when upstream Arti moves, plus a written upgrade procedure for the in-process Tor stack (the largest attack surface here — `README.md:24` calls Arti onion services experimental). - `.forgejo/workflows/arti-watch.yml` — new workflow: daily cron (`17 6 * * *` UTC) + `workflow_dispatch`. Runs `scripts/arti-watch.py` on the `docker` Pi runner (same job image as `ci.yml` / `release.yml`; only `curl` + `python3`, no cargo, no docker). - `scripts/arti-watch.py` — reads the `[dependencies]` table of `Cargo.toml`, takes the newest **stable** version of every `tor-*` / `arti-*` crate from crates.io, compares major.minor against the pin, and files **one** Forgejo issue per distinct bump: `Arti upstream: <crate> <pin> → <new>`. Reuses the existing `FORGEJO_TOKEN` secret (the name used by `release.yml`) — no new secret. - `docs/ARTI_UPGRADE.md` — the pinned set, the lockstep rule, the rustc 1.91 floor, the bump procedure, and the tests a bump must pass. Idempotent by title, deduped over open **and** closed issues (`state=all`, paginated), so a repeat run files nothing and comments nothing. `concurrency: onionwire-arti-watch` prevents two simultaneous runs racing the "does an issue with this title exist yet" read. The workflow changes no dependency: `Cargo.toml` / `Cargo.lock` are untouched. **Not covered, stated in both artefacts:** no subscription to Tor Project security announcements (a fix that ships with no crates.io version bump is invisible), no yank detection (crates.io `max_stable_version` already ignores yanks), and no vulnerability in a version that has not changed. ## Pins found in `Cargo.toml` (card said to report what is actually there) ``` arti-client = { version = "0.46", default-features = false, features = ["tokio", "onion-service-client", "onion-service-service", "compression"] } tor-cell = "0.46" tor-hsservice = "0.46" tor-rtcompat = { version = "0.46", features = ["tokio"] } ``` Four crates, all `0.46`, all direct `[dependencies]`. Nothing else in the file is from the Arti repo. `rust-version = "1.91"`, edition 2024; CI image `rust:1.91-bookworm`. ## Acceptance evidence (real runs, real API, no fabrication) Upstream today is **already 0.46** on crates.io for all four crates (`arti-client`/`tor-cell`/`tor-hsservice`/`tor-rtcompat` `max_stable_version = 0.46.0`, published 2026-09-02; 0.45 was 2026-08-03), so there is **no real upgrade to alert on yet** — the daily cadence is monthly, next one expected early October. The issue-filing path was therefore exercised with the workflow's own documented test hook, `simulate_pin`, which compares **real crates.io data** against a pretend pin and says so in the issue body. Runs are on `5dc6e78` (`wt/t_731235d4`). Run 1 — real pins, files nothing (this is the case that will be green every day until 0.47 lands): ``` POST /actions/workflows/arti-watch.yml/dispatches {"ref":"wt/t_731235d4"} -> HTTP 204 475 arti-watch success run_140 5dc6e78 https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/140 issues after run: 0 ``` Run 2 — `simulate_pin=arti-client=0.45`, files a real issue: ``` POST .../dispatches {"ref":"wt/t_731235d4","inputs":{"simulate_pin":"arti-client=0.45"}} -> HTTP 204 476 arti-watch success run_141 5dc6e78 https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/141 --- issues: 1 #40 [open] Arti upstream: arti-client 0.45 → 0.46 ``` Runs 3 and 4 — byte-identical input, must not produce a second issue: ``` 477 arti-watch success run_142 5dc6e78 https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/142 478 arti-watch success run_143 5dc6e78 https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/143 --- issues: 1 #40 [open] Arti upstream: arti-client 0.45 → 0.46 ``` Search used for the counts (the same call the script makes before filing): ``` GET /api/v1/repos/sirius/onionwire/issues?state=all&type=issues&limit=50 -> issue count: 1 (#40) ``` Issue #40: https://forgejo.siriusdevops.com/sirius/onionwire/issues/40 — filed by the workflow through the API during run_141. It is a test-hook artefact (its body says the pin came from `simulate_pin`, not from `Cargo.toml`); I am closing it with a comment so nobody actions it. The watcher will file for real when 0.47 lands. Local reproduction of the same run log (same code, real crates.io, `--dry-run`): ``` $ python3 scripts/arti-watch.py --dry-run --cargo-toml Cargo.toml crates.io comparison (4 watched crate(s) from Cargo.toml): arti-client: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no tor-cell: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no tor-hsservice: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no tor-rtcompat: pinned=0.46 (from Cargo.toml) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=no no upgrade available: every pin already covers the newest upstream release $ python3 scripts/arti-watch.py --dry-run --simulate-pin arti-client=0.45 arti-client: pinned=0.45 (from simulate-pin) upstream_stable=0.46.0 upstream_newest=0.46.0 upgrade=yes dry-run: would file issue 'Arti upstream: arti-client 0.45 → 0.46' ``` The run log on the runner prints the same four `pinned=/upstream_stable=/upstream_newest=/ upgrade=` lines; open run_140/run_141 in the UI to see them (this Forgejo exposes no Actions log API — `GET /actions/tasks` is the only read endpoint on the instance). ## Notes / follow-ups (not in this PR) - `docs/README.md` (the docs index) does not list `ARTI_UPGRADE.md`; that file is outside this card's allowed paths, so it is left alone. One-line addition when someone is in there anyway. - No `--pinned-version` / GitLab advisory polling: out of scope per the card, and it would contradict the documented "does not subscribe to Tor Project announcements" limitation. ## README (deferred) Exact wording for the PR that owns `README.md` (#38), apply after it lands. 1. Docs line — line 10, append one entry: ``` **Docs** (protocol first, then claims): [PROTOCOL.md](docs/PROTOCOL.md) · [threat model](docs/THREAT_MODEL.md) · [audit notes](docs/SECURITY_AUDIT.md) (in-house, not a third-party audit) · [Arti upgrades](docs/ARTI_UPGRADE.md). Index: [docs/README.md](docs/README.md). ``` 2. New short paragraph at the end of `## Releases (maintainers)` (after line 296, before `## Troubleshooting`): ``` ### Arti upgrade watch `Actions → arti-watch` (`.forgejo/workflows/arti-watch.yml`) runs daily and files a Forgejo issue when crates.io has a newer `tor-*` / `arti-*` major.minor than the pins in `Cargo.toml`. Deduped on the issue title, so it files nothing when there is no news. It does not bump anything — the procedure, the rustc floor, and the tests a bump must pass are in [`docs/ARTI_UPGRADE.md`](docs/ARTI_UPGRADE.md). It does **not** subscribe to Tor Project security announcements and cannot see a yanked crate, so keep an eye on <https://blog.torproject.org/> as well. Test the alert path with `Run workflow → simulate_pin=arti-client=0.45`. ``` ## Commands run ``` git fetch origin && git rev-list --count HEAD..origin/main # 0 — based on origin/main python3 scripts/arti-watch.py --dry-run [--simulate-pin arti-client=0.45] curl -X POST .../actions/workflows/arti-watch.yml/dispatches -d '{"ref":"wt/t_731235d4"}' curl .../actions/tasks?limit=1 curl .../issues?state=all&type=issues&limit=50 ``` No `Cargo.toml`, `Cargo.lock`, `src/**`, `README.md`, `docs/TUI.md`, `android/**`, or existing workflow file is touched. `ci.yml` is unchanged (it is path-gated and this PR touches no path it watches — so no Rust suite run was triggered, as intended). - Cron timing: this instance only schedules workflows that exist on the default branch, so the daily `17 6 * * *` (UTC) run starts after this merges. `workflow_dispatch` already works from a branch — that is how all four runs above were produced. - The PR touches no path `ci.yml` watches (`.forgejo/workflows/ci.yml` is itself in the allowlist but unchanged), so the path gate correctly ran no Rust suite: the only runs on `wt/t_731235d4` are the four `arti-watch` ones.
.forgejo/workflows/arti-watch.yml runs daily (06:17 UTC) and via
workflow_dispatch: scripts/arti-watch.py compares each tor-*/arti-* pin in
Cargo.toml against crates.io and files one Forgejo issue per distinct
major.minor bump, deduped on the title so a repeat run is a no-op. It changes
no dependency.

docs/ARTI_UPGRADE.md records the pinned set (arti-client, tor-cell,
tor-hsservice, tor-rtcompat at 0.46), the lockstep rule, the rustc 1.91
floor, and the tests a bump must pass (tests/tor_hs.rs live publish +
probe-connect + byte pipe, the 360s fail-closed wait and the src/hs.rs
circuit-timeout workarounds in tests/hs.rs, the Android rustls build).

Both artefacts state what this does not cover: Tor Project security
announcements, a yanked crate, and a vulnerability with no version bump.
sirius force-pushed wt/t_731235d4 from 5dc6e78e23 to 6f96d19901 2026-09-12 17:53:37 +00:00 Compare
sirius left a comment

Merge order 2 of 7: #38 -> #42 -> #41 -> #44 -> #43 -> #45 -> #46

Independent of every other PR in the queue: a new scheduled workflow plus new docs, no shared files.

Note: Forgejo refuses a formal approval from this token ("approve your own pull is not allowed" — the PRs were pushed by account sirius, which is also the token's user). This review records the sign-off and the merge position; a human approval click is still needed. Rebased onto current main before this review, diff verified byte-identical.

**Merge order 2 of 7:** #38 -> #42 -> #41 -> #44 -> #43 -> #45 -> #46 Independent of every other PR in the queue: a new scheduled workflow plus new docs, no shared files. Note: Forgejo refuses a formal approval from this token ("approve your own pull is not allowed" — the PRs were pushed by account `sirius`, which is also the token's user). This review records the sign-off and the merge position; a human approval click is still needed. Rebased onto current `main` before this review, diff verified byte-identical.
sirius merged commit 27e49b4ea6 into main 2026-09-12 18:27:22 +00:00
sirius deleted branch wt/t_731235d4 2026-09-12 18:27:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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
sirius/onionwire!42
No description provided.