Skip to content

Commit a41d162

Browse files
authored
fix: release clawock and clawock-dsh 0.4.3 (#3439)
Release `clawock` and `clawock-dsh` 0.4.3 together. - Bump `pyproject.toml`, the plugin `package.json` and both root lockfile version fields to 0.4.3; add the 0.4.3 changelog covering the DSH Workbench, dispatch API 7, shared-memory review gates, and the quote/brief/FX fixes since 0.4.2. - npm now publishes through the package's trusted publisher, not a token: drop `NODE_AUTH_TOKEN`, pin npm 11.21.2 (trusted publishing requires >= 11.5.1), and strip setup-node's empty `_authToken` line — otherwise npm treats the empty credential as configured and skips the OIDC exchange (actions/setup-node#1551). - Document the npm trusted-publisher setup and the tokenless CI path in `docs/operations/release.md`. - Refresh the npm README for the Workbench: both DSH surfaces in the intro, duplicate Workbench sections merged, legacy "chip" wording replaced, the read-only claim corrected (the Workbench steers tasks through the ops entry), and the maintainer publish path corrected to the publish script. Validation: `tests/test_versions_agree.py`, `tests/test_github_release_contract.py`, `tests/test_publish_dsh_readback.py` and `tests/test_workflow_health.py` pass locally (51 passed); `ruff check` passes on the changed test file; `python3 ops/publish/release_notes.py 0.4.3` renders; `git diff --check` is clean. Full CI runs here. After the required checks pass: squash-merge, tag the merge commit `v0.4.3`, push the tag, and verify the tag-triggered Release run publishes PyPI and npm and creates the GitHub Release.
1 parent 573517e commit a41d162

10 files changed

Lines changed: 219 additions & 112 deletions

File tree

‎.github/actions/clawock-node/action.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ runs:
1010
cache-dependency-path: examples/dsh/packages/clawock-dsh/package-lock.json
1111
registry-url: https://registry.npmjs.org
1212
# Pin the publishing tool: runner-bundled npm previously crashed mid-release.
13+
# 11.5.1 is also the first npm that can authenticate with a trusted
14+
# publisher's OIDC identity; npm 10 silently cannot, and the release would
15+
# fail only at the publish step. Pin the 11.x line rather than npm 12,
16+
# whose install-script default changed under the plugin's native build.
1317
- shell: bash
14-
run: npm install -g npm@10.9.8
18+
run: npm install -g npm@11.21.2

‎.github/workflows/release.yml‎

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,9 @@ jobs:
190190
timeout-minutes: 10
191191
permissions:
192192
contents: read
193-
# The OIDC token npm exchanges for a provenance attestation. Without it
194-
# `npm publish --provenance` cannot run, and the publish script degrades
195-
# to an unsigned publish rather than failing — so this line is the whole
196-
# difference between a signed and an unsigned release.
193+
# Trusted publishing: npm verifies this workflow's OIDC identity in place
194+
# of a long-lived token. The same token signs the provenance attestation.
195+
# Without this permission neither can happen.
197196
id-token: write
198197
env:
199198
# 2026-08-17: the 0.1.6 npm job died because its package-lock.json had
@@ -214,9 +213,46 @@ jobs:
214213

215214
- uses: ./.github/actions/clawock-node
216215

216+
- name: Require OIDC trusted publishing
217+
# The package's trusted publisher names this repository, this workflow
218+
# and the npm publish action. Its first successful publish is also what
219+
# moves it from "pending validation" to active, so this job must not
220+
# quietly authenticate another way: a token would make the release
221+
# succeed while leaving that validation unproven.
222+
#
223+
# npm's trusted publishing needs 11.5.1 or newer; clawock-node pins a
224+
# newer 11.x for exactly this path.
225+
run: |
226+
set -euo pipefail
227+
if [ -n "${NODE_AUTH_TOKEN:-}" ]; then
228+
echo "::error::NODE_AUTH_TOKEN is set; this release must publish through OIDC trusted publishing"
229+
exit 1
230+
fi
231+
232+
# actions/setup-node#1551. `registry-url` makes setup-node write
233+
# `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}`. With no token
234+
# on the OIDC path that is an *empty* credential line, so npm decides
235+
# it is already authenticated and never starts the OIDC exchange; the
236+
# registry then answers 404, which reads exactly like a missing
237+
# trusted publisher. Keep the registry entry, drop the token line.
238+
# Without registry-url npm stops earlier with ENEEDAUTH instead.
239+
npmrc="${NPM_CONFIG_USERCONFIG:-$HOME/.npmrc}"
240+
if [ -f "$npmrc" ]; then
241+
sed -i '/_authToken/d' "$npmrc"
242+
echo "stripped the empty _authToken line from $npmrc so npm attempts the OIDC exchange"
243+
fi
244+
245+
npm_version="$(npm --version)"
246+
echo "npm ${npm_version}"
247+
node -e '
248+
const [major, minor, patch] = process.argv[1].split(".").map((part) => parseInt(part, 10));
249+
if (major < 11 || (major === 11 && (minor < 5 || (minor === 5 && patch < 1)))) {
250+
console.error("npm " + process.argv[1] + " cannot use trusted publishing; need >= 11.5.1");
251+
process.exit(1);
252+
}
253+
' "$npm_version"
254+
217255
- name: Publish clawock-dsh to npm
218-
env:
219-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
220256
run: |
221257
# The version lives in pyproject.toml; on a v* tag the build job has
222258
# already refused a tag that disagrees with it. Deriving it here

‎CHANGELOG.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,34 @@ versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1313
The newest heading here has to match the version in `pyproject.toml` — CI fails
1414
otherwise, so a release cannot ship an entry that was never written.
1515

16+
## [0.4.3] — 2026-11-13
17+
18+
### Added
19+
20+
- The DSH plugin's **Workbench** is a full page with Tasks, Providers and Overview segments, keeping the whole task detail, every provider quota window and the system overview on one surface, with a full-page queue on desktop and a drawer on phones ([#3273](https://github.com/KCNyu/clawock/pull/3273), [#3278](https://github.com/KCNyu/clawock/pull/3278), [#3280](https://github.com/KCNyu/clawock/pull/3280), [#3283](https://github.com/KCNyu/clawock/pull/3283)).
21+
- Dispatch API 7: questions answered inside the task's own session, idempotency keys for automated callers, `dispatch.sh why`, waiting for external results without holding the agent lock, reaping tasks whose runner disappeared, and metadata search across earlier tasks ([#3249](https://github.com/KCNyu/clawock/pull/3249), [#3250](https://github.com/KCNyu/clawock/pull/3250), [#3251](https://github.com/KCNyu/clawock/pull/3251), [#3252](https://github.com/KCNyu/clawock/pull/3252), [#3253](https://github.com/KCNyu/clawock/pull/3253), [#3235](https://github.com/KCNyu/clawock/pull/3235)).
22+
- Shared memory generates `MEMORY.md` from reviewed public topics, recalls from every session, reports consolidation and retirement candidates, and promotes reviewed dreaming candidates instead of editing live memory ([#3314](https://github.com/KCNyu/clawock/pull/3314), [#3315](https://github.com/KCNyu/clawock/pull/3315), [#3316](https://github.com/KCNyu/clawock/pull/3316), [#3320](https://github.com/KCNyu/clawock/pull/3320), [#3321](https://github.com/KCNyu/clawock/pull/3321)).
23+
- Market cards add session progress and open risk follow-ups ([#3236](https://github.com/KCNyu/clawock/pull/3236)).
24+
- The memory index is maintained offline, cutting KNN oversampling ([#3265](https://github.com/KCNyu/clawock/pull/3265)).
25+
26+
### Changed
27+
28+
- The sidebar has one Workbench entry; provider quotas, the task queue, and patrol/statistics/history live in its Providers, Tasks and Overview segments instead of a permanent footer row ([#3276](https://github.com/KCNyu/clawock/pull/3276), [#3278](https://github.com/KCNyu/clawock/pull/3278)).
29+
- Provider rows print every quota window, colour by the tightest window, keep money in its local currency, and total mixed-provider API estimates in USD ([#3261](https://github.com/KCNyu/clawock/pull/3261), [#3303](https://github.com/KCNyu/clawock/pull/3303), [#3338](https://github.com/KCNyu/clawock/pull/3338), [#3340](https://github.com/KCNyu/clawock/pull/3340)).
30+
- Agent dispatch runs OpenCode v2 and keeps external task prose in context files rather than the instruction ([#3254](https://github.com/KCNyu/clawock/pull/3254), [#3257](https://github.com/KCNyu/clawock/pull/3257)).
31+
- Quota refresh and cancellation share one status path, and the dispatch price table follows the model registry ([#3238](https://github.com/KCNyu/clawock/pull/3238), [#3394](https://github.com/KCNyu/clawock/pull/3394)).
32+
33+
### Fixed
34+
35+
- A quote without a prior close clears its stale day change instead of publishing a made-up flat day, and a missing daily range stays distinct from an unknown session return ([#3245](https://github.com/KCNyu/clawock/pull/3245), [#3396](https://github.com/KCNyu/clawock/pull/3396), [#3438](https://github.com/KCNyu/clawock/pull/3438)).
36+
- Ledger and bar readers keep quoted fills, interrupted archives and bar order from corrupting a later read ([#3428](https://github.com/KCNyu/clawock/pull/3428)); the durable FX ledger is keyed by HKT day and the published USDHKD is checked against it ([#3398](https://github.com/KCNyu/clawock/pull/3398), [#3434](https://github.com/KCNyu/clawock/pull/3434)).
37+
- Brief generation folds its summary to the available headroom, reports an unreadable recovery state instead of going silent, re-reads a pending off-host fallback, re-stamps the read-budget warning, and commits only this generation's ledgers and snapshot ([#3388](https://github.com/KCNyu/clawock/pull/3388), [#3404](https://github.com/KCNyu/clawock/pull/3404), [#3405](https://github.com/KCNyu/clawock/pull/3405), [#3427](https://github.com/KCNyu/clawock/pull/3427), [#3432](https://github.com/KCNyu/clawock/pull/3432), [#3435](https://github.com/KCNyu/clawock/pull/3435)).
38+
- Decision capital is weighted in USD, never by adding HKD and USD nominally ([#3426](https://github.com/KCNyu/clawock/pull/3426)).
39+
- The dsh panel redacts credential parse errors, keeps task titles readable, contains modal focus and geometry, and no longer offers Stop on an ended task ([#3294](https://github.com/KCNyu/clawock/pull/3294), [#3330](https://github.com/KCNyu/clawock/pull/3330), [#3335](https://github.com/KCNyu/clawock/pull/3335), [#3336](https://github.com/KCNyu/clawock/pull/3336), [#3384](https://github.com/KCNyu/clawock/pull/3384)).
40+
- Cron day-of-month and month expansion no longer fires quarterly jobs every day ([#3429](https://github.com/KCNyu/clawock/pull/3429)).
41+
- Shared-memory audit, projection and recall checks fail closed instead of reporting green ([#3323](https://github.com/KCNyu/clawock/pull/3323), [#3324](https://github.com/KCNyu/clawock/pull/3324), [#3325](https://github.com/KCNyu/clawock/pull/3325), [#3326](https://github.com/KCNyu/clawock/pull/3326), [#3329](https://github.com/KCNyu/clawock/pull/3329)).
42+
- Delivery failure receipts keep both the head and tail of the error, and macro, FX and quote labels name their session and source ([#3389](https://github.com/KCNyu/clawock/pull/3389), [#3393](https://github.com/KCNyu/clawock/pull/3393)).
43+
1644
## [0.4.2] — 2026-11-01
1745

1846
### Added

‎docs/operations/release.md‎

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ New commits cancel older runs of the same PR. Each `master` push has a separate
7777
concurrency group, so neither a running nor a pending older commit is replaced.
7878
Coverage publishing consumes the combined report without rerunning tests.
7979

80-
## One-time setup (kcn, on the PyPI side)
80+
## One-time setup (kcn, on the publisher side)
8181

8282
Trusted publishing is used instead of an API token, so nothing long-lived sits
83-
in repository secrets. Configure the publisher at
83+
in repository secrets. Configure the PyPI publisher at
8484
<https://pypi.org/manage/account/publishing/> with:
8585

8686
| field | value |
@@ -94,6 +94,32 @@ in repository secrets. Configure the publisher at
9494
Repeat on <https://test.pypi.org/manage/account/publishing/> with environment
9595
name `testpypi` to be able to rehearse.
9696

97+
The npm side has its own trusted publisher, configured on the package's
98+
settings page (<https://www.npmjs.com/package/clawock-dsh/access>). The release
99+
workflow publishes `clawock-dsh` through it, with no `NODE_AUTH_TOKEN` anywhere:
100+
101+
| field | value |
102+
|---|---|
103+
| Package | `clawock-dsh` |
104+
| Organization or user | `KCNyu` |
105+
| Repository | `clawock` |
106+
| Workflow filename | `release.yml` |
107+
| Environment name | blank — the npm job declares no GitHub environment |
108+
| Allowed actions | `npm publish`, `npm stage publish`, `npm dist-tag` |
109+
110+
A new npm trusted publisher stays **pending validation** until the first
111+
successful publish from that exact repository/workflow. That first publish is
112+
what validates it; a release that authenticates with a token instead leaves the
113+
configuration pending and it can expire. The workflow therefore grants
114+
`id-token: write`, sets no token, and has a step that refuses to run if
115+
`NODE_AUTH_TOKEN` is present. That step also strips the empty
116+
`//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` line which
117+
`actions/setup-node`'s `registry-url` writes: with no token, npm treats that
118+
line as configured credentials and skips the OIDC exchange (the registry then
119+
answers 404, which looks like a missing publisher). npm's trusted publishing
120+
requires npm CLI ≥ 11.5.1 and Node ≥ 22.14; `clawock-node` pins npm 11.21.2 on
121+
Node 22.
122+
97123
Then create the two GitHub environments (`Settings → Environments`): `pypi` and
98124
`testpypi`. Adding yourself as a required reviewer on `pypi` is worth it — the
99125
release job then waits for an explicit approval, and a version number, once
@@ -176,12 +202,15 @@ NPM_TOKEN=... ops/publish/publish_dsh_plugin.sh
176202
NPM_TOKEN=... ops/publish/publish_dsh_plugin.sh "$NEXT"
177203
```
178204

179-
`NPM_TOKEN` is the npm registry auth token and the only environment input the
180-
script needs (a userconfig with registry auth works too). Before touching the
181-
registry it rebuilds the plugin artifacts (`npm install --include=dev &&
182-
npm run build` — src → lib + Typert generation, so the published package never
183-
ships stale committed output) and runs `npm pack --dry-run` to verify the
184-
package, its `skills/investment-decision/SKILL.md`, and the generated
205+
`NPM_TOKEN` is the npm registry auth token for a **local** publish; a userconfig
206+
with registry auth works too. In GitHub Actions the script receives no token:
207+
the release workflow publishes through the package's npm trusted publisher, and
208+
npm exchanges the job's OIDC identity for a short-lived publish credential.
209+
Before touching the registry it rebuilds the plugin artifacts (`npm install
210+
--include=dev && npm run build` — src → lib + Typert generation, so the
211+
published package never ships stale committed output) and runs `npm pack
212+
--dry-run` to verify the package, its
213+
`skills/investment-decision/SKILL.md`, and the generated
185214
`lib/typert.remote-client.js` all exist.
186215

187216
On a `v*` tag the workflow's `npm` job calls the same script with the version

0 commit comments

Comments
 (0)