Commit graph

12 commits

Author SHA1 Message Date
codex-bot-andresmgsl
9cc9576116 fix: limit apt opt-in to known sqv failure
All checks were successful
labels / labels (pull_request) Successful in 12s
ci / test (pull_request) Successful in 17s
2026-08-31 10:57:32 +00:00
codex-bot-andresmgsl
a89eafaebc fix: require opt-in for unverified apt sources
All checks were successful
labels / labels (pull_request) Successful in 12s
ci / test (pull_request) Successful in 17s
2026-08-31 10:48:42 +00:00
claude-lead-andresmgsl
9f34641545 fix: stop attributing the sqv rejection to the key algorithm
All checks were successful
labels / labels (pull_request) Successful in 11s
ci / test (pull_request) Successful in 17s
Refs #1.

`scripts/install-apt.sh` explained the sqv rejection as a malformed MPI
encoding in an Ed25519 key. The registry does not serve one: at
`api/packages/heavy-duty/debian/repository.key`, `gpg --list-packets`
reports `algo 1` (RSA) with a 2048-bit `pkey[0]`. The explanation was
therefore wrong about the only part of itself that was checkable.

The comment now states the measurement and points at #1 for the cause,
rather than naming a mechanism nobody verified. This satisfies #1's
criterion that `git grep -in 25519` return no hits outside test fixtures,
which it now does.

Behaviour is unchanged: this commit edits a comment. The automatic
fallback this file still performs contradicts ruling B and is NOT fixed
here — that work is still owed on !38.
2026-08-31 10:39:02 +00:00
codex-bot-andresmgsl
769a3c8aba fix: read apt credentials through sudo
All checks were successful
labels / labels (pull_request) Successful in 9s
ci / test (pull_request) Successful in 13s
2026-08-30 11:40:41 +00:00
codex-bot-andresmgsl
a28b2ffd74 feat: support private apt registry credentials
All checks were successful
labels / labels (pull_request) Successful in 9s
ci / test (pull_request) Successful in 13s
2026-08-30 11:34:06 +00:00
codex-bot-andresmgsl
acb46d0707 fix: keep apt signature verification on transient failures
All checks were successful
labels / labels (pull_request) Successful in 9s
ci / test (pull_request) Successful in 14s
2026-08-30 11:31:24 +00:00
kimi-reviewer-andresmgsl
8255c568b1 install-apt: fail fast with a clear message when the registry has no Release file 2026-07-26 21:41:16 +00:00
0ecd935528 install-apt: address review nits — apt-readable file modes, test cleanup, clearer refusal error
- chmod 0644 every keyring and sources.list entry after writing: tee
  inherits the caller's umask, and under e.g. umask 077 apt's
  unprivileged _apt user could not read the keyring
- Tests now run the script under umask 077 and assert the 0644 modes
  (mutation-checked: dropping the chmod fails a test), and remove their
  temp directories on exit
- Refusal error now states that metadata was already refreshed before
  concluding the existing nodesource.list is unsuitable

Verified on fresh debian:13 under umask 077: all four files 0644,
install succeeds. npm test 32/32.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 23:17:20 +00:00
444470301c test: stubbed shell tests for the NodeSource bootstrap logic
Covers the scenarios codex-reviewer recommended: suitable candidate
already present (incl. epoch stripping), missing metadata healed by a
refresh, bootstrap on too-old distro nodejs, bootstrap failure, and the
refuse-to-overwrite branch for a user-managed nodesource.list. Every
scenario runs under a localized LC_ALL with an apt-cache stub that only
emits the English Candidate: label under LC_ALL=C, so locale-safe
parsing is regression-tested (mutation-checked: dropping LC_ALL=C fails
3 tests).

install-apt.sh gains STOKE_APT_ETC to redirect /etc/apt to a throwaway
directory under test, following the script's existing env-override
pattern. Real-container flow re-verified on debian:13.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 22:01:51 +00:00
5e99006d04 install-apt: address review — locale-safe parsing, metadata refresh, no list clobber, README order
- Parse apt-cache policy under LC_ALL=C (Candidate: label is localized)
- Refresh apt metadata (best effort) and re-check before concluding no
  suitable nodejs source exists
- Refuse to overwrite an existing /etc/apt/sources.list.d/nodesource.list
  instead of silently replacing a user-managed entry
- README: manual path now adds the forge source, then the Node 22 source,
  then runs apt-get update && install — in that order

Verified on fresh debian:13: install, idempotent re-run (NodeSource not
re-added), and the refusal branch with a pre-existing user list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 21:56:26 +00:00
0b4947b038 install-apt: bootstrap Node 22 via NodeSource when distro nodejs is too old (#1)
The package depends on nodejs (>= 22.12), but Debian 13 ships Node 20 and
Ubuntu 24.04 ships Node 18, so a fresh container failed apt-get install
with an unmet dependency. install-apt.sh now checks whether any configured
apt source can satisfy the requirement and, if not, adds the NodeSource
Node 22 repository before installing. README documents the behaviour and
the manual equivalent.

Verified on fresh debian:13 and ubuntu:24.04 containers: one-line setup,
apt-get install stoke, stoke --version all succeed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 21:39:51 +00:00
Claude
f5615455bf Add apt distribution: deb packaging, registry publish, docs (#1)
Implements #1 — stoke installable with apt-get install stoke.

Packaging:
- scripts/build-deb.sh: builds dist/stoke_<version>_all.deb from a clean
  staging copy (src + fresh npm ci --omit=dev), pure-JS Architecture: all,
  Depends: nodejs (>= 22.12), /usr/lib/stoke payload with /usr/bin/stoke
  symlink, copyright + changelog, normalized permissions. Lintian-clean.
- scripts/publish-deb.sh: uploads a .deb to the Forgejo Debian registry
  (owner/distribution/component parameterized, defaults heavy-duty/
  stable/main), authenticating with STOKE_TOKEN or the stoke login token.
- scripts/install-apt.sh: consumer-side one-time setup — adds the
  registry key and apt source, then apt-get install stoke. Falls back to
  a [trusted=yes] source when apt's sqv verifier rejects the forge's
  registry signature (known upstream Forgejo signing bug; the script
  prefers the signed source so setups heal once the forge is fixed).
- .forgejo/workflows/release.yml: on v* tags — test, build, publish to
  the heavy-duty registry, attach the .deb to the release page. Needs a
  runner and a RELEASE_TOKEN secret with org package write.

New command:
- stoke pr merge (-n, --method merge|rebase|rebase-merge|squash,
  --title, --message, --delete-branch) — gap found while merging !2.

Docs and housekeeping:
- README: 'Install with apt' as the primary installation method with
  manual setup and dpkg fallback, signature caveat, pr merge reference,
  Packaging and releasing section with a release checklist.
- dist/ gitignored; version bumped to 1.2.0.

Verified end-to-end on this machine: built the deb (lintian-clean),
published it to the Forgejo Debian registry, installed it with
apt-get install stoke via install-apt.sh, and confirmed the installed
CLI works against the live forge. The test upload was removed from the
personal namespace afterwards; publishing under heavy-duty needs an
org-member token (401 reqPackageAccess with this restricted account).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 19:41:02 +00:00