Skip to content

fix(docker): use authenticated gateway health command - #118996

Merged
vincentkoc merged 2 commits into
mainfrom
compose-health-command-repair-20260803
Aug 3, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
compose-health-command-repair-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Related: #118785

What Problem This Solves

Fixes an issue where operators following the Docker setup output or install guide would run openclaw health --token, even though the root health command does not accept --token. The same unsupported command also caused the real Docker Compose proof to fail before authenticated Gateway health could be established.

Why This Change Was Made

Uses the supported openclaw gateway health --token boundary consistently in the setup hint, Docker guide, and Compose producer. The producer requests JSON and validates the returned health contract for both the Gateway service and CLI sidecar. It also removes root-owned bind-mount state through the established Docker cleanup pattern so a successful scenario cannot be reported as failed during teardown.

User Impact

Docker operators can copy the documented authenticated health command and get a real Gateway health result. The package-backed Compose lane now proves the same command against both services and exits cleanly.

Evidence

  • Exact repaired head: 0fcaf17385ae972501628d090060096344faf97e.
  • Focused exact-head test: TMPDIR=/tmp node scripts/run-vitest.mjs src/dockerfile.test.ts - 37/37 passed.
  • Real Compose QA: direct AWS lease cbx_22c6fe232f54, run run_fc66c2b24274 - 1/1 scenario passed; evidence ref matches the exact repaired head.
  • The literal documented command ran inside the Gateway container through sh -lc and returned Gateway Health / OK; identity records documentedHealthCommand=passed.
  • Structured Gateway and CLI sidecar invocations both passed JSON envelope validation; identities record healthJsonEnvelope=passed for each.
  • Package: [email protected], SHA-256 9deed492d2b1534456791de0c2123349dfc5c06df39fd1b4208243c369d2665e.
  • Image: sha256:4fb46705665a4fdf82033653247432b3350c7fbf2ef0712e5a5465e9373f5660.
  • Gateway container fe0608d0df31608a3b04fe619bb87f6d71673ad04571c40544b06b1e2a6f5a86 was running and healthy; CLI sidecar 7781eea89e3a781feddfe2cfbc69cd37887b122ef974a5667388602c305100bd exited successfully.
  • git diff --check and Bash syntax checks passed.
  • Fresh exact-head branch autoreview: clean, no accepted or actionable findings; TruffleHog clean.
  • Scoped changed checks passed through formatting, API, boundary, and package-patch guards. The frozen branch's repo-wide dead-export scan is red on unrelated src/config/** exports; current-main merge-ref CI remains the authoritative baseline gate. No current-main commit touches the five files in this PR.
  • Product/docs command changes are net zero lines (+2/-2).

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: S maintainer Maintainer-authored PR labels Aug 3, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 22:36
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:04 PM ET / 23:04 UTC.

ClawSweeper review

What this changes

The PR replaces unsupported authenticated root health commands in Docker guidance and Compose QA with the supported gateway health command, adds JSON contract checks, and cleans task-owned root-written test files.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: this is a necessary, focused fix for a current Docker documentation and Compose-health defect. No blocking patch findings were found; the member-authored, maintainer-labeled PR needs normal merge handling after its behind-base status is refreshed.

Priority: P2
Reviewed head: 0fcaf17385ae972501628d090060096344faf97e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned repair with strong Compose evidence and no blocking correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.
Evidence reviewed 6 items Current defect: Current main documents the root health command with --token, although that command does not declare a token option.
CLI contract: Root health exposes only JSON, timeout, verbose, and debug options, while the gateway command family owns --token and gateway health sends the health RPC with those resolved options.
Health response contract: The Gateway health type requires ok, ts, durationMs, and a channels record, matching the JSON fields asserted by the Compose producer.
Findings None None.
Security None None.

How this fits together

Docker setup prints an operator command, while the Compose scenario starts a Gateway and a CLI sidecar to verify that same authenticated command. Both paths invoke the packaged CLI, which sends a health RPC to the running Gateway.

flowchart LR
  A[Docker setup output] --> B[Documented container command]
  C[Compose QA scenario] --> D[Gateway container]
  B --> E[Gateway health command]
  D --> E
  F[CLI sidecar] --> E
  E --> G[Authenticated health RPC]
  G --> H[Operator result and QA proof]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled Docker repair merge after the current-base merge result and required checks are refreshed? Refresh and merge: Revalidate the exact merge result against current main, then merge the focused repair.

Why: The patch is correct and fixes current behavior, but protected maintainer handling requires a human merge decision.

Before merge

  • Resolve merge risk (P1) - GitHub reports the branch as cleanly mergeable but behind main; refresh the merge result and exact-head checks before landing.
  • Resolve merge risk (P1) - GitHub comment bodies, including the latest ClawSweeper rank-up moves, could not be refreshed because DNS was unavailable; the supplied context did not include their text.
  • Complete next step (P2) - No mechanical repair remains; the protected maintainer PR needs a refreshed current-base merge/check review before landing.
Agent review details

Security

None.

PR surface

Tests +27, Docs 0, Other +30. Total +57 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 27 0 +27
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 34 4 +30
Total 5 62 5 +57

Review metrics

Metric Value Why it matters
Production versus proof LOC operator-facing +2/-2; QA/test +60/-3 The user-facing command replacement is net-neutral; the added lines strengthen Compose behavior proof and focused regression coverage.

Stored data model

Persistent data-model change detected: serialized state: scripts/e2e/compose-setup.sh, serialized state: src/dockerfile.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the canonical gateway health invocation consistently in Docker operator output, documentation, and the real Compose proof after the merge result is refreshed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the canonical gateway health invocation consistently in Docker operator output, documentation, and the real Compose proof after the merge result is refreshed.

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

Yes—source reproducibly shows that current Docker guidance invokes root health with --token even though root health does not accept that option; gateway health does.

Is this the best way to solve the issue?

Yes—the PR uses the existing gateway-owned authenticated command instead of adding a parallel token surface to root health, and proves both Compose execution paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Docker operators currently receive an unsupported authenticated health command, while the correction is focused and has limited blast radius.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.

Label justifications:

  • P2: Docker operators currently receive an unsupported authenticated health command, while the correction is focused and has limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records an exact-head real Compose run that executed the documented command and validated Gateway and sidecar JSON responses.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Current-main blame ties both the affected Docker commands and the gateway health CLI contract to this contributor's commit; this PR continues that area work. (role: recent Docker and Gateway-health contributor; confidence: high; commits: 99926b732346, 0fcaf17385ae; files: docs/install/docker.md, scripts/docker/setup.sh, scripts/e2e/compose-setup.sh)
  • Dallin Romney: History identifies commit 66b4dcf as the introduction of the Compose package-proof lane that this PR extends. (role: Compose proof introducer; confidence: medium; commits: 66b4dcf184; files: scripts/e2e/compose-setup.sh)

Rank-up moves

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

  • Refresh the current-base merge result and its exact-head checks before merge.

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.

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move disposition for exact head 0fcaf17385ae972501628d090060096344faf97e:

  • fetched current origin/main at 3bbc4ad085e248976d1381339a3ca4288123d1af
  • main drift from the branch base touches none of the five PR-owned paths
  • current-main merge-tree has no conflicts
  • exact-head hosted run 30859688705 is fully green: 65 success, 35 skipped, no blockers
  • exact-head real Compose proof is run_fc66c2b24274

No rebase/merge refresh is needed: current-main drift is unrelated, the merge result is clean, and changing the head would invalidate the exact-head Docker attestation without changing this patch.

@vincentkoc
vincentkoc merged commit 15b23cf into main Aug 3, 2026
136 of 139 checks passed
@vincentkoc
vincentkoc deleted the compose-health-command-repair-20260803 branch August 3, 2026 23:10
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to clawSean/openclaw that referenced this pull request Aug 3, 2026
* origin/main: (1301 commits)
  fix(sms): align MMS retries with network timeouts (openclaw#119002)
  test(qa): cover composed tool result consumption (openclaw#118991)
  test(cron): cover delivery outcomes (openclaw#118993)
  test(qa): cover guarded media fetch boundaries (openclaw#118857)
  test(qa): cover music generation controls (openclaw#118901)
  test(qa): cover core vision routing (openclaw#118861)
  test(qa): cover Gateway usage and memory APIs (openclaw#118995)
  fix(docker): use authenticated gateway health command (openclaw#118996)
  test(plugins): align tool fixtures with owner policy (openclaw#118959)
  test(qa): cover managed gateway service lifecycle (openclaw#118855)
  test(qa): cover audio proxy and limit handling (openclaw#118863)
  test(qa): cover PDF extraction dispatch (openclaw#118860)
  test(ui): add service-worker update primary QA proof (openclaw#118805)
  test(qa): cover CLI onboarding and plugin install sources (openclaw#118882)
  test(qa): cover remote logging boundaries (openclaw#118951)
  fix(sms): retry transient MMS failures before durable adoption (openclaw#118994)
  test(qa): cover video generation invocation (openclaw#118864)
  test(qa): cover media reference intake (openclaw#118858)
  test(qa): cover image generation task lifecycle (openclaw#118915)
  feat(sms): track Twilio delivery status (openclaw#118665)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
* fix(docker): use authenticated gateway health command

* test(docker): prove documented compose health command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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