Skip to content

fix: identify cloud worker bootstrap failures - #133663

Merged
steipete merged 1 commit into
mainfrom
codex/cloud-bootstrap-diagnostics
Aug 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cloud-bootstrap-diagnostics

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators creating a cloud session would receive only aborted when the node runtime download was interrupted. The message lost the failing bootstrap phase and the native transport error code, making a network interruption hard to distinguish from package installation or node startup failures.

Why This Change Was Made

The generated enrollment script now reports the phase and optional error code where those facts are known. The existing provider formatter still bounds and redacts that message. The provider's one-use permanent-error wrapper is removed; error classification and cleanup are unchanged.

No retry, timeout, allocation, credential, schema, configuration, or protocol changes. This diagnoses the failed operation; it does not claim to repair an underlying network failure. An observed test-fixture race was also repaired at the producer by publishing its readiness JSON atomically.

User Impact

An interrupted response now reports Cloud worker node bootstrap download failed (ECONNRESET): aborted. Installation, verification, activation, and node launch failures likewise identify their phase. This is the release-note context; the root changelog is release-generated.

Evidence

  • Real generated-script reproduction: a loopback HTTP server sends status 200 and one body byte, then disconnects. The new assertion fails before the patch and passes afterward. Exactly one request is made; temporary state is removed; no runtime or PID is published; download and enrollment credentials are absent from output.
  • Both complete owner test files pass: 254 passed, 1 skipped. Coverage includes successful cold/warm artifact use, TLS pinning before bearer transmission, rejected redirects/digest/length/truncation, error classification, and cleanup failure preservation.
  • The first run exposed two unchanged fixture failures caused by observing an incompletely written readiness file. Atomic publication fixed both; no timeout or assertion was weakened.
  • Local scoped lint was blocked before linting by an incomplete shared dependency installation: tslog's declared BaseLogger/interfaces type files are missing. Shared dependencies were not modified. Hosted CI remains required before landing.

Fresh isolated Codex review: scoped-clean at P0, confidence 0.99. The real HTTP regression also passes on both Node 24 and Node 26.

Production LOC: +9/-14, net −5. Tests: net +14. Four files; no generated or dependency changes.

Provenance: the lossy catch is present in the current artifact-bootstrap implementation. Related outer-phase and packaging fixes do not preserve the native code discarded here; exact introducing ancestry has not been established, so no author attribution is inferred.

AWS changed-path proof: the exact candidate generated script passed the same real interrupted-HTTP reproduction on Node 24.18.1, provider aws, task lease cbx_c5cd202c5338, run run_fa541cd46568. One request, expected ECONNRESET diagnosis, temporary-state cleanup, no published runtime/PID, and no credential output. This is live Linux failure-path proof, not a successful model-backed cloud turn; that separate broader test remains in progress.

ClawSweeper review follow-through: exact-head CI 33344633552 passed, and maintainer code review found no actionable defect. Its generic unknown-data-model-change flag does not correspond to a persistence change: the production diff adds only a process-local phase variable and error formatting and inlines an equivalent error constructor. No stored table, file format, migration, retention, or replay semantics change.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 8:35 PM ET / August 31, 2026, 00:35 UTC.

ClawSweeper review

What this changes

The PR makes cloud-worker bootstrap failures identify their phase and native error code, adds an interrupted-download regression case, and atomically publishes test readiness data.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open: it is still needed because current main retains the lossy bootstrap catch. The introduced change records failure phase at the generated-script owner while preserving the provider’s existing cleanup and redaction path; no discrete correctness finding was identified.

Priority: P2
Reviewed head: 9e6c155013aa16b9fdd12beb93939e737e9386a6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative diagnostics repair with a concrete owner-boundary regression case and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless describes a real generated-script loopback truncation run that corresponds to the added owner-boundary regression case.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless describes a real generated-script loopback truncation run that corresponds to the added owner-boundary regression case.
Evidence reviewed 5 items Introduced owner-boundary repair: The generated enrollment script now tracks preparation, download, runtime verification, installation, activation, and node-launch phases; its terminal catch includes that phase and a native error code.
Caller and cleanup path: The provider runs the generated script as node-enrollment setup, converts unsuccessful command results to WorkerProviderError, and passes every error through lease cleanup.
Regression coverage: The added loopback response truncation case asserts phase/code diagnosis, credential absence, one authorized request, no PID, and no reusable runtime after failure.
Findings None None.
Security None None.

How this fits together

Crabbox provisions cloud workers by downloading and installing a Node runtime, then launching an enrolled node. Bootstrap command output returns through the Crabbox provider’s cleanup and error formatter to the operator.

flowchart LR
  A[Cloud session request] --> B[Crabbox worker provisioning]
  B --> C[Node bootstrap script]
  C --> D[Download, install, or launch phase]
  D --> E[Provider cleanup and formatting]
  E --> F[Operator-visible failure]
Loading

Before merge

  • Complete next step (P2) - Await exact-head CI and ordinary maintainer review; this review identified no narrow follow-up repair for an automation lane.
Agent review details

Security

None.

PR surface

Source -5, Tests +14. Total +9 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 9 14 -5
Tests 1 26 12 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 35 26 +9

Review metrics

Metric Value Why it matters
Production versus test delta production +9/-14 (net -5); tests +26/-12 (net +14) The diagnostics repair is net-negative in production code while adding focused failure and cleanup coverage.

Stored data model

Persistent data-model change detected: unknown-data-model-change: extensions/crabbox/src/crabbox-worker-node-enrollment.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Land the owner-boundary diagnostics repair once exact-head required CI completes successfully, retaining the existing provider redaction and cleanup behavior.

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

Yes, from source: an interrupted response during the generated runtime download reaches the old error-message-only catch; the introduced loopback truncation case exercises that path. This read-only review did not rerun the test.

Is this the best way to solve the issue?

Yes: recording phase at the bootstrap-script owner preserves the native failure detail before the provider applies its established cleanup and redaction formatter, without adding configuration or retry behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2896a942c2f1.

Labels

Label changes:

  • add P2: This is a focused repair to operator diagnostics for cloud-worker provisioning failures.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless describes a real generated-script loopback truncation run that corresponds to the added owner-boundary regression case.

Label justifications:

  • P2: This is a focused repair to operator diagnostics for cloud-worker provisioning failures.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless describes a real generated-script loopback truncation run that corresponds to the added owner-boundary regression case.

Evidence

What I checked:

Likely related people:

  • openclaw-mantis[bot]: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit c5c6eb7 into main Aug 31, 2026
120 checks passed
@steipete
steipete deleted the codex/cloud-bootstrap-diagnostics branch August 31, 2026 00:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: crabbox maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant