fix: clarify publish-deb auth failure #59

Merged
andres merged 2 commits from build/57-publish-deb-auth-message into main 2026-09-03 07:30:12 +00:00

Closes #57

Worklog

  • Add failing coverage for the empty-token diagnostic and a non-empty environment token
  • Update the publish script authentication documentation and diagnostic
  • Add the changelog fragment
  • Run focused and full verification
  • Confirm the final diff is limited to the three authorized files

Acceptance criteria

  • With STOKE_TOKEN unset and no stored config, the script exits 1, writes nothing to stdout, and names STOKE_TOKEN, RELEASE_TOKEN, and the empty-secret cause on stderr.
  • The CI remedy appears before the local stoke auth login remedy.
  • test/publish-deb.test.js covers both the empty-token failure and a non-empty token passing the guard without exposing the token.
  • The diff contains only scripts/publish-deb.sh, test/publish-deb.test.js, and changelog.d/57.md.
  • npm test passes and ci / test is green on the PR head.

Round log

Round at 3068809b

Round passed with no written reply.

Closes #57 ## Worklog - [x] Add failing coverage for the empty-token diagnostic and a non-empty environment token - [x] Update the publish script authentication documentation and diagnostic - [x] Add the changelog fragment - [x] Run focused and full verification - [x] Confirm the final diff is limited to the three authorized files ## Acceptance criteria - [x] With `STOKE_TOKEN` unset and no stored config, the script exits 1, writes nothing to stdout, and names `STOKE_TOKEN`, `RELEASE_TOKEN`, and the empty-secret cause on stderr. - [x] The CI remedy appears before the local `stoke auth login` remedy. - [x] `test/publish-deb.test.js` covers both the empty-token failure and a non-empty token passing the guard without exposing the token. - [x] The diff contains only `scripts/publish-deb.sh`, `test/publish-deb.test.js`, and `changelog.d/57.md`. - [x] `npm test` passes and `ci / test` is green on the PR head. ## Round log <!-- round:3068809b667dfa5defc278d40e0e53fb42276ee2 --> **Round at 3068809b** _Round passed with no written reply._
codex-bot-andresmgsl added 1 commit 2026-09-02 22:39:04 +00:00
test: cover publish-deb token guard
Some checks failed
labels / labels (pull_request) Successful in 11s
ci / test (pull_request) Failing after 16s
56c8f00d8b
forgejo-actions added the
blocker:ci-red
state:building
labels 2026-09-02 22:39:18 +00:00
codex-bot-andresmgsl added 1 commit 2026-09-02 22:39:41 +00:00
fix: clarify publish-deb auth failure
All checks were successful
labels / labels (pull_request) Successful in 12s
ci / test (pull_request) Successful in 17s
3068809b66
forgejo-actions added
scope:packaging
and removed
blocker:ci-red
labels 2026-09-02 22:39:57 +00:00
Author
Member

Build answer for head 3068809b66:

  • The empty-token path still exits 1 with no stdout and now names STOKE_TOKEN, its CI source secrets.RELEASE_TOKEN, and the empty/unreadable-secret cause before the local login remedy.
  • The authentication header documents the same CI source; token lookup order, upload/status handling, and exit codes are unchanged.
  • test/publish-deb.test.js runs the real script in isolated config and covers both the empty-token diagnostic and a non-empty STOKE_TOKEN passing the guard through a network-free curl stub; captured output does not expose the token.
  • changelog.d/57.md records the behavior change.

Verified: node --test test/publish-deb.test.js passes 2/2; npm test passes 143/143; git diff --check origin/main...HEAD passes; the changed-path audit contains exactly the three issue-authorized files; same-head ci / test and labels / labels both report SUCCESS.

Build answer for head 3068809b667dfa5defc278d40e0e53fb42276ee2: - The empty-token path still exits 1 with no stdout and now names `STOKE_TOKEN`, its CI source `secrets.RELEASE_TOKEN`, and the empty/unreadable-secret cause before the local login remedy. - The authentication header documents the same CI source; token lookup order, upload/status handling, and exit codes are unchanged. - `test/publish-deb.test.js` runs the real script in isolated config and covers both the empty-token diagnostic and a non-empty `STOKE_TOKEN` passing the guard through a network-free curl stub; captured output does not expose the token. - `changelog.d/57.md` records the behavior change. Verified: `node --test test/publish-deb.test.js` passes 2/2; `npm test` passes 143/143; `git diff --check origin/main...HEAD` passes; the changed-path audit contains exactly the three issue-authorized files; same-head `ci / test` and `labels / labels` both report SUCCESS.
Author
Member

📣 round answered at head 3068809b66

📣 round answered at head 3068809b667dfa5defc278d40e0e53fb42276ee2
codex-bot-andresmgsl changed title from WIP: fix: clarify publish-deb auth failure to fix: clarify publish-deb auth failure 2026-09-02 22:40:51 +00:00
codex-bot-andresmgsl requested review from glm-bot-andresmgsl 2026-09-02 22:45:52 +00:00
codex-bot-andresmgsl requested review from claude-bot-andresmgsl 2026-09-02 22:45:52 +00:00
codex-bot-andresmgsl requested review from kimi-bot-andresmgsl 2026-09-02 22:45:52 +00:00
codex-bot-andresmgsl added the
state:bots-reviewing
label 2026-09-02 22:45:53 +00:00
forgejo-actions removed the
state:building
label 2026-09-02 22:46:12 +00:00

🔎 reviewing head 3068809b66

Acceptance criteria (issue #57), all settled:

  • Empty token → exit 1, empty stdout, stderr names STOKE_TOKEN, RELEASE_TOKEN, empty-secret cause — verified by running the script.
  • CI remedy precedes the local stoke auth login remedy.
  • test/publish-deb.test.js covers the empty-token diagnostic and a non-empty token passing the guard; token absent from captured output.
  • Diff is exactly scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md; release.yml, publish-release.sh and the L35-49 upload/status logic untouched.
  • npm test 143/143 pass locally; ci / test and labels / labels both success on this head.

Extra verification: 7 mutants of the guard/message all killed by the new test; stored-config fallback still resolves a token and reaches curl; shellcheck clean; check:governance passes.

Verdict submitted.

🔎 reviewing head 3068809b667dfa5defc278d40e0e53fb42276ee2 Acceptance criteria (issue #57), all settled: - [x] Empty token → exit 1, empty stdout, stderr names `STOKE_TOKEN`, `RELEASE_TOKEN`, empty-secret cause — verified by running the script. - [x] CI remedy precedes the local `stoke auth login` remedy. - [x] `test/publish-deb.test.js` covers the empty-token diagnostic and a non-empty token passing the guard; token absent from captured output. - [x] Diff is exactly `scripts/publish-deb.sh`, `test/publish-deb.test.js`, `changelog.d/57.md`; `release.yml`, `publish-release.sh` and the L35-49 upload/status logic untouched. - [x] `npm test` 143/143 pass locally; `ci / test` and `labels / labels` both success on this head. Extra verification: 7 mutants of the guard/message all killed by the new test; stored-config fallback still resolves a token and reaches curl; shellcheck clean; `check:governance` passes. Verdict submitted.

🔎 reviewing head 3068809b66

  • Read against issue #57 spec; all five acceptance criteria verified.
  • Ran full suite on this box with standalone Node v22.20.0 (box had no node): 143/143 pass, incl. new test/publish-deb.test.js; check:governance green; CI rollup success on head.
  • Failure cases probed: new test fails against the pre-change script and against a message with RELEASE_TOKEN dropped (both restored).
  • Diff vs merge base 088e7e2 is exactly scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md; fragment matches repo convention.
🔎 reviewing head 3068809b667dfa5defc278d40e0e53fb42276ee2 - Read against issue #57 spec; all five acceptance criteria verified. - Ran full suite on this box with standalone Node v22.20.0 (box had no node): 143/143 pass, incl. new test/publish-deb.test.js; check:governance green; CI rollup success on head. - Failure cases probed: new test fails against the pre-change script and against a message with RELEASE_TOKEN dropped (both restored). - Diff vs merge base 088e7e2 is exactly scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md; fragment matches repo convention.

🔎 reviewing head 3068809b66

  • Worktree detached at head; diff = scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md only
  • Live probe (no token, no config): exit 1, stdout empty, stderr names STOKE_TOKEN + RELEASE_TOKEN + empty-secret cause; CI remedy precedes local remedy
  • npm ci + npm test: 143/143 pass; ci / test = success on head via status API
  • Failure probes: dropping STOKE_TOKEN from message fails test 1; over-tightened guard fails test 2
  • All acceptance criteria met; verdict: approve
🔎 reviewing head 3068809b667dfa5defc278d40e0e53fb42276ee2 - Worktree detached at head; diff = scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md only - Live probe (no token, no config): exit 1, stdout empty, stderr names STOKE_TOKEN + RELEASE_TOKEN + empty-secret cause; CI remedy precedes local remedy - npm ci + npm test: 143/143 pass; ci / test = success on head via status API - Failure probes: dropping STOKE_TOKEN from message fails test 1; over-tightened guard fails test 2 - All acceptance criteria met; verdict: approve
glm-bot-andresmgsl approved these changes 2026-09-02 22:54:19 +00:00
glm-bot-andresmgsl left a comment
Member

Approve — head 3068809b66 meets every acceptance criterion of #57.

What I verified (ran, not read-only):

  • Empty-token failure, live: scripts/publish-deb.sh with STOKE_TOKEN unset, STOKE_CONFIG_FILE at a missing path, temp HOME → exit 1, zero bytes on stdout, stderr names all three required facts (STOKE_TOKEN, secrets.RELEASE_TOKEN, "an empty value means the secret is unset or unreadable … not that the tool is missing"). error: prefix, stderr, and exit 1 preserved.
  • Ordering: the CI cause precedes the local remedy; the test additionally asserts indexOf('RELEASE_TOKEN') < indexOf('stoke auth login'). No CI-detection branch — one message serves both readers, per the spec.
  • Tests: npm ci then npm test in a detached worktree at the head: 143/143 pass (the fresh worktree initially lacked node_modules; the 66 failures before npm ci were the missing commander dependency, an environment gap, not the PR). ci / test (pull_request) reports success on the head via the commit-status API.
  • Failure cases actually fail (mutation probes, worktree restored clean afterwards): removing STOKE_TOKEN from the message fails test 1; forcing the guard to reject (if true) fails test 2 — so the non-empty-token test genuinely pins the guard against false positives.
  • Token hygiene: test 2 asserts the token value appears in neither captured stdout nor stderr; the stubbed curl isolates the run from network, and the env is constructed fresh (no process.env spread, temp HOME, STOKE_CONFIG_FILE honored by src/config.js).
  • Diff scope: exactly scripts/publish-deb.sh, test/publish-deb.test.js, changelog.d/57.md. Upload/status logic (now L43–59), release.yml, and publish-release.sh untouched. Header comment names secrets.RELEASE_TOKEN as the CI source.
  • Conventions: CommonJS, node:test, fragment format matches changelog.d/54.md byte-for-byte in shape. Closes #57 is correct — all criteria are pre-merge.

What I could not verify: Forgejo CI's internal logs (only its reported status on the head — success); nothing else material.

Non-blocking nit, builder's discretion: the release-notes sentence ends "(#57)." — the double period after the parenthesis matches the existing 54.md convention, so I would leave it.

On-panel verdict (stoke roster, CONTRIBUTING.md); author codex-bot-andresmgsl subtracted per #224.

Approve — head 3068809b667dfa5defc278d40e0e53fb42276ee2 meets every acceptance criterion of #57. What I verified (ran, not read-only): - **Empty-token failure, live**: `scripts/publish-deb.sh` with `STOKE_TOKEN` unset, `STOKE_CONFIG_FILE` at a missing path, temp `HOME` → exit 1, zero bytes on stdout, stderr names all three required facts (`STOKE_TOKEN`, `secrets.RELEASE_TOKEN`, "an empty value means the secret is unset or unreadable … not that the tool is missing"). `error:` prefix, stderr, and `exit 1` preserved. - **Ordering**: the CI cause precedes the local remedy; the test additionally asserts `indexOf('RELEASE_TOKEN') < indexOf('stoke auth login')`. No CI-detection branch — one message serves both readers, per the spec. - **Tests**: `npm ci` then `npm test` in a detached worktree at the head: **143/143 pass** (the fresh worktree initially lacked `node_modules`; the 66 failures before `npm ci` were the missing `commander` dependency, an environment gap, not the PR). `ci / test (pull_request)` reports **success** on the head via the commit-status API. - **Failure cases actually fail** (mutation probes, worktree restored clean afterwards): removing `STOKE_TOKEN` from the message fails test 1; forcing the guard to reject (`if true`) fails test 2 — so the non-empty-token test genuinely pins the guard against false positives. - **Token hygiene**: test 2 asserts the token value appears in neither captured stdout nor stderr; the stubbed `curl` isolates the run from network, and the env is constructed fresh (no `process.env` spread, temp `HOME`, `STOKE_CONFIG_FILE` honored by `src/config.js`). - **Diff scope**: exactly `scripts/publish-deb.sh`, `test/publish-deb.test.js`, `changelog.d/57.md`. Upload/status logic (now L43–59), `release.yml`, and `publish-release.sh` untouched. Header comment names `secrets.RELEASE_TOKEN` as the CI source. - **Conventions**: CommonJS, `node:test`, fragment format matches `changelog.d/54.md` byte-for-byte in shape. `Closes #57` is correct — all criteria are pre-merge. What I could not verify: Forgejo CI's internal logs (only its reported status on the head — success); nothing else material. Non-blocking nit, builder's discretion: the release-notes sentence ends "(#57)." — the double period after the parenthesis matches the existing 54.md convention, so I would leave it. On-panel verdict (stoke roster, CONTRIBUTING.md); author codex-bot-andresmgsl subtracted per #224.
claude-bot-andresmgsl approved these changes 2026-09-02 22:54:38 +00:00
claude-bot-andresmgsl left a comment
Member

Approve — head 3068809b667dfa5defc278d40e0e53fb42276ee2.

Reviewed the whole PR at this head in a detached worktree against #57's acceptance criteria, then the repo's constraints, then the code.

Acceptance criteria

All five hold, checked by running rather than reading:

  1. Empty token → exit 1, silent stdout, three facts on stderr. Ran scripts/publish-deb.sh with STOKE_TOKEN= and STOKE_CONFIG_FILE pointed at a missing path: exit 1, stdout empty, stderr names STOKE_TOKEN, secrets.RELEASE_TOKEN, and that an empty value means the secret is unset or unreadable "not that the tool is missing". error: prefix and exit 1 both kept.
  2. CI remedy first. The secrets.RELEASE_TOKEN sentence precedes Locally: … stoke auth login, and the test asserts the ordering by index rather than by eyeball. No CI/GITHUB_ACTIONS branch was introduced, as the spec required.
  3. test/publish-deb.test.js covers both cases. Empty-token diagnostic and a non-empty STOKE_TOKEN reaching Published. through a curl stub on PATH — no network, and the guard fires well before the real curl.
  4. Diff scope exact. git diff main..HEAD --stat is scripts/publish-deb.sh (+12/-2), test/publish-deb.test.js (new), changelog.d/57.md (new) and nothing else. release.yml, publish-release.sh, and the upload/status case are untouched; the only script hunks are the L12 header comment and the guard block.
  5. npm test and CI. 143/143 pass locally on Node v22.23.2 after npm ci. On this head the API reports ci / test success and labels / labels success.

Failure cases actually fail

The criterion I care most about is whether the new test would have caught the bug it exists to prevent, so I mutated the script seven ways and re-ran node --test test/publish-deb.test.js. All seven are killed:

mutant result
restore the pre-fix one-line error: no token. Set STOKE_TOKEN or run: stoke auth login test 1 fails
message names RELEASE_TOKEN but drops STOKE_TOKEN (the regression #57's test plan names explicitly) test 1 fails
swap the remedies so the local one prints first test 1 fails
[ -z ][ -n ], i.e. the guard tightened into a false positive tests 1 and 2 fail
drop the empty-value-means-the-secret clause test 1 fails
diagnostic to stdout instead of stderr test 1 fails
guard exit 0 instead of exit 1 test 1 fails

The false-positive case is the one the issue singled out, and it is the only mutant that reds both tests — the two cases are pulling in opposite directions as intended, not restating each other.

Isolation

The test builds a fresh env object rather than spreading process.env, and sets STOKE_CONFIG_FILE to a non-existent path plus a temp HOME. I checked that this is real and not incidental: planting {"token":"…"} at ~/.config/stoke/config.json and re-running leaves both tests green, so a reviewer or CI box with a stored token cannot turn the empty-token case into a false pass. src/config.js:20 gives STOKE_CONFIG_FILE precedence over getConfigDir(), which is what makes that hold.

Constraints and conventions

  • Two-source auth preserved. L29-31 are unchanged, and no test covers the stored-config branch, so I probed it directly: with STOKE_TOKEN unset and a config file present, the script resolves the config token, honours the config url, and reaches curl with Authorization: token …. The fallback the issue told the builder to keep is intact.
  • changelog.d/57.md matches changelog.d/<issue>.md, is a single - bullet well under 300 characters, and ends (#57). with nothing after — byte-identical in shape to 54.md, 48.md, 43.md. No headings, consistent with every prior fragment in this repo; grouping happens at release assembly. CHANGELOG.md correctly untouched.
  • shellcheck scripts/publish-deb.sh is clean and bash -n parses; the quoted <<'EOF' heredoc is safe under set -euo pipefail and the backticks around stoke auth login are not expanded.
  • npm run check:governance passes: test/*.test.js is in UNSCOPED_PATHS (scripts/check-governance.js:10), so the new test file needs no scope mapping, and scope:packaging correctly covers scripts/** and changelog.d/**.
  • Closes #57 is right here: #57's task list explicitly sanctions either keyword because every criterion is pre-merge, so the Refs-body adjacency rule does not apply.

What I could not verify

  • I did not re-run the CI job; I read ci / test and labels / labels as success from commits/<sha>/status and reproduced npm ci && npm test && npm run check:governance locally, which is exactly what .forgejo/workflows/ci.yml runs.
  • The real registry upload is unexercised, by design — the issue puts the curl and the status handling out of scope, and the test contract forbids reaching the network.
  • Run 735 itself is not reproducible from here; I verified the new message against the criteria rather than against a live failing release.

Non-blocking nits

Neither gates this approval; take or leave them.

  1. assert.doesNotMatch(result.stdout/stderr, TOKEN) is close to vacuous as written — the script never echoes the token, so those two lines pass no matter what happens to curl's argv. The sibling test/publish-release.test.js:103 gets real value from the same idea because its stub logs process.argv; a two-line printf '%s\n' "$*" >> "$LOG" in the curl stub would let this file assert the token reached the Authorization header and stayed out of anything captured. Worth having whenever the upload path is next touched.
  2. The stored-config token path now has a publish-deb test file to live in but still no case in it. Out of scope for #57 — noting it so it is a deliberate gap rather than an assumed one.
**Approve** — head `3068809b667dfa5defc278d40e0e53fb42276ee2`. Reviewed the whole PR at this head in a detached worktree against #57's acceptance criteria, then the repo's constraints, then the code. ## Acceptance criteria All five hold, checked by running rather than reading: 1. **Empty token → exit 1, silent stdout, three facts on stderr.** Ran `scripts/publish-deb.sh` with `STOKE_TOKEN=` and `STOKE_CONFIG_FILE` pointed at a missing path: exit 1, stdout empty, stderr names `STOKE_TOKEN`, `secrets.RELEASE_TOKEN`, and that an empty value means the secret is unset or unreadable "not that the tool is missing". `error: ` prefix and `exit 1` both kept. 2. **CI remedy first.** The `secrets.RELEASE_TOKEN` sentence precedes `Locally: … stoke auth login`, and the test asserts the ordering by index rather than by eyeball. No `CI`/`GITHUB_ACTIONS` branch was introduced, as the spec required. 3. **`test/publish-deb.test.js` covers both cases.** Empty-token diagnostic and a non-empty `STOKE_TOKEN` reaching `Published.` through a `curl` stub on `PATH` — no network, and the guard fires well before the real `curl`. 4. **Diff scope exact.** `git diff main..HEAD --stat` is `scripts/publish-deb.sh` (+12/-2), `test/publish-deb.test.js` (new), `changelog.d/57.md` (new) and nothing else. `release.yml`, `publish-release.sh`, and the upload/status `case` are untouched; the only script hunks are the L12 header comment and the guard block. 5. **`npm test` and CI.** 143/143 pass locally on Node v22.23.2 after `npm ci`. On this head the API reports `ci / test` **success** and `labels / labels` **success**. ## Failure cases actually fail The criterion I care most about is whether the new test would have caught the bug it exists to prevent, so I mutated the script seven ways and re-ran `node --test test/publish-deb.test.js`. All seven are killed: | mutant | result | |---|---| | restore the pre-fix one-line `error: no token. Set STOKE_TOKEN or run: stoke auth login` | test 1 fails | | message names `RELEASE_TOKEN` but drops `STOKE_TOKEN` (the regression #57's test plan names explicitly) | test 1 fails | | swap the remedies so the local one prints first | test 1 fails | | `[ -z ]` → `[ -n ]`, i.e. the guard tightened into a false positive | tests 1 **and** 2 fail | | drop the empty-value-means-the-secret clause | test 1 fails | | diagnostic to stdout instead of stderr | test 1 fails | | guard `exit 0` instead of `exit 1` | test 1 fails | The false-positive case is the one the issue singled out, and it is the only mutant that reds both tests — the two cases are pulling in opposite directions as intended, not restating each other. ## Isolation The test builds a fresh `env` object rather than spreading `process.env`, and sets `STOKE_CONFIG_FILE` to a non-existent path plus a temp `HOME`. I checked that this is real and not incidental: planting `{"token":"…"}` at `~/.config/stoke/config.json` and re-running leaves both tests green, so a reviewer or CI box with a stored token cannot turn the empty-token case into a false pass. `src/config.js:20` gives `STOKE_CONFIG_FILE` precedence over `getConfigDir()`, which is what makes that hold. ## Constraints and conventions - **Two-source auth preserved.** L29-31 are unchanged, and no test covers the stored-config branch, so I probed it directly: with `STOKE_TOKEN` unset and a config file present, the script resolves the config token, honours the config `url`, and reaches `curl` with `Authorization: token …`. The fallback the issue told the builder to keep is intact. - `changelog.d/57.md` matches `changelog.d/<issue>.md`, is a single `- ` bullet well under 300 characters, and ends `(#57).` with nothing after — byte-identical in shape to `54.md`, `48.md`, `43.md`. No headings, consistent with every prior fragment in this repo; grouping happens at release assembly. `CHANGELOG.md` correctly untouched. - `shellcheck scripts/publish-deb.sh` is clean and `bash -n` parses; the quoted `<<'EOF'` heredoc is safe under `set -euo pipefail` and the backticks around `stoke auth login` are not expanded. - `npm run check:governance` passes: `test/*.test.js` is in `UNSCOPED_PATHS` (`scripts/check-governance.js:10`), so the new test file needs no scope mapping, and `scope:packaging` correctly covers `scripts/**` and `changelog.d/**`. - `Closes #57` is right here: #57's task list explicitly sanctions either keyword because every criterion is pre-merge, so the `Refs`-body adjacency rule does not apply. ## What I could not verify - **I did not re-run the CI job**; I read `ci / test` and `labels / labels` as success from `commits/<sha>/status` and reproduced `npm ci && npm test && npm run check:governance` locally, which is exactly what `.forgejo/workflows/ci.yml` runs. - **The real registry upload is unexercised**, by design — the issue puts the `curl` and the status handling out of scope, and the test contract forbids reaching the network. - **Run 735 itself is not reproducible from here**; I verified the new message against the criteria rather than against a live failing release. ## Non-blocking nits Neither gates this approval; take or leave them. 1. `assert.doesNotMatch(result.stdout/stderr, TOKEN)` is close to vacuous as written — the script never echoes the token, so those two lines pass no matter what happens to `curl`'s argv. The sibling `test/publish-release.test.js:103` gets real value from the same idea because its stub logs `process.argv`; a two-line `printf '%s\n' "$*" >> "$LOG"` in the `curl` stub would let this file assert the token reached the `Authorization` header and stayed out of anything captured. Worth having whenever the upload path is next touched. 2. The stored-config token path now has a `publish-deb` test file to live in but still no case in it. Out of scope for #57 — noting it so it is a deliberate gap rather than an assumed one.
kimi-bot-andresmgsl approved these changes 2026-09-02 22:55:28 +00:00
kimi-bot-andresmgsl left a comment
Member

Approve. Reviewed the whole PR at head 3068809b in a detached worktree against the acceptance criteria of #57.

Acceptance criteria — all five verified:

  1. Empty-token failure: scripts/publish-deb.sh now exits 1, writes nothing to stdout, and the stderr message names STOKE_TOKEN, secrets.RELEASE_TOKEN, and that an empty value means the secret — not the tooling — is the fault.
  2. The CI remedy appears before the local stoke auth login remedy in the message.
  3. test/publish-deb.test.js covers both the empty-token failure and a non-empty STOKE_TOKEN passing the guard, and asserts the token value appears in neither stdout nor stderr. It stubs curl and never reaches the network.
  4. git diff against the merge base (088e7e2) touches exactly scripts/publish-deb.sh, test/publish-deb.test.js, and changelog.d/57.md — no change to release.yml, publish-release.sh, or the upload/status logic.
  5. npm test passes: 143/143 on this box (see verification note), and the commit-status rollup on the head is success.

Failure cases actually fail (probed, then restored): the new empty-token test fails when run against the pre-change script, and fails when the message drops RELEASE_TOKEN — so the test guards the regression it claims to, not just the happy path.

Conventions: the changelog.d/57.md fragment matches the repo's existing fragment style (- <sentence>. (#N).); the header-comment update landed in the same commit as the message, per the issue's tasks; scope:packaging label is correct for the touched paths; npm run check:governance is green.

What I could not verify and what I relied on instead: this box ships without node, so I could not use the system toolchain. I ran the suite with a standalone Node v22.20.0 tarball (matching the CI image node:22-bookworm and engines >=22.12.0) extracted inside the duty trees directory, with dependencies from npm ci. Everything above was executed, not read. The only thing I did not run myself is CI's ci / test job; I relied on the green commit-status rollup on the head plus my local full-suite pass.

Approve. Reviewed the whole PR at head 3068809b in a detached worktree against the acceptance criteria of #57. **Acceptance criteria — all five verified:** 1. Empty-token failure: `scripts/publish-deb.sh` now exits 1, writes nothing to stdout, and the stderr message names `STOKE_TOKEN`, `secrets.RELEASE_TOKEN`, and that an empty value means the secret — not the tooling — is the fault. 2. The CI remedy appears before the local `stoke auth login` remedy in the message. 3. `test/publish-deb.test.js` covers both the empty-token failure and a non-empty `STOKE_TOKEN` passing the guard, and asserts the token value appears in neither stdout nor stderr. It stubs `curl` and never reaches the network. 4. `git diff` against the merge base (088e7e2) touches exactly `scripts/publish-deb.sh`, `test/publish-deb.test.js`, and `changelog.d/57.md` — no change to `release.yml`, `publish-release.sh`, or the upload/status logic. 5. `npm test` passes: 143/143 on this box (see verification note), and the commit-status rollup on the head is success. **Failure cases actually fail (probed, then restored):** the new empty-token test fails when run against the pre-change script, and fails when the message drops `RELEASE_TOKEN` — so the test guards the regression it claims to, not just the happy path. **Conventions:** the `changelog.d/57.md` fragment matches the repo's existing fragment style (`- <sentence>. (#N).`); the header-comment update landed in the same commit as the message, per the issue's tasks; `scope:packaging` label is correct for the touched paths; `npm run check:governance` is green. **What I could not verify and what I relied on instead:** this box ships without `node`, so I could not use the system toolchain. I ran the suite with a standalone Node v22.20.0 tarball (matching the CI image `node:22-bookworm` and `engines >=22.12.0`) extracted inside the duty trees directory, with dependencies from `npm ci`. Everything above was executed, not read. The only thing I did not run myself is CI's `ci / test` job; I relied on the green commit-status rollup on the head plus my local full-suite pass.
codex-bot-andresmgsl requested review from andres 2026-09-02 22:57:22 +00:00
codex-bot-andresmgsl added the
state:needs-human
label 2026-09-02 22:57:23 +00:00
forgejo-actions removed the
state:bots-reviewing
label 2026-09-02 22:57:45 +00:00
andres merged commit bbde478157 into main 2026-09-03 07:30:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 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: heavy-duty/stoke#59
No description provided.