Skip to content

refactor(docker): consolidate E2E scenario helpers - #117359

Merged
steipete merged 3 commits into
mainfrom
codex/goal100k-docker-scenario-owner-0801-2d45
Aug 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/goal100k-docker-scenario-owner-0801-2d45

Conversation

@steipete

@steipete steipete commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Docker E2E wrappers had accumulated parallel implementations of the same package/container lifecycle, live-auth staging, setup timeouts, temporary-home initialization, and scheduled-lane definitions. The duplication made equivalent lanes drift independently and left one composite planner action behind after its final workflow caller was removed.

Why This Change Was Made

Moves the repeated host auth/home preparation and container auth/setup behavior into the existing Docker E2E owners, makes scheduled release chunks reference the canonical lane catalog, removes the unreachable package-helper fallback implementation, and deletes the unreferenced planner action. Provider-specific behavior remains in each wrapper; there are no config, default, dependency, schema, public API, or protocol changes.

Root cause: common Docker test policy was copied into individual wrappers and a test-only fallback instead of being owned by the shared libraries. The planner action became dead when workflows switched to the direct scheduler but was never removed.

Architectural owner: scripts/lib/docker-e2e-*.{mjs,sh}, scripts/lib/live-docker-*.sh, and the Docker E2E lane catalog.

Removed paths:

  • the unused .github/actions/docker-e2e-plan action
  • the unreachable package helper fallback stack
  • six copies of live Docker home/auth/staging/setup behavior
  • duplicate release-chunk lane definitions
  • obsolete Codex CI and model truthiness helpers

Production/tooling delta: +299/-1,114, net -815 LOC. Tests are counted separately (+159/-76).

User Impact

No runtime product behavior changes. Maintainers get one canonical implementation for Docker E2E packaging, live credential staging, setup timeouts, and lane metadata, reducing future drift while preserving each wrapper's security and entrypoint contracts.

Evidence

  • Differential planner proof: 210 exact outcomes matched current main byte-for-byte across default/release modes, all profiles and chunks, OpenWebUI toggles, aliases, and selectable lanes.
  • Focused Testbox proof: 609 tests passed (178 Docker build-helper cases plus 431 package acceptance, Codex Docker, project catalog, planner, and live-auth cases).
  • pnpm check:changed on Blacksmith Testbox: passed typecheck, formatting, script declarations, Docker boundary/catalog guard, oxlint, shell syntax, and live scheduler dry run.
  • CI follow-up proof: pnpm deadcode:dependencies passed on a fresh Testbox after declaring the reusable workflow's path-invoked release-harness helper as a Knip entry.
  • CI exposed one incomplete test injection after the shared package helper began requiring the full Docker command adapter. The fixture now supplies both adapter functions; the exact regression passed, then the complete test-install-sh-docker.test.ts file passed 82/82 on Testbox.
  • Bash 3.2 compatibility probes: default/provider/none auth selection and empty mounted-auth staging passed under macOS /bin/bash 3.2.57.
  • Merge-result proof against main@4e47c4cabf8f: Git's merge tree is clean, none of the 13 intervening main commits touches any PR file, git diff --check passes on the synthetic result, and its stable patch ID exactly matches the reviewed branch patch. Rebasing would only churn the head.
  • Fresh autoreview of the main bundle: gpt-5.6-sol, xhigh, clean — no accepted/actionable findings; overall correctness 0.98.
  • Fresh autoreview of both CI follow-ups: gpt-5.6-sol, xhigh, clean — no accepted/actionable findings; overall correctness 0.99.

Real Docker/Testbox proof

Trusted Blacksmith Testbox run 30695790479, lease tbx_01kyydxb9h1ww1gms9k1zete5v:

CI=1 NODE_OPTIONS=--max-old-space-size=4096 \
  OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 \
  OPENCLAW_DOCKER_ALL_LANES=agents-delete-shared-workspace,session-runtime-context \
  OPENCLAW_DOCKER_ALL_PARALLELISM=2 \
  pnpm test:docker:all

Observed output from the exact branch bundle:

OpenClaw package tarball integrity passed.
Building Docker image: openclaw-docker-e2e-functional:local
==> [agents-delete-shared-workspace] pass 3s
==> [session-runtime-context] pass 7s
==> Docker test suite passed

This built the OpenClaw package and functional image from scratch, then exercised both selected lanes in real containers; no Docker build or runtime was mocked.

Direct Codex contract inspection

Personally inspected sibling openai/codex checkout at ee0247f95a6fe2b094ba2253d82cae2a2b4c2dff:

This PR does not change Codex runtime, protocol, command names, arguments, or input values. The Codex wrapper preserves its API-key-versus-staged-auth split, piped codex login --with-api-key, CODEX_HOME, and bare codex app-server invocation. It only delegates temporary-home/tool/cache creation, selected auth-mount collection/finalization, mounted-auth copying, and timeout shell mechanics to the shared Docker helpers.

ClawSweeper rank-up disposition

  • Staged-auth and API-key live Docker harness logs: not safely reproducible as a two-mode live matrix in CI today. The canonical workflow explicitly records that staged Codex auth is stale and forces the API-key path (workflow lines 3331-3339). I preserved the real current-head Docker output above and focused tests cover both adapter modes. I will not use a maintainer's personal/stale credentials or incur live-provider spend merely to manufacture redundant refactor proof.
  • Matching sibling ../codex checkout: satisfied by direct trusted inspection outside the review bot's isolated checkout. Both the acting owner and primary maintainer personally inspected sibling Codex at ee0247f95a6fe2b094ba2253d82cae2a2b4c2dff; the exact contract files, line ranges, and upstream links are recorded above. The bot sandbox cannot access that sibling checkout, which is an environment limitation rather than missing owner verification.
  • Current-main drift: none across the touched surface. The merge-tree proof above covers all 13 intervening commits, demonstrates zero overlapping files, passes git diff --check, and has the identical stable patch ID.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: XL labels Aug 1, 2026
@steipete
steipete marked this pull request as ready for review August 1, 2026 10:51
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 7:45 AM ET / 11:45 UTC.

ClawSweeper review

What this changes

This PR consolidates duplicated Docker E2E lane planning, package/container setup, live-auth staging, temporary-home handling, and timeouts into shared helpers; it also removes an unused composite planner action and updates focused tests.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep this PR open for maintainer review. The refactor has strong real-container proof, a clean focused patch, and no discrete correctness finding, but it centralizes credential staging for the Codex Docker harness and this review cannot complete the repository-required direct ../codex contract inspection because that sibling checkout is absent.

Priority: P3
Reviewed head: 2a3723d53a544759098f0fcf83b4d9397ea5f719
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation is a focused, net-reducing refactor with strong real-container evidence; the remaining merge gate is the unavailable direct Codex contract inspection, not a detected patch defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body includes exact-branch Testbox output from a package-and-image build followed by two passing real Docker lanes; this directly demonstrates the changed container harness. Redacted logs are appropriate for any later credential-mode proof.
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 includes exact-branch Testbox output from a package-and-image build followed by two passing real Docker lanes; this directly demonstrates the changed container harness. Redacted logs are appropriate for any later credential-mode proof.
Evidence reviewed 6 items Reviewed branch surface: The locally available PR head changes 19 Docker E2E helper, wrapper, workflow-support, and focused test files, with net deletion concentrated in duplicate shell implementations.
Canonical helper ownership: The PR creates a single shared lifecycle for temporary directories, CLI/cache mounts, managed homes, and profile staging, then calls those helpers from the affected live Docker wrappers.
Planner-action removal is supported: Current workflow tests explicitly assert workflows do not use the removed composite action, while current workflow paths invoke the planner scripts from the downloaded release harness directly.
Findings None None.
Security None None.

How this fits together

Docker E2E workflows select scenario lanes, prepare live-provider credentials and writable host mounts, then run isolated OpenClaw containers. The changed helpers sit between workflow-selected lanes and container startup, so they affect test-harness authentication and setup rather than the shipped runtime.

flowchart LR
  A[Workflow-selected lane] --> B[Docker E2E wrapper]
  B --> C[Shared auth and setup helpers]
  C --> D[Credential and temporary mounts]
  D --> E[Container setup]
  E --> F[Docker E2E scenario result]
Loading

Decision needed

Question Recommendation
Should maintainers accept the recorded upstream Codex inspection and real Docker proof, or require a fresh reviewer-side inspection of the matching ../codex checkout before merge? Require direct Codex inspection: Make the matching sibling ../codex checkout available, inspect the cited CLI and config contracts, then refresh the review.

Why: Repository policy makes direct Codex dependency inspection a hard gate for an acting reviewer; this restricted environment has no sibling checkout and cannot obtain one.

Before merge

  • Resolve merge risk (P1) - Credential-file staging and live Docker setup now share one helper path, including the Codex harness. The patch is structurally sound, but merge confidence remains bounded until a reviewer directly confirms the preserved Codex home, auth-file, stdin-login, and app-server assumptions against the required sibling source.
  • Resolve merge risk (P1) - The PR carries the protected maintainer label, so this cleanup workflow should not close or autonomously merge it.
  • Complete next step (P2) - A maintainer must resolve the direct-Codex-inspection gate or explicitly accept the documented evidence gap; there is no narrow code defect for an automated repair lane.
Agent review details

Security

None.

PR surface

Tests +87, Config -172, Other -647. Total -732 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 159 72 +87
Docs 0 0 0 0
Config 1 0 172 -172
Generated 0 0 0 0
Other 12 299 946 -647
Total 19 458 1190 -732

Review metrics

None.

Stored data model

Persistent data-model change detected: persistent cache schema: scripts/lib/live-docker-auth.sh, persistent cache schema: scripts/test-live-acp-bind-docker.sh, persistent cache schema: scripts/test-live-cli-backend-docker.sh, persistent cache schema: scripts/test-live-codex-harness-docker.sh, persistent cache schema: scripts/test-live-gateway-models-docker.sh, persistent cache schema: scripts/test-live-models-docker.sh, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the Codex contract before merge (recommended)
    Provide the matching ../codex checkout for a direct review of the staged-auth and API-key invocation contracts, then refresh this PR review.
  2. Accept the documented proof gap
    A maintainer may intentionally accept the recorded dependency inspection and real-container evidence without an independent local Codex-source check.

Technical review

Best possible solution:

Use the canonical shared Docker helpers, retain the direct release-harness planner invocation, and complete one direct inspection of the matching ../codex source before merging the credential-handling refactor.

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

Not applicable: this PR refactors Docker E2E infrastructure rather than reporting a user-facing defect. The PR does provide a real exact-branch container run for the affected harness path.

Is this the best way to solve the issue?

Unclear: consolidating duplicated helper ownership is the maintainable direction and no competing implementation was found, but the Codex-specific delegation cannot be fully endorsed without the repository-required direct dependency inspection.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a non-user-facing Docker E2E consolidation rather than a runtime product change.
  • merge-risk: 🚨 security-boundary: The refactor moves live-provider credential selection, mounting, and staged copying into shared shell helpers used by multiple Docker harnesses.
  • 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 includes exact-branch Testbox output from a package-and-image build followed by two passing real Docker lanes; this directly demonstrates the changed container harness. Redacted logs are appropriate for any later credential-mode proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes exact-branch Testbox output from a package-and-image build followed by two passing real Docker lanes; this directly demonstrates the changed container harness. Redacted logs are appropriate for any later credential-mode proof.

Evidence

What I checked:

  • Reviewed branch surface: The locally available PR head changes 19 Docker E2E helper, wrapper, workflow-support, and focused test files, with net deletion concentrated in duplicate shell implementations. (scripts/lib/live-docker-auth.sh:71, 2a3723d53a54)
  • Canonical helper ownership: The PR creates a single shared lifecycle for temporary directories, CLI/cache mounts, managed homes, and profile staging, then calls those helpers from the affected live Docker wrappers. (scripts/lib/live-docker-auth.sh:73, 2a3723d53a54)
  • Planner-action removal is supported: Current workflow tests explicitly assert workflows do not use the removed composite action, while current workflow paths invoke the planner scripts from the downloaded release harness directly. (test/scripts/package-acceptance-workflow.test.ts:1573, 11239da88fbe)
  • Current-main provenance: The live-auth contract currently on main appears to originate with the shared ownership refactor; blame attributes the auth helper’s base definitions to Peter Steinberger’s commit 654744d. (scripts/lib/live-docker-auth.sh:1, 654744da1738)
  • Direct Codex contract gate blocked: The Codex wrapper delegates staged-auth copying and bounded setup to shared helpers, but the required sibling ../codex checkout is absent. The repository policy requires the acting reviewer to inspect that dependency directly before a Codex-related merge verdict. (scripts/test-live-codex-harness-docker.sh:169, 2a3723d53a54)
  • Real behavior proof: The PR body records an exact-branch Blacksmith Testbox run that built the package and functional Docker image from scratch, then passed two selected Docker lanes; GitHub context also marks the PR proof: sufficient. (scripts/test-live-codex-harness-docker.sh:171, 2a3723d53a54)

Likely related people:

  • steipete: Current-main blame ties the shared live-auth foundation to Peter Steinberger, and this PR extends that same Docker E2E ownership boundary. (role: feature owner and recent area contributor; confidence: high; commits: 654744da1738, 2a3723d53a54; files: scripts/lib/live-docker-auth.sh, scripts/test-live-codex-harness-docker.sh, scripts/lib/docker-e2e-scenarios.mjs)
  • Dallin Romney: Recent history includes a release-harness contract repair in the workflow area that directly invokes the planner scripts this PR consolidates around. (role: recent adjacent contributor; confidence: medium; commits: 947886e7649c; files: .github/workflows/openclaw-live-and-e2e-checks-reusable.yml, scripts/docker-e2e.mjs)

Rank-up moves

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

  • Inspect the matching sibling ../codex source for the preserved auth, home-directory, and app-server contracts before merging.

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.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-01T10:56:17.610Z sha f04b90d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T11:12:12.167Z sha c644ee1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T11:26:45.073Z sha 2a3723d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T11:34:12.745Z sha 2a3723d :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 1, 2026
@steipete
steipete merged commit b5a59e0 into main Aug 1, 2026
269 of 285 checks passed
@steipete
steipete deleted the codex/goal100k-docker-scenario-owner-0801-2d45 branch August 1, 2026 12:48
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* refactor(docker): consolidate E2E scenario helpers

* fix(ci): retain release harness entry

* test(docker): complete package helper fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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: XL 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