feat: catalog-only image promotion and a Telegram Desktop variant image - #1349
feat: catalog-only image promotion and a Telegram Desktop variant image#1349obviyus wants to merge 8 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 15, 2026, 12:07 PM ET / 16:07 UTC. ClawSweeper reviewWhat this changesThis PR adds an AWS-only Merge readiness⛔ Blocked until stronger real behavior proof is added - 5 items remain Keep open: current main does not contain this feature, and the branch fixes the earlier fail-closed concern. Before merge, the new public image-promotion contract needs maintainer sponsorship and real coordinator-bound proof that the variant is selected without changing the default. Priority: P2 Review scores
Verification
How this fits togetherCrabbox’s CLI asks the Worker coordinator to record provider images, and lease requests then select a compatible default or catalog image. This change adds a catalog-only path so a capability-specific AWS image can be selected only by an explicit SDK/runtime request while ordinary leases retain their default image. flowchart LR
A[Image publisher] --> B[Crabbox CLI]
B --> C[Coordinator promotion route]
C --> D[AWS image catalog]
E[Lease capability request] --> F[Image selection]
D --> F
F --> G[Remote desktop lease]
Decision needed
Why: This is a new operator-facing CLI, Worker route, and persisted image-record behavior; code review cannot decide whether that API surface is a maintained product commitment. Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep catalog-only promotion as a narrowly documented AWS capability-variant contract, after a staging or controlled deployed-coordinator run proves both explicit variant selection and an unchanged ordinary default. Do we have a high-confidence way to reproduce the issue? No: the real lease screenshot verifies the opt-in bake and launch, but no deployed coordinator trace yet reproduces catalog-only promotion followed by both variant and ordinary lease selection. Is this the best way to solve the issue? Unclear: the implementation is narrowly aligned with the existing catalog selection path, but maintainers must first accept the new public contract and require proof at the coordinator boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f85159d989fb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
569e6a7 to
fe42b93
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…ed SDK/runtime A catalog-only image that also declares desktop would otherwise become the newest match for existing --image-require-desktop leases. Eligibility now requires the lease to name one of the variant's --sdk/--runtime declarations, and --catalog-only requires at least one such declaration.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
… its marker Prior promotion metadata seeded the new record, so a normal promote of a variant kept catalogOnly=true on the scoped default and generic capability requests still filtered it out.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…omotion Catalog-only promotions use a dedicated /promote-catalog route; older coordinators answer 404 and the CLI stops instead of silently performing a default promotion. The CLI also refuses a response that does not confirm catalogOnly.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Resolves a problem where OpenClaw's Telegram Desktop proof lanes had to install ~20 apt packages, download Telegram Desktop from telegram.org, and download TDLib on every fresh Linux desktop lease. That per-lease bootstrap added minutes and raced Ubuntu's
unattended-upgrades(Could not get lock /var/lib/dpkg/lock-frontend) — the leading failure in the last runs of https://github.com/openclaw/openclaw/actions/workflows/mantis-telegram-desktop-proof.yml.It also fixes a gap that made a safe variant image impossible:
crabbox image promotealways rewrote the scoped default together with the capability catalog, so any variant would silently become every matching lease's image.Why This Change Was Made
Telegram Desktop is a stable machine capability that only some lanes need, so it ships as a catalog-only variant image, never in the generic desktop default:
crabbox image promote --catalog-only(AWS): writes only the capability-catalog record and never the scoped default. A catalog-only image is eligible only for leases that name one of its declared--sdk/--runtimecapabilities (warmup --image-sdk telegram-desktop=7.0.9); generic requests such as--image-require-desktopor--image-min-osnever see it even though the variant also declaresdesktop, so existing capability-aware leases are unaffected.--catalog-onlytherefore requires ≥1--sdk/--runtimedeclaration (CLI + Worker reject otherwise); Azure rejects the flag; existingimage promotecalls are unchanged. Mixed versions fail closed: catalog-only uses a dedicatedPOST /v1/images/<id>/promote-catalogroute, so an older coordinator answers 404 and the CLI stops before anything is promoted (it also refuses a response that does not confirmcatalogOnly). Generic primitive — reusable for any future variant.scripts/install-linux-developer-tools.sh:CRABBOX_LINUX_TELEGRAM_DESKTOP=1(default 0; the generic bake is unchanged) installs checksum-pinned Telegram Desktop 7.0.9 to/opt/Telegram, removes itsUpdater, writes/var/lib/crabbox/telegram-desktop-version, and addszbar-tools/x11-utilsplus the xcb/xkb runtime libs. amd64 only; other architectures skip and omit the marker.scripts/mint-aws-devtools-image.sh --telegram-desktop(Linux, desktop required): bakescrabbox-linux-devtools-telegram-<id>, smokes the Telegram contract, promotes--catalog-only --desktop --sdk telegram-desktop=7.0.9, then proves both that a--image-sdk telegram-desktop=7.0.9lease selects the new AMI and that a plain lease still selects the previous default (default-unchangedproof lease).devtools-image-publishgains atelegram_desktopboolean input (default false); the generic path is byte-identical when false.Consumers opt in per lease with
crabbox warmup --desktop --image-sdk telegram-desktop=7.0.9; Crabbox refuses the lease if no such image is promoted. No TDLib, no login state, no scenario data in the image.User Impact
Generic Crabbox desktop leases are unaffected. Operators can publish variant images without touching the default. Lanes that ask for the Telegram capability boot with Telegram Desktop ready and skip per-lease apt/download work; OpenClaw's recorder preflights the contract and starts recording in seconds.
Evidence
Real amd64 lease proof of the bake path (promoted
crabbox-devtools-v1desktop image,c7a.8xlarge, leasecbx_35253c1cee3e, released):Baseline on the current promoted image:
telegram-absent,no-zbarimg.Prep script with the gate on → exit 0 in 1m40s;
print_versionsends withtelegram-desktop=7.0.9.Recorder preflight on the same lease:
Launch:
/opt/Telegram/Telegram -noupdate -workdir …→wmctrl -lx:Telegram.TelegramDesktop … Telegram; screenshot (intro screen, no login QR/token in frame):Local, on the combined head:
npm test --prefix worker→ 37 files passed, 2 skipped; 1359 tests passed, 3 skipped — includes: catalog-only writes the catalog key only; default selection unchanged after a catalog-only promotion;--image-sdkselection returns the catalog-only image;--image-require-desktopalone still selects the older generic default even though a newer catalog-only variant declares desktop, and adding--image-sdk telegram-desktop=7.0.9selects the variant; catalog-only with only generic capabilities (desktop) → 400catalog_only_capabilities_required; re-promoting a catalog-only variant as the default clears the marker and generic requests select it again ; thepromote-catalogroute writes no default record (1361 tests).go test ./internal/cli/...→ ok (--catalog-onlyparsing/serialization on thepromote-catalogroute; missing or generic-only capabilities exit 2; Azure rejects; older coordinator → 404 → CLI error without falling back to/promote; coordinator that ignores the marker → CLI refuses).node --test scripts/install-linux-developer-tools.test.js scripts/mint-aws-devtools-image.test.js scripts/devtools-image-workflow.test.js→ 34 passed, 0 failed.shellcheck(koalaman/shellcheck:v0.10.0) on both scripts → clean; workerformat:check/lint/checkclean.sha256sum tsetup.7.0.9.tar.xz=d3c05df0259ab116d11d8c1cdc1403019d2a3be303ad3b46d16a84e19df6615f; upstream latest tagv7.0.9.Known proof gap: catalog-only promotion and selection against a deployed coordinator cannot run before this Worker code is deployed; the storage/selection logic is covered by the Worker tests above, and the first post-merge
devtools-image-publish telegram_desktop=truerun asserts both--image-sdk telegram-desktop=7.0.9selection of the new AMI and thedefault-unchangedplain-lease proof (scripts/mint-aws-devtools-image.sh) — that log will be attached here.