Skip to content

fix(workers): refresh platform certificates before Linux enrollment - #188802

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/vivid-lobster-2
Oct 31, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/vivid-lobster-2

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #188796

What Problem This Solves

Linux cloud workers can fail TLS bootstrap when a provider injects certificates that have not yet been registered in the system trust store, including workers started from a cached image.

User Impact

Linux enrollment registers available platform certificates before downloading artifacts or launching the node. Non-root images need noninteractive sudo for /usr/sbin/update-ca-certificates; a failed refresh stops enrollment with repair guidance. Runtime-only preparation and non-Linux targets are unchanged. Certificate verification is not disabled.

Why This Change Was Made

Adds the trust refresh to the existing enrollment owner, where both cold and cached starts pass. The certificate-update subprocess receives none of the private setup, download, or worker-Codex environment values. Existing supervised trust inheritance is reused rather than duplicated.

The production change is +20/−1 lines in one existing file; no new configuration, SDK contract, or schema is introduced.

Evidence

  • Real Linux trust proof: a network-isolated Node 24.22.1 Debian container executed the actual generated enrollment command with /usr/sbin/update-ca-certificates unchanged and a local HTTPS endpoint signed by a newly installed, unregistered CA. Fresh and cached-runtime enrollment both fail on the pinned base with curl certificate-verification exit 60, then complete with exit 0 on the published source. Existing settings remain byte-for-byte identical; fresh enrollment downloads one fixture artifact and cached enrollment downloads none. This uses a synthetic node package to observe launch, not a live Azure worker or model run. A direct production-generator harness was used after the broader supplementary test runner hit compiler process limits; no test or resource safeguard was disabled.
  • Data-model review clarification: this patch changes no stored fields, config shape, schema, or migration. The actual cached-runtime/settings preservation above covers the touched startup path; it is not claimed as a full released-version upgrade campaign.
  • CI attribution: the exact-head test-line check reports 6,314,124 lines against a 6,313,099 ceiling (1,025 excess). Its main parent b39e2d09329cc81b09cf55980a2506623236ea59 already had 6,314,049/6,313,024 (the same 1,025 excess). This PR adds 75 test lines and exactly 75 allocated lines; the shared baseline is unchanged. The aggregate CI gate remains red on that inherited debt.
  • Baseline regression: the three Linux cases fail on unchanged production code; the macOS negative control passes.
  • Fixed candidate: all 32 enrollment tests pass in a secretless Node 24.22.1 container using the repository test runner (23.38 s wall time). Coverage includes root/non-root registration, cached runtime preparation, rejection before artifact download after refresh failure, credential isolation, and existing bootstrap behavior. CI seconds are not yet available.
  • Targeted type-aware lint: no problems in both changed TypeScript files. Repository formatting and git diff --check pass. Targeted compiler validation of both changed files and their dependency closure passes through scripts/run-tsgo.mjs, retaining the extension graph’s ambient declarations.
  • Independent Codex autoreview of the complete local candidate against 563ba501dced074d9d282fb3a4cb48cfc31bcf9e, P0–P3: scoped-clean, no actionable findings. Local ClawSweeper was unavailable.
  • The 75-line net test allocation covers generated guest-shell execution at the real enrollment boundary. OS command paths are mapped to isolated fixtures; no host certificate store or live cloud machine is changed. This is not a live Azure-provider proof.

Original platform-trust work by @galiniliev, extracted and narrowed from 9501dfaa8de.

Work sessions

Worked on by

roboclaw-bot and others added 2 commits October 30, 2026 22:50
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: e528302a-3bb1-4d42-b030-802226d2551b
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime extensions: crabbox size: S labels Oct 30, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 30, 2026 22:51
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR refreshes available Linux platform certificates before node enrollment while withholding bootstrap credentials from the certificate command.

Example: A Linux snapshot fork has a provider-installed CA awaiting registration.

  • Before: Enrollment starts without refreshing the system certificate bundle.
  • After: Enrollment runs update-ca-certificates first and stops with guidance if registration fails.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-reviewed, but fixture-only evidence does not establish the claimed TLS recovery.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Workers can fail TLS startup when provider-installed certificates have not been registered, including after snapshot forks.
Reason: The maintainer-authored direction addresses a concrete enrollment prerequisite through its existing owner; Related wording correctly preserves the broader linked issue.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this maintainer-authored PR open: current main lacks the enrollment-time certificate refresh, and the scoped diff has no identified correctness defect.

Priority: P2
Reviewed head: 0da4a93d09451a0e447ed9ba49b373fbb31a6699

Before merge

  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Provide fresh and cached Linux enrollment evidence using the actual certificate utility and a real TLS endpoint, including an existing-image upgrade with its settings intact.
Agent review details

How this fits together

The Crabbox provisioning adapter generates guest setup commands from Gateway enrollment grants; those commands prepare the runtime and launch the enrolled node.

flowchart TD
  A[Gateway enrollment grant] --> B[Crabbox provisioning]
  B --> C[Generated Linux enrollment command]
  C --> D[Platform certificate refresh]
  D --> E[Runtime verification or installation]
  E --> F[Enrolled node launch]
Loading

Technical review

Best possible solution:

Retain the focused enrollment-owned refresh and demonstrate that real Linux trust registration restores the affected TLS flow.

Do we have a high-confidence way to reproduce the issue?

Source confirms the missing refresh on main, but the supplied regression uses a stub certificate command and does not reproduce an actual provider-caused TLS failure.

Is this the best way to solve the issue?

The patch is a small, coherent change in the existing enrollment owner, preserves runtime-only preparation, and avoids duplicating supervised trust inheritance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8c832244f0ca.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 4feffc7 adds extensions/crabbox/src/crabbox-worker-node-enrollment.ts:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4feffc72a6c0; files: extensions/crabbox/src/crabbox-worker-node-enrollment.ts)
  • Galin Iliev: Raw commit db01f6d adds extensions/crabbox/src/crabbox-worker-node-enrollment.ts:112 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: db01f6d520b8; files: extensions/crabbox/src/crabbox-worker-node-enrollment.ts)
  • RoboClaw: Raw commit 3a195d3 adds extensions/crabbox/src/crabbox-worker-node-enrollment.ts:587 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a195d3336ca; files: extensions/crabbox/src/crabbox-worker-node-enrollment.ts)

PR surface

Source +19, Tests +75, Docs +8, Other +2. Total +104 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 20 1 +19
Tests 1 79 4 +75
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 4 109 5 +104

Review metrics

Metric Value Why it matters
Production versus test growth Production +20/−1 lines; tests +79/−4 lines The additional fixture code protects distinct invocation, cached-runtime, credential-isolation, failure-ordering, and platform boundaries without new production scaffolding.

Labels

Label changes:

  • add P2: This is a bounded cloud-worker enrollment reliability improvement without evidence of an urgent widespread outage.
  • add merge-risk: 🚨 compatibility: Existing non-root Linux images with the certificate utility now require noninteractive sudo; the maintainer-authored PR explicitly accepts and documents this startup requirement.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This is a bounded cloud-worker enrollment reliability improvement without evidence of an urgent widespread outage.
  • merge-risk: 🚨 compatibility: Existing non-root Linux images with the certificate utility now require noninteractive sudo; the maintainer-authored PR explicitly accepts and documents this startup requirement.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Show actual Linux certificate registration followed by successful enrollment on fresh and existing images.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 7:08 PM ET / 23:08 UTC.

@roboclaw-bot
roboclaw-bot merged commit dbcbb79 into main Oct 31, 2026
204 of 207 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/vivid-lobster-2 branch October 31, 2026 15:02
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…penclaw#188802)

* fix(workers): refresh platform certificates before Linux enrollment

Co-authored-by: galiniliev <[email protected]>

* fix(workers): refresh platform certificates before Linux enrollment

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: e528302a-3bb1-4d42-b030-802226d2551b

---------

Co-authored-by: galiniliev <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…penclaw#188802)

(cherry picked from commit dbcbb79)

Co-authored-by: galiniliev <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 5c3655934e45652e6275a706f4359f82834d2904)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: crabbox gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant