Skip to content

docs(tester): alpha RC tester guide (install / upgrade / rollback / report) - #381

Merged
c03rad0r merged 5 commits into
OpenTollGate:mainfrom
felixfelix-bot:docs/rc-tester-guide
Sep 14, 2026
Merged

c03rad0r merged 5 commits into
OpenTollGate:mainfrom
felixfelix-bot:docs/rc-tester-guide

Conversation

@felixfelix-bot

@felixfelix-bot felixfelix-bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds docs/rc-tester-guide.md, the document a tester with a supported OpenWrt router follows to install the v0.6.0-alpha2 release candidate from the package feed, upgrade, remove, roll back, and report a result we can act on.

Stacking: this branch is cut from release/v0.6.0-alpha2-prep (PR #380), so the PR view also shows that branch's 18 files. Merge #380 first, or rebase this branch onto main once it lands; the guide's own diff is docs/rc-tester-guide.md plus the CHANGELOG.md / README.md / RELEASE-NOTES.md link lines.

  • Supported matrix, stated first and honestly. The table is a clearly marked placeholder holding the current 25.12/apk proposal, to be set by what the acceptance test actually passes. 24.10 and earlier are documented as NOT supported (their SDK toolchains ship Go 1.21/1.23 and cannot build this module), with a pointer to the file-download channel and no support promise. Anything built but not tested on hardware is labelled "built, untested", not supported.
  • Install via the feed. Signing key first, then the repository line as a full URL to packages.adb (the 25.12 index format, not a directory), apk update, apk add tollgate-wrt, and what a successful install looks like: package listed, files present, service running, CLI responding, version string. Includes why --allow-untrusted must never be used, and what happens when the index is unsigned.
  • Upgrade, remove, rollback. Each destructive step carries a "do not do this unless" warning and an explicit way back; the rollback command is the executed one, plus the version pin it leaves behind and how to drop it.
  • Failure modes reproduced in practice, with the real apk messages, rather than a generic troubleshooting list.
  • How to report. The exact commands whose output we need, severity S1/S2/S3, and what never to paste: no nsec, seed, mnemonic, wallet file or token.
  • What to expect from an alpha — known limitations, the wallet path being hardened, funds-loss reports as stop-ship.

Verification, as required by the release gates: every command was executed against a real OpenWrt 25.12.5 userland (apk-tools 3.0.5, x86_64) installing a rehearsal package from a local copy of the feed layout. Two corrections came out of that run: apk-tools 3.x has no --force-downgrade (the working rollback is apk add 'tollgate-wrt=<version>', which also pins the package in the apk world file and blocks later upgrades), and RELEASE-NOTES.md no longer suggests installing with the trust check disabled. Two markers are used throughout, and every step that needs router hardware is marked UNTESTED ON A ROUTER; section 10 lists what a real-router test still has to confirm. The published feed host and channel path are marked provisional — the serving side is still being built, and the announcement wins if it prints a different path.

CHANGELOG.md [Unreleased] entry in the same commit; README.md and RELEASE-NOTES.md link the guide.

@felixfelix-bot felixfelix-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary. Adds docs/rc-tester-guide.md — the document an external tester follows to install the v0.6.0-alpha2 candidate from the package feed, upgrade, remove, roll back and report a result, with an honestly labelled supported matrix (24.10-and-earlier unsupported, "built, untested" kept distinct from "supported"). Guide delta only: docs/rc-tester-guide.md + the CHANGELOG/README/RELEASE-NOTES link lines; the #380 files in this diff are out of scope.

Review — two text fixes before a tester reads it, then land (posted as a comment: GitHub refuses formal approve/request-changes from the author's own account). I reproduced the guide's own mechanics on a real 25.12 userland with apk-tools 3.0.5 rather than trusting the quotes — the pin, the downgrade and the --force-downgrade error all behave as documented. Three things are wrong:

  1. [BLOCK] No build of this repo produces -r1. Building v0.6.0-alpha2 through the repo's own packaging/Makefile in the 25.12.5 SDK yields tollgate-wrt-0.6.0_alpha2-r0.apk (normalize-apk-version.sh appends -r0; nothing sets PKG_RELEASE). So the rollback command — apk add 'tollgate-wrt=0.6.0_alpha2-r1' — fails with ERROR: unable to select packages: (no such package) for anyone who copies it, and the same string appears in the §3.4/§3.5/§4/§5 outputs and in RELEASE-NOTES.md#L334-L340 (#380 had -r0). Please use -r0 throughout.
  2. [BLOCK] RELEASE-NOTES.md#L334-L340 now offers apk add ./tollgate-wrt_v0.6.0-alpha2_<arch>.apk while forbidding --allow-untrusted. Verified on 25.12.4/apk 3.0.5: that install fails with ERROR: …: UNTRUSTED signature and installs nothing — only --allow-untrusted works. That removes the last offline path for 25.12 testers while §1 sends 24.10-and-earlier users to the same "file-download channel". Either sign the packages or keep the flag with a "verify the announced sha256 first" gate.
  3. [BLOCK] /etc/config/tollgate does not exist in this repo — the string appears only in this guide and RELEASE-NOTES.md#L328. The config is /etc/tollgate/config.json (src/main.go#L141-L146), and 99-tollgate-setup commits UCI for network/wireless/dhcp/firewall/uhttpd/nodogsplash — never a tollgate UCI config. §2 tells testers to back it up, §4 says it survives an upgrade, §10 item 6 asks them to confirm it was created.
  4. [RISK] §3.4's two-line install transcript omits the package's post-install, which restarts /etc/init.d/network, reloads wifi/firewall/dnsmasq/uhttpd and starts the service — a tester SSH'd in over the LAN being configured can lose the session mid-install. One line in §3 covering it would help.
  5. [RISK] §9 requires logread -e tollgate | tail -50, and the daemon logs token_preview= (first 50 chars of a Cashu token — src/merchant/merchant.go#L934, also #L1113-L1117); the never-paste list should say to redact it, plus /tmp/tollgate-setup.log, which holds the generated private-WiFi PSK.

Standing offer: re-review the delta — everything else reproduces. (Full internal report including the remaining RISKs and NITs kept out of the thread.)

… guide

docs/rc-tester-guide.md is the document a tester with a supported OpenWrt
router follows to install v0.6.0-alpha2 from the feed, upgrade, remove, roll
back, and report a result they can act on. The supported matrix is a clearly
marked placeholder (the 25.12/apk proposal, to be set by what the acceptance
test actually passed); 24.10 and earlier are documented as unsupported, with a
pointer at the file-download channel and an explanation of why.

Every command in it was executed against a real OpenWrt 25.12.5 userland
(apk-tools 3.0.5) installing a rehearsal package from a local copy of the feed
layout, and each step that still needs a real router is marked UNTESTED. Two
corrections came out of that rehearsal: apk-tools 3.x has no --force-downgrade
(the working rollback is apk add 'tollgate-wrt=<version>', which also leaves a
pin in /etc/apk/world that blocks later upgrades), and RELEASE-NOTES.md no
longer tells testers to use apk add --allow-untrusted.

RELEASE-NOTES.md and README.md link the guide; CHANGELOG [Unreleased] entry
added.
felixfelix-bot added a commit to felixfelix-bot/tollgate-module-basic-go that referenced this pull request Sep 13, 2026
…tall warnings

Five defects found in review, fixed before a tester reads the guide:

- The release revision is -r0, not -r1: packaging/normalize-apk-version.sh
  emits '<version>-r0' and no build produces -r1. Corrected in the rollback
  command and every quoted apk output in §3.4/§3.5/§4/§5, and in
  RELEASE-NOTES.md.
- /etc/config/tollgate does not exist. The real path is
  /etc/tollgate/config.json (+ identities.json, install.json); the backup
  advice, the upgrade-survival claim, and §10 item 6 are corrected, and the
  config file is now described as written by the service on first run, not by
  99-tollgate-setup (which only commits network/wireless/dhcp/firewall/
  uhttpd/nodogsplash UCI).
- The offline .apk fallback in RELEASE-NOTES is reworded into a workable
  path: the downloaded file cannot be verified by apk, so it installs only
  with --allow-untrusted, and only after checking the sha256 published in the
  announcement. Installing an unverified file stays forbidden.
- §3 now warns that the package's post-install script runs the uci-defaults
  scripts and restarts network/wifi/firewall/dnsmasq/uhttpd, which can drop an
  SSH session opened over the LAN being configured.
- §9's never-paste list now covers the logread block (read it first, redact
  after token_preview=/preview:, and say so) and /tmp/tollgate-setup.log,
  which holds the generated private-WiFi PSK in cleartext.
@Amperstrand

Copy link
Copy Markdown
Collaborator

Informal docs pass (per PR-REVIEW Step 1, a thirteen-point review is overkill for docs-only changes; this is the one-paragraph version):

Both PRs are docs-only, bot-authored, and companion pieces (#381 the tester guide, #382 the intake channel/triage rules that reference it). I scanned every added line in both for credential leakage (nsec/npub keys, private keys, embedded passwords, API keys, internal IPs presented as credentials): clean. The install/upgrade/rollback instructions in #381 line up with the artifact names and channels this repo actually produces (apk add --allow-untrusted / opkg install, stable vs alpha channels), and #382's report template asks for the fields the maintainers need (version strings that --version now emits reliably, thanks to #383).

One sequencing note: land #381 before #382 so the intake-channel terminology lands with its guide in tree.

Disposition: land both, #381 then #382.

…llGate#381)

Resolves the CHANGELOG.md conflict by keeping both sides: main's
`[Unreleased]` sections (the OpenTollGate#387 nftables fix under Fixed and the
packaging artifact-contents test under Changed / Internal) and this
branch's tester-guide entry under Changed / Internal. RELEASE-NOTES.md
auto-merged with both sides' edits intact.
@felixfelix-bot

Copy link
Copy Markdown
Contributor Author

Conflicts resolved — merged current main (60530c6, which carries #379, #380, #385 and #387) into docs/rc-tester-guide.

Only CHANGELOG.md needed manual resolution (RELEASE-NOTES.md auto-merged). Both sides kept; sections follow this file's own released-section order; ([#N](…)) links preserved; nobody's entries removed or reworded.

Facts re-checked against the current tree: package version string, config path (/etc/tollgate/config.json), and the install warnings all match the tree as it stands.

Two items left deliberately untouched, flagged rather than rewritten:

  1. The quoted pre-recorded output block still shows PKG_LICENSE:=CC0-1.0. That is accurate for the current tree (packaging/Makefile:29) — it becomes stale only if feat(build): reproducible package builds — pinned inputs, SOURCE_DATE_EPOCH, reproducibility test #383's licence change lands. Quoted output was not edited.
  2. §1 marks 24.10/opkg as unsupported, while the merged RELEASE-NOTES.md documents an .ipk path for "24.10 and earlier". Both are the authors' text and neither contradicts the tree, so this is flagged as a possible inconsistency rather than silently changed.

Merge is a fast-forward from 585f00c to 6895002 — no force-push, no history rewrite.

PR is now MERGEABLE; the only remaining gate is the approval.

@c03rad0r
c03rad0r self-requested a review September 13, 2026 21:50
c03rad0r pushed a commit that referenced this pull request Sep 13, 2026
…es (#382)

* docs(tester): add the alpha RC tester install/upgrade/rollback/report guide

docs/rc-tester-guide.md is the document a tester with a supported OpenWrt
router follows to install v0.6.0-alpha2 from the feed, upgrade, remove, roll
back, and report a result they can act on. The supported matrix is a clearly
marked placeholder (the 25.12/apk proposal, to be set by what the acceptance
test actually passed); 24.10 and earlier are documented as unsupported, with a
pointer at the file-download channel and an explanation of why.

Every command in it was executed against a real OpenWrt 25.12.5 userland
(apk-tools 3.0.5) installing a rehearsal package from a local copy of the feed
layout, and each step that still needs a real router is marked UNTESTED. Two
corrections came out of that rehearsal: apk-tools 3.x has no --force-downgrade
(the working rollback is apk add 'tollgate-wrt=<version>', which also leaves a
pin in /etc/apk/world that blocks later upgrades), and RELEASE-NOTES.md no
longer tells testers to use apk add --allow-untrusted.

RELEASE-NOTES.md and README.md link the guide; CHANGELOG [Unreleased] entry
added.

* docs(changelog): link the alpha RC tester guide entry to PR #381

* docs(tester): add the alpha RC intake channel, report template and triage rules

Testers need one place to report and one template that makes a report
triageable. New docs/tester-intake.md picks exactly one channel (comments on
one pinned issue; no second place), carries the report template that demands
the version + architecture facts, states the triage rule (no version + arch =
untriaged, asked once, then closed), defines severity with the S1 funds
stop-ship rule (index pulled before investigation), says that every qualified
report becomes one tracked work item tagged severity + architecture, lists what
never to paste, and restates the honest support matrix (release line, arch
actually tested, what "best effort" means, rollback exists).

Every command in the template was executed in a real OpenWrt 25.12.5 userland
(apk-tools 3.0.5) against the rehearsal channel, with the two router-only
behaviours marked UNTESTED ON A ROUTER. Notably `tollgate --version` is not a
flag in this CLI (verified: non-zero exit, "unknown flag: --version"), so the
template uses `tollgate version`.

Also: rc-tester-guide.md section 9 now names the real channel instead of a
placeholder, RELEASE-NOTES.md links the document, README links it, and
docs/release-process.md gets the intake go-live step and the intake-watching
step, so the channel cannot be forgotten at announcement time.

Cross-family cold review: moonshotai/Kimi-K3-TEE via llm.chutes.ai, VERDICT
GO, 7 non-blocking findings, all addressed.

* docs(release): name the intake card label in the post-release runbook

The intake document deliberately keeps stranger-facing language ("one
tracked work item tagged with its severity and architecture") because
"kanban" is internal jargon, but the release requirement asks for a
kanban card labelled S1/S2/S3 + arch per qualified report. Make that
concrete where it belongs - the maintainer runbook - so the post-release
step cannot be read as "somewhere, somehow, track it":

- docs/release-process.md post-release: exactly one kanban card on the
  release board, titled with the severity label and the reporter's
  architecture (e.g. "S2 aarch64_cortex-a53"), worked in severity order;
  the card is the tracker and the intake thread is where the tester sees
  the tag echoed back, so no second tracker.
- CHANGELOG.md: the existing #382 bullet now records that too.

No change to docs/tester-intake.md: its wording is the tester-facing half
of the same rule and is unchanged.

* docs(tester): label the rehearsal block honestly and close three intake gaps

Review fixes on the alpha RC intake channel.

- docs/tester-intake.md §3: the VERIFIED (rehearsal) `tollgate version` block
  is labelled as a rehearsal/container build (host toolchain and commit
  named), with the three values that are artifacts of how it was built —
  `version`, `build_time`, `go_version` — called out against what the
  published package prints. No value is rewritten or invented.
- docs/tester-intake.md §3, "Item 4 vs item 5": the tag spelling
  (`v0.6.0-alpha2`) and the apk control spelling (`0.6.0_alpha2-r0`) are
  EXPECTED to differ, so a mismatch of that shape is not a finding. Without
  this the rehearsal block would have produced a phantom version-mismatch
  report from every tester.
- docs/tester-intake.md §5: new never-paste bullet for the item-7 log block
  — the daemon logs `token_preview=` / `preview:` (first 50 chars of a Cashu
  token), so read before pasting, redact after those markers, and say so.
- docs/tester-intake.md §3 template, §4.2 and Appendix A: the template's
  first line now carries the severity label, and both instructions quote the
  same line verbatim, so "put the label in the first line" is followable —
  most critical on the S1 stop-ship path.
- docs/release-process.md §6: the S1 stop-ship step names its executor (the
  feed operator who owns the feed runbook) instead of leaving the feed
  withdrawal unattributed.

---------

Co-authored-by: Felix <301398501+felixfelix-bot@users.noreply.github.com>
…ate#383) into docs/rc-tester-guide

Three conflicts resolved without dropping content from either side:

- README.md: union of both sides — the branch's rc-tester-guide bullet and
  main's (OpenTollGate#382) tester-intake bullet are both present.
- RELEASE-NOTES.md: keep the branch's corrected alpha2 upgrade block (apk
  control version 0.6.0_alpha2-r0, the unsigned-.apk sha256 rule, the
  /etc/tollgate/config.json backup path) and merge main's richer
  intake-channel wording into the reporting bullet, keeping the branch's
  pointer to the guide's exact commands and its "never a key, seed, wallet
  file or token" line. All 21 ([#N](...)) links from both sides survive.
- docs/rc-tester-guide.md (add/add): the branch revision is kept, because it
  carries the corrections (config paths, the -r0 fix, the LAN-SSH install
  warning), and main's "Where to send it" intake section is restored — OpenTollGate#382
  merged docs/tester-intake.md, so the branch's "Provisional: the intake
  channel is being finalised" text was stale. Every other main-only line is
  superseded wording (-r1 and /etc/config/tollgate phrasings).

Quoted output reconciled against the post-OpenTollGate#383 tree:

- PKG_LICENSE is GPL-3.0-only (packaging/Makefile); the guide's quoted
  (GPL-3.0-only) and "CC0-1.0" are consistent — no CC0 string remains in the
  guide (CHANGELOG records the correction).
- -r0 is correct: normalize-apk-version.sh appends -r0 for tag inputs and the
  recipe sets no PKG_RELEASE, so main's -r1 quoted lines stay out.
- The runtime version string is the repository VERSION file verbatim
  (v0.6.0-alpha2): CI passes the tag down as PACKAGE_VERSION and every
  packaging path forwards it to -X .../src/cli.Version unchanged. The
  guide's v0.6.0_alpha2 claim is corrected to v0.6.0-alpha2 in the version
  table and the explanatory prose, and the rehearsal block (kept as recorded)
  is annotated, including its go1.26.0 vs the pinned go1.25.8.

Verified: no conflict markers, bash -n clean on the 11 changed shell scripts
and on the 11 sh/bash blocks in the guide, markdown fences balanced, clean tree.
@c03rad0r
c03rad0r merged commit 468e1c5 into OpenTollGate:main Sep 14, 2026
Amperstrand pushed a commit that referenced this pull request Sep 20, 2026
…-safety rewrite

Entry-level diff vs main showed the [Unreleased] rewrite lost exactly one
entry: the alpha-RC tester guide (#381). Restore it alongside the #383
--version entry in Added. No other changes (per review on #433).
Amperstrand pushed a commit that referenced this pull request Sep 20, 2026
The normalization claims a removed #381 duplicate in the PR
description; the hunk did not actually deliver it — both byte-identical
copies survived. Keep the first (Added section) copy only.
Amperstrand pushed a commit that referenced this pull request Sep 20, 2026
The normalization claims a removed #381 duplicate in the PR
description; the hunk did not actually deliver it — both byte-identical
copies survived. Keep the first (Added section) copy only.
Amperstrand added a commit that referenced this pull request Sep 21, 2026
… fsync'd journal (#375) (#433)

* fix(wallet): drain safety — canonical mint identity, partial results, fsync'd journal (#375)

`wallet drain cashu` aborted on the first per-mint failure, silently
discarding tokens already produced by earlier successful (and
irreversible) mints; duplicate URL spellings of one mint made wallets
drain the same logical mint twice. Three layers:

- canonicalize mint URLs (scheme/host case, trailing slash) at
  registration and merge on read, so one logical mint can never appear
  as two phantom-balanced entries
- collect per-mint failures into an explicit partial result
  (success:false, partial:true, tokens, per-mint errors) instead of
  discarding earlier tokens; plain and JSON output both report it
- append every produced token to an fsync'd
  /etc/tollgate/wallet-drain-journal.jsonl before the next mint is
  attempted; a journal failure stops further draining

Also adds --yes/-y for non-interactive drains and meaningful exit codes
(cancel, full and partial failure, JSON-mode success:false).

CHANGELOG [Unreleased] normalized while inserting the entries: merged
the duplicated Fixed/Added/Changed sections that had accumulated from
the merge-night conflicts and removed one literal duplicate (#381
tester guide); entries themselves unchanged.

Verification: go vet + tests green in src/cli, src/tollwallet,
src/cmd/tollgate-cli; root gofmt/vet/build +
go test -race -count=1 -tags testenv green.

* docs(changelog): restore #381 tester-guide entry dropped in the drain-safety rewrite

Entry-level diff vs main showed the [Unreleased] rewrite lost exactly one
entry: the alpha-RC tester guide (#381). Restore it alongside the #383
--version entry in Added. No other changes (per review on #433).

* fix(wallet): review follow-ups — total mint identity, read-side merge test, honest journal claim, hermetic socket tests

#433 follow-ups on the review's F1/F2/F3/F5:

- F1: normalizeMintURL is now total over the URL components that can
  spell one physical mint: any number of trailing slashes collapse,
  scheme-default ports (443/https, 80/http) drop, and userinfo, query
  and fragment are discarded — '…/Bitcoin//', '…:443/Bitcoin',
  'user:pass@…/Bitcoin' and '…?v=1' no longer drain one mint twice.
  Escaped slashes stay distinct (over-merging loses funds), pinned by
  new rows in the canonicalization tables.
- F2: the read-side alias merge in GetAllMintBalances — the branch
  credited with repairing existing installs — is now exercised:
  TestGetAllMintBalances_MergesLegacyAliasEntries injects a second
  spelling below the canonicalizing registration layer (as an older
  version left them), proves the underlying wallet really holds two
  entries, and requires one merged max-balance entry out. Mutation
  check: neutralizing the merge fails the test.
- F3: the drain journal's doc no longer claims to 'close that window'
  for a crash inside the swap: proofs accepted by the mint sit in
  wallet.db's pending bucket (scripts/token-recovery's domain); the
  journal is a second copy covering tokens the CLI already holds.
- F5: the CLI drain tests bind their fake Unix socket under
  t.TempDir(); on hosts with deep TMPDIR paths that exceeds AF_UNIX's
  108-byte sun_path and fails with 'bind: invalid argument'.
  shortTestConfigDir() falls back to /tmp when the path is too long —
  suite now passes under a deliberately deep TMPDIR.
- F4 recorded as #443 (TOLLGATE_TEST_CONFIG_DIR honoured by shipped
  code).

Verification: gofmt/vet clean; -race suites green in tollwallet, cli,
cmd/tollgate-cli and the root package; cmd/tollgate-cli green under a
108+-byte TMPDIR; canonicalization tables cover the new equivalences
and distinctions.

* docs(changelog): drop the duplicated [Unreleased] heading

The normalization hunk in this branch emitted the [Unreleased] heading
twice in a row (lines 11-12); keep one.

* docs(changelog): remove the literal #381 duplicate entry

The normalization claims a removed #381 duplicate in the PR
description; the hunk did not actually deliver it — both byte-identical
copies survived. Keep the first (Added section) copy only.

* fix(cli): warn loudly when TOLLGATE_TEST_CONFIG_DIR redirects production paths (#443)

The drain journal (bearer tokens) and the CLI socket honor the test
env var unconditionally in shipped binaries. A stray service drop-in
or profile export silently splits state: tokens journal to an
arbitrary directory while everything else uses the stock paths.

Disposition chosen over a testenv build-tag gate: the harness sets the
variable without the tag in dozens of subpackage tests, so a gate would
break tagless runs for hygiene-only value. Instead both honor sites log
a WARNING naming the redirect target, and the operator guide documents
the footgun.

Chose observability because no known exploit path exists (needs service
environment control); the tag gate remains an option if that changes.

---------

Co-authored-by: Amperstrand <amperstrand@localhost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants