Skip to content

chore: pin warm-image snapshot compatibility keys - #171880

Merged
steipete merged 1 commit into
mainfrom
snap/golden-snapshot-keys
Oct 14, 2026
Merged

steipete merged 1 commit into
mainfrom
snap/golden-snapshot-keys

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Warm-image key changes can silently send every user's next cloud session through cold setup after a Gateway update.

User Impact

No user-visible behavior changes: the current snapshot key bytes remain unchanged. Release-note context: test coverage now requires deliberate, explained changes to warm-image compatibility keys.

Why This Change Was Made

Pin the exact SHA-256 key for the canonical AWS/Linux tiny profile with warm images enabled, no desktop, no setup command, and no setup secrets. Pin the existing repository recipe fixture's preparation readiness key (key) and reusable disk cacheKey at their owner, reusing its provider-fingerprint test setup. Each golden warns that changes invalidate warm images and must be deliberate and explained in the PR.

Keep the existing negative assertion for protected-egress keys: it independently prevents adopting retired plaintext setup images. No production changes, removals, migration, or changelog edits.

Evidence

  • PASS: pnpm test extensions/crabbox/src/crabbox-worker-profile.test.ts src/gateway/worker-environments/preparation-identity.test.ts --maxWorkers=1 — 38 tests; 13.68 s wall total. Gateway file: 21 tests, 3.09 s runner duration; Crabbox file: 17 tests, 3.15 s runner duration.
  • PASS: pnpm format:check --no-error-on-unmatched-pattern -- extensions/crabbox/src/crabbox-worker-profile.test.ts src/gateway/worker-environments/preparation-identity.test.ts — 0.60 s.
  • PASS: node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/gateway/worker-environments/preparation-identity.test.ts — 191.27 s, including waiting for declaration preparation.
  • PASS: node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/crabbox/src/crabbox-worker-profile.test.ts — 174.64 s, including plugin SDK declaration preparation.
  • PASS: node scripts/run-tsgo.mjs -p .artifacts/tsconfig.golden-snapshot-keys.json --noEmit — 38.80 s. Local ignored config extends the repository test config and includes the two touched tests plus existing declarations.
  • PASS: git diff --check — 0.30 s.
  • PASS: isolated Codex autoreview through P2 — scoped-clean, no actionable findings; 123.69 s. The reviewer checked the production owners and diff; the focused test run verifies both preparation digests.

Tooling attempts: the first autoreview preflight rejected the shared temporary directory (22.78 s); the completed review used the macOS private temporary directory. The changed-path typecheck planner expanded to unrelated test graphs and was stopped before running them (99.82 s, exit 143); the two-file config above replaced it. No test failures, skipped tests, timeout increases, or baseline changes. CI runtime remains pending.

@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T06:59:00.629240Z 19a1256 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19a12565ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +98 to +100
expect(resolveCrabboxWarmImageProfileKey(profile)).toBe(
"6b01b9af04cfd3441ea20fde45d9951b39cf4c2da9a5df3c62dd8a1929725254",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Pin the project-scoped snapshot key

For project-backed Crabbox allocations, selectAllocation passes context.projectKey into this resolver (crabbox-worker-warm-image.ts:340), but this golden omits that argument. A change confined to the projectKey field name, placement, or encoding would therefore leave the new golden tests green while changing the actual snapshot-store key and sending project sessions through cold setup. Add an exact golden using a representative project key as well.

AGENTS.md reference: AGENTS.md:L50-L53

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 6799282 into main Oct 14, 2026
105 of 106 checks passed
@steipete
steipete deleted the snap/golden-snapshot-keys branch October 14, 2026 07:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
A live Gateway update on 2026-10-14 silently sent the next cloud session cold: openclaw#171073 had (deliberately) changed the warm-image profile fingerprint for every profile, and the only test touching the key asserted that it differed from an old value, never what it is. Golden tests now pin the exact Crabbox warm-image profile key and the preparation and cache keys for one canonical Linux profile without setup secrets, each with a note that changing the value invalidates every user's warm images on update and must be deliberate and explained. Test-only; no production change and no key change.

Refs: openclaw#171880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant