Skip to content

fix(docker): keep helper test portable on macOS - #117526

Merged
vincentkoc merged 3 commits into
mainfrom
test/docker-wc-portability-20260801
Aug 1, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
test/docker-wc-portability-20260801

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where macOS maintainer runs would fail the Docker build-helper test because BSD wc -l pads its numeric output with whitespace.

Why This Change Was Made

The assertion now compares the line count numerically instead of comparing the platform-formatted output as a string. The expected count remains exactly two, and no runtime Docker behavior changes.

User Impact

Maintainers can run the Docker helper test consistently on macOS and Linux. There is no user-facing runtime, configuration, or environment-variable change.

Evidence

  • Before: the named test failed on macOS at the wc -l string comparison.
  • After: the named test passes (1 passed, 177 skipped).
  • Full test file passes (178 passed).
  • Targeted oxfmt --check and git diff --check pass.
  • P1 autoreview reports no accepted or actionable findings (0.99).
  • Regression introduced by b5a59e0a7d94 in refactor(docker): consolidate E2E scenario helpers #117359.

* origin/main: (27 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (#117486)
  fix(doctor): reject contradictory lint check selectors (#117495)
  fix(anthropic): honor configured model pricing (#117275)
  refactor(plugins): reuse scoped loader for capability discovery (#117373)
  refactor(test): derive changed tooling routes (#117407)
  fix(kova): clarify extension memory attribution (#117500)
  fix(imessage): sanitize private context on every outbound path (#117501)
  fix(ci): align release validation fixtures (#117494)
  fix(talk): preserve owner authorization in realtime consults (#114163)
  fix(ui): surface aborted-run diagnostics (#117497)
  perf(models): skip Ollama row runtime loading (#117465)
  fix(cli): report user profile command outcomes (#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (#117338) (#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (#116412)
  fix(models): avoid waiting on promotions before listing models (#117322)
  refactor(plugins): inherit shared package boundary settings (#117474)
  fix(systemd): parse all inline environment assignments (#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (#115545)
  fix(qa): Slack progress lane misses successful delivery (#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (#117476)
  ...
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 1, 2026
@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 1, 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 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 2:25 PM ET / 18:25 UTC.

ClawSweeper review

What this changes

The PR replaces a string comparison of wc -l output with Bash numeric comparison so the Docker build-helper test passes with both macOS BSD and Linux GNU formatting.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The one-line test repair correctly compares the recorded Docker-call count numerically, avoiding BSD wc whitespace without changing the expected count or Docker runtime behavior. No actionable patch finding was found; this member-authored PR has the protected maintainer label and should stay open for normal maintainer merge handling. Likely related people: @vincentkoc and @steipete, based on the test-path history and the merged helper refactor.

Priority: P3
Reviewed head: a164d9c477595042f688322e008b206c7e318ac2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The minimal assertion change matches the test invariant and has reported focused validation, with no correctness or security defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its body reports focused exact-head test output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its body reports focused exact-head test output.
Evidence reviewed 5 items Test invariant and exact patch: The test stubs Docker, sources the package helper, calls one foreground and one detached wrapper, then asserts that exactly two calls were recorded. The branch changes only the formatting-sensitive string check to a numeric comparison.
Owner boundary: The sourced package helper defines both wrapper functions: the foreground wrapper runs a container with harness mounts, while the detached wrapper runs the same harness-mounted container in detached mode.
Feature-history provenance: The local history ties the affected test path to the merged Docker E2E scenario-helper consolidation, matching the PR report that the portability-sensitive assertion arrived with that refactor.
Findings None None.
Security None None.

How this fits together

The Docker build-helper test sources the shared package helper, runs its foreground and detached harness wrappers against a stubbed Docker command, and records the two calls. The assertion verifies that both wrapper paths remain available when the helper is sourced directly.

flowchart LR
  A[Docker helper test] --> B[Source package helper]
  B --> C[Foreground harness wrapper]
  B --> D[Detached harness wrapper]
  C --> E[Stub Docker call log]
  D --> E
  E --> F[Numeric line-count assertion]
  F --> G[Portable test result]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports the branch as behind main, with required checks still in progress; merge or rebase-test the exact head against current main before landing.
  • Resolve merge risk (P1) - The local review checkout could not independently read the supplied current-main SHA because it is at a different local main commit and its promisor remote was unreachable.】【:】【“】【.
  • Complete next step (P2) - The protected maintainer label and member authorship require normal maintainer merge handling, not an automated repair or cleanup lane.
Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the test’s two-call invariant and merge this numeric assertion after the exact head has a current merge result and completed required checks.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the test’s two-call invariant and merge this numeric assertion after the exact head has a current merge result and completed required checks.

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

Yes, source provides a high-confidence reproduction mechanism: the existing quoted string comparison rejects BSD wc -l padding even when the count is two. The targeted macOS run remains to be verified by CI or a maintainer environment.

Is this the best way to solve the issue?

Yes. Bash numeric comparison is the narrowest maintainable solution because the contract is the count of Docker calls, not wc's platform-specific text formatting.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is low-risk cross-platform test portability work with no released runtime behavior, configuration, or API change.
  • 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 member-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its body reports focused exact-head test output.

Evidence

What I checked:

  • Test invariant and exact patch: The test stubs Docker, sources the package helper, calls one foreground and one detached wrapper, then asserts that exactly two calls were recorded. The branch changes only the formatting-sensitive string check to a numeric comparison. (test/scripts/docker-build-helper.test.ts:2788, a164d9c47759)
  • Owner boundary: The sourced package helper defines both wrapper functions: the foreground wrapper runs a container with harness mounts, while the detached wrapper runs the same harness-mounted container in detached mode. (scripts/lib/docker-e2e-package.sh:277, d876a8338722)
  • Feature-history provenance: The local history ties the affected test path to the merged Docker E2E scenario-helper consolidation, matching the PR report that the portability-sensitive assertion arrived with that refactor. (test/scripts/docker-build-helper.test.ts:2788, b5a59e0a7d94)
  • Re-review continuity: The test-file diff from the prior reviewed head to the current head is empty, so the previously clean one-line repair remains unchanged after the branch refresh. (test/scripts/docker-build-helper.test.ts:2788, a164d9c47759)
  • Local current-main gap: The checkout's local main is d876a83 rather than the supplied current-main SHA b340e68. Missing promisor objects could not be fetched because GitHub DNS resolution failed, so the current-main comparison relies on the supplied exact-head GitHub context rather than a local b340 source read.

Likely related people:

  • vincentkoc: Local shortlog shows the strongest contribution count on the affected test path, and this contributor supplied the narrowly scoped portability repair. (role: longstanding test-path contributor; confidence: medium; commits: c61388a0e02f, a164d9c47759; files: test/scripts/docker-build-helper.test.ts)
  • steipete: The merged Docker scenario-helper consolidation is the cited provenance for the changed test assertion and owns the shared helper boundary. (role: merged feature author; confidence: high; commits: b5a59e0a7d94; files: test/scripts/docker-build-helper.test.ts, scripts/lib/docker-e2e-package.sh)

Rank-up moves

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

  • Refresh the merge result against current main and allow the remaining required checks to finish on the exact head.

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 (2 earlier review cycles)
  • reviewed 2026-08-01T17:12:50.278Z sha e3c16ac :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T17:50:18.112Z sha e3c16ac :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 1, 2026 18:11
* origin/main: (26 commits)
  fix(update): return failure when dirty checkout blocks update (#117452)
  fix(auto-reply): apply mixed chat directives in one session transaction (#117542)
  refactor(ui): unify channel status and setup controls (#117499)
  fix(doctor): preserve surviving lint selections (#117543)
  fix(media): keep an unquoted MEDIA path with spaces as one media item (#112464)
  refactor(channels): consolidate lightweight plugin discovery (#117541)
  fix(imessage): prevent duplicate messages after delayed sends (#110853)
  refactor(memory): unify authoritative dreaming state and presentation (#117538)
  refactor(agents): consolidate main-session recovery ownership (#117383)
  fix(proxy-capture): make path-based session cleanup atomic (#98852)
  refactor(agents): consolidate compaction and context-engine ownership (#117482)
  fix(gateway): preserve Responses usage details (#117533)
  perf(gateway): skip empty session recovery stores (#117498)
  fix(ci): update canonical Kova performance pin (#117508)
  fix(system-agent): emit the wizard cancel hint once per message (#113731)
  refactor: dedupe secrets runtime snapshot fixtures (#117502)
  test(google): cover ready callback close precedence
  test(openai): dedupe realtime voice fixtures (#117503)
  fix(google): flush lazy prompts on provider readiness
  fix(gateway): keep canonical hooks on pristine startup path (#117493)
  ...
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head a164d9c477595042f688322e008b206c7e318ac2.

The branch was refreshed with current main, which includes the canonical tooling-route fix from #117531. The PR surface remains one test-line change. Focused proof on this exact head:

  • test/scripts/docker-build-helper.test.ts: 178/178 passed
  • stale tooling-route regressions: 2/2 passed
  • git diff --check: passed

@clawsweeper

clawsweeper Bot commented Aug 1, 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:

@vincentkoc

Copy link
Copy Markdown
Member Author

The repo-native merge verifier passed this exact head, but GitHub rejected the required no-squash merge because repository settings disable merge commits.

I am therefore direct-landing the preserved signed series through signed two-parent merge f4253da3e40b6b65560fa4f9aa9d3fce1faceb97, with current main a624ba7b96aa8b15d4a859e69853f9842906212d as first parent and PR head a164d9c477595042f688322e008b206c7e318ac2 as second parent.

Merged-tree proof: Docker helper tests 178/178, tooling regression assertions 2/2, and git diff --check passed. This preserves the PR commits and author credit without squash or GitHub rebase.

@vincentkoc
vincentkoc merged commit f4253da into main Aug 1, 2026
91 checks passed
@vincentkoc
vincentkoc deleted the test/docker-wc-portability-20260801 branch August 1, 2026 18:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* commit '3f57adea157314317d924f6fdbb66aa407a96f9a':
  test(docker): make line count assertion portable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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