Skip to content

Commit d9f88f8

Browse files
authored
feat(kiloclaw): update OpenClaw to 2026.5.22 with live smoke (#3502)
* test(kiloclaw): add live Auto Free image smoke * test(kiloclaw): wrap OpenClaw upgrade smoke flow * test(kiloclaw): harden live image smoke execution * test(kiloclaw): validate OpenClaw config in live smoke * test(kiloclaw): rely on live Kilo Chat route probe * feat(kiloclaw): update OpenClaw to 2026.5.22 * test(kiloclaw): surface Kilo Chat plugin diagnostics * docs(kiloclaw): add OpenClaw upgrade skill * docs(kiloclaw): fix upgrade skill syntax checks
1 parent 1e44bb0 commit d9f88f8

13 files changed

Lines changed: 1579 additions & 1218 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: kiloclaw-openclaw-upgrade
3+
description: Upgrades the OpenClaw version packaged in KiloClaw images and validates safe live persisted-root replacement. Use when bumping OpenClaw, reviewing a KiloClaw OpenClaw upgrade PR, running packaged-image upgrade smoke tests, or investigating OpenClaw Dockerfile patches, plugin diagnostics, or compatibility changes.
4+
---
5+
6+
# KiloClaw OpenClaw Upgrade
7+
8+
Use this workflow for any packaged OpenClaw version change under `services/kiloclaw`.
9+
The smoke scripts are the executable source of truth; this skill governs release
10+
preparation, investigation, and review decisions around them.
11+
12+
## First Reads
13+
14+
Before editing or reviewing, read:
15+
16+
- `AGENTS.md`
17+
- `services/kiloclaw/AGENTS.md`
18+
- `.specs/kiloclaw-controller.md`
19+
- `services/kiloclaw/DEVELOPMENT.md` controller smoke section
20+
- `reference/validation-checklist.md` in this skill
21+
22+
## Upgrade Workflow
23+
24+
1. Check `git status`, the PR branch/base, and existing PR review feedback. Do not
25+
disturb a dirty main worktree; use an isolated worktree or clean branch checkout.
26+
2. Inspect `services/kiloclaw/Dockerfile`, bundled plugin `package.json` files,
27+
`pnpm-workspace.yaml`, and `pnpm-lock.yaml` before changing the pin.
28+
3. Update the checked-in image pin and align bundled plugin compile-time/peer
29+
dependencies. Update lockfile, package-policy configuration if required by a
30+
deliberately validated release, runbook expectations, and user-facing changelog
31+
when the release is part of the change.
32+
4. Build the candidate image. If a Dockerfile patch guard fails, inspect the new
33+
OpenClaw package artifact or source rather than loosening the guard blindly.
34+
5. Run `bash services/kiloclaw/scripts/controller-openclaw-upgrade-smoke-test.sh`
35+
from a clean committed bump branch. It compares refreshed `origin/main` by
36+
default, or an intentionally justified `BASE_REF`, to committed `HEAD` and retains
37+
`/root` between image phases.
38+
6. Run required final KiloClaw submission gates and review output, diagnostics, and
39+
PR documentation before making the PR ready.
40+
41+
## Required Upgrade Evidence
42+
43+
Require successful checks for:
44+
45+
- Installed OpenClaw before/after versions.
46+
- Candidate existing-config startup through the controller's `openclaw doctor` path.
47+
- `openclaw config validate --json` in each phase.
48+
- Controller/gateway readiness and proxied Control UI HTML.
49+
- Packaged Kilo Chat config, plugin load, diagnostics handling, and semantic live
50+
webhook probe.
51+
- A real, non-sensitive agent turn through `kilocode/kilo-auto/free`.
52+
53+
## Investigation Rules
54+
55+
- Preserve the KiloCode model-discovery timeout mitigation unless OpenClaw exposes a
56+
production-supported configuration or environment override used by its inner
57+
KiloCode fetch. Do not confuse live-test outer catalog timeouts with production
58+
provider discovery configuration.
59+
- Target Dockerfile bundle patches using provider-specific markers such as
60+
`KILOCODE_MODELS_URL`; do not patch a generic minified constant across providers.
61+
- Treat newly surfaced `plugins inspect` or `doctor` diagnostics as findings. Do not
62+
infer that a warning is harmless solely because the gateway becomes ready.
63+
- If the smoke allows a known cosmetic warning, surface it in output and fail any
64+
changed or additional diagnostic until reviewed.
65+
66+
## Security And Reporting
67+
68+
- Never print or post Kilo API keys, organization credentials, gateway/proxy tokens,
69+
raw provider responses, or credential-bearing container logs.
70+
- Keep live smoke containers bound to loopback and generate a random controller/proxy
71+
token by default unless a deliberate override is required for a controlled run.
72+
- Send only generated non-sensitive nonce prompts through Auto Free.
73+
- In the PR, document the before/after versions, persisted-root live result, manual
74+
verification, known diagnostics with their impact, and any Docker patch adaptation.
75+
- Keep live provider testing manual/opt-in unless credential and transient-free-model
76+
constraints are deliberately addressed for gating.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# OpenClaw Upgrade Validation Checklist
2+
3+
Use this reference after reading the KiloClaw controller spec and current scripts.
4+
File names are stable workflow touchpoints; verify the actual branch diff instead of
5+
assuming every upgrade needs every file.
6+
7+
## Typical Release Touchpoints
8+
9+
| Path | Check |
10+
|---|---|
11+
| `services/kiloclaw/Dockerfile` | Pinned OpenClaw release and build-time compatibility patches |
12+
| `services/kiloclaw/plugins/kilo-chat/package.json` | OpenClaw peer/dev version alignment |
13+
| `services/kiloclaw/plugins/kiloclaw-morning-briefing/package.json` | OpenClaw peer/dev version alignment |
14+
| `pnpm-lock.yaml` | Resolved plugin compile/test dependency graph |
15+
| `pnpm-workspace.yaml` | Release-age or build-script policy needed for the reviewed pin |
16+
| `services/kiloclaw/e2e/docker-image-testing.md` | Expected image version in manual checks |
17+
| `apps/web/src/app/(app)/claw/components/changelog-data.ts` | User-visible release note when applicable |
18+
19+
`services/kiloclaw/Dockerfile.local` installs a developer-provided tarball rather
20+
than the published production pin; do not update it solely for a release number.
21+
22+
## Narrow Checks Before Live Validation
23+
24+
Run repository-required formatting before committing. Prefer targeted checks while
25+
iterating, then allow push hooks or the relevant release process to run broader gates.
26+
27+
```bash
28+
pnpm install --lockfile-only
29+
pnpm install --frozen-lockfile
30+
pnpm format
31+
bash -n services/kiloclaw/scripts/controller-smoke-helpers.sh
32+
bash -n services/kiloclaw/scripts/controller-live-provider-smoke-test.sh
33+
bash -n services/kiloclaw/scripts/controller-openclaw-upgrade-smoke-test.sh
34+
git diff --check
35+
bun run script/check-md-table-padding.ts
36+
pnpm --filter @kiloclaw/kilo-chat test
37+
pnpm --filter @kiloclaw/kiloclaw-morning-briefing test
38+
pnpm --filter @kiloclaw/kiloclaw-morning-briefing typecheck
39+
```
40+
41+
If pnpm rejects a just-reviewed OpenClaw release because of repository supply-chain
42+
policy, do not bypass installation ad hoc. Determine whether an explicit narrow policy
43+
entry is justified by the pinned image build and successful live upgrade evidence.
44+
45+
Before submitting a KiloClaw change, run the required final gates from
46+
`services/kiloclaw/AGENTS.md`:
47+
48+
```bash
49+
# Before tests, confirm Postgres is active or start it with pnpm test:db.
50+
docker compose -f dev/docker-compose.yml ps postgres
51+
pnpm typecheck
52+
pnpm test
53+
pnpm lint
54+
```
55+
56+
If a required final gate cannot be run, state that explicitly in the PR and handoff;
57+
do not describe narrow checks as full submission validation.
58+
59+
## Official Upgrade Smoke
60+
61+
Run only from a clean committed bump branch; the wrapper builds detached source
62+
worktrees so ignored local files do not enter either candidate image.
63+
64+
```bash
65+
bash services/kiloclaw/scripts/controller-openclaw-upgrade-smoke-test.sh
66+
```
67+
68+
Expected behaviors:
69+
70+
- It refreshes `origin/main` by default; use `BASE_REF` only when the intended
71+
upgrade baseline differs and document that reason in the PR.
72+
- It rejects an identical before/after OpenClaw pin by default.
73+
- It builds one baseline and one candidate image from checked-in Dockerfiles.
74+
- It starts the baseline on an empty temporary `/root`, then starts the candidate
75+
against the same `/root`.
76+
- The candidate therefore exercises existing-config startup and `openclaw doctor`.
77+
78+
## Pass Criteria
79+
80+
A release candidate is not validated until output proves all of the following:
81+
82+
| Assertion | Why it matters |
83+
|---|---|
84+
| `OpenClaw version` for each phase | Images contain the intended packages |
85+
| `OpenClaw config validate` | Resulting config is accepted explicitly |
86+
| Gateway status and Control UI proxy | Controller and gateway boot correctly |
87+
| Configured live smoke model | KiloCode model selection survived boot/upgrade |
88+
| Kilo Chat plugin load | Packaged extension loads successfully |
89+
| Kilo Chat diagnostics | New warnings/errors cannot remain invisible |
90+
| Kilo Chat webhook semantic rejection | Live handler route is registered without side effects |
91+
| Live Auto Free agent turn | Real Kilo Gateway compatibility and execution work |
92+
93+
## Docker Patch Investigation
94+
95+
OpenClaw bundles may change between releases. If an image build fails around a
96+
minified bundle patch:
97+
98+
1. Obtain or inspect the intended OpenClaw package without exposing credentials.
99+
2. Locate provider-specific markers and the exact behavior being patched.
100+
3. Confirm whether the patch is still necessary or whether upstream added a stable
101+
production config/env setting.
102+
4. Change the assertion to target the intended provider/behavior, not whichever
103+
generic text happens to match first.
104+
5. Rebuild and rerun the persisted-root live smoke.
105+
106+
The KiloCode model discovery workaround patches KiloCode's own fetch timeout. An
107+
environment variable that only wraps live-test provider catalog execution does not
108+
replace that production fetch-level control.
109+
110+
## Diagnostics Policy
111+
112+
Inspect plugin diagnostics through `openclaw plugins inspect kilo-chat --json`.
113+
Current smoke behavior may explicitly surface an acknowledged cosmetic warning, such
114+
as missing optional `channelConfigs` metadata, while verifying runtime routing
115+
separately. Do not expand the allowance without review:
116+
117+
- Fail on any unexpected warning or error.
118+
- Include the exact accepted diagnostic and impact assessment in the PR.
119+
- Prefer fixing actionable metadata rather than retaining a permanent allowance.
120+
121+
## Safe PR Evidence
122+
123+
A PR verification summary may include image tags, version checks, named assertions,
124+
pass/fail totals, and known diagnostic text. While reviewing or modifying live smoke,
125+
keep its controller port loopback-only and its default controller/proxy token randomly
126+
generated. A PR summary must not include:
127+
128+
- API key or organization credential values.
129+
- Controller/proxy or gateway tokens.
130+
- Raw provider response bodies or failure logs from live credential runs.
131+
- Sensitive prompts; use only generated nonce prompts in live smoke tests.

apps/web/src/app/(app)/claw/components/changelog-data.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ export type ChangelogEntry = {
1010

1111
// Newest entries first. Developers add new entries to the top of this array.
1212
export const CHANGELOG_ENTRIES: ChangelogEntry[] = [
13+
{
14+
date: '2026-05-28',
15+
description: 'Updated OpenClaw to 2026.5.22.',
16+
category: 'feature',
17+
deployHint: 'redeploy_suggested',
18+
},
1319
{
1420
date: '2026-05-27',
1521
description:

0 commit comments

Comments
 (0)