Skip to content

fix: restore Linux attachment resolver build#182

Merged
steipete merged 1 commit into
openclaw:mainfrom
omarshahine:fix/linux-attachment-resolver-import
Jul 17, 2026
Merged

fix: restore Linux attachment resolver build#182
steipete merged 1 commit into
openclaw:mainfrom
omarshahine:fix/linux-attachment-resolver-import

Conversation

@omarshahine

Copy link
Copy Markdown
Contributor

Summary

Reproduction

The two latest main workflow runs fail in linux-read-core while compiling AttachmentResolver.swift:

error: no such module 'Darwin'

This also makes unrelated PRs appear red when GitHub tests their merge ref against current main.

Verification

  • current main failure: https://github.com/openclaw/imsg/actions/runs/29522912373
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer make lint: exit 0 with 12 existing warnings and 0 serious violations
  • git diff --check: passed
  • macOS build and the affected AttachmentResolver process tests compile and run under Xcode; the full local suite reached 477 passing tests before two unrelated rich-link image-staging tests failed
  • the PR Linux lane is the authoritative proof for the restored Glibc build

@clawsweeper clawsweeper Bot added 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. P1 Urgent regression or broken agent/channel workflow affecting real users now. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 12:52 PM ET / 16:52 UTC.

Summary
Conditionally imports Darwin or Glibc in AttachmentResolver.swift so the attachment resolver builds on Linux.

Reproducibility: yes. Current main has a concrete Linux compile failure at the unconditional Darwin import, and exact-head Linux validation confirms the corrected Glibc path.

Review metrics: 2 noteworthy metrics.

  • Patch scope: 1 file, 6 additions, 1 deletion. The repair is confined to platform imports in the source file that fails on Linux.
  • Platform checks: 2 of 2 successful. Both the affected Linux lane and the macOS lane pass on the exact PR head.

Root-cause cluster
Relationship: canonical
Canonical: #182
Summary: This PR is the focused landing candidate for the Linux compilation regression; the related pull requests either introduced the affected code or are independently blocked by its failing base check.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is needed; the proven, clean patch is ready for normal maintainer merge handling.

Security
Cleared: The conditional import change introduces no dependency, secret, workflow, permission, downloaded-code, or supply-chain surface.

Review details

Best possible solution:

Merge the narrow platform-conditional import fix while retaining the existing Darwin behavior on macOS and Glibc behavior on Linux.

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

Yes. Current main has a concrete Linux compile failure at the unconditional Darwin import, and exact-head Linux validation confirms the corrected Glibc path.

Is this the best way to solve the issue?

Yes. A conditional platform import is the narrowest maintainable repair and preserves existing macOS behavior without adding configuration or parallel implementation paths.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Exact-head Linux terminal proof shows the Glibc branch compiling, all four read-core tests passing, the CLI building, and the real binary executing successfully.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Exact-head Linux terminal proof shows the Glibc branch compiling, all four read-core tests passing, the CLI building, and the real binary executing successfully.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: Current main breaks the Linux read-core workflow and causes unrelated merge-ref checks to appear failed.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Exact-head Linux terminal proof shows the Glibc branch compiling, all four read-core tests passing, the CLI building, and the real binary executing successfully.
  • proof: sufficient: Contributor real behavior proof is sufficient. Exact-head Linux terminal proof shows the Glibc branch compiling, all four read-core tests passing, the CLI building, and the real binary executing successfully.
Evidence reviewed

What I checked:

  • Current-main regression: Current main imports Darwin unconditionally, and the linux-read-core workflow fails while compiling this file with no such module 'Darwin'. (Sources/IMsgCore/AttachmentResolver.swift:1, 231b8d606898)
  • Focused patch: The PR replaces the unconditional import with the repository's established canImport(Darwin) / canImport(Glibc) platform pattern and changes no other behavior. (Sources/IMsgCore/AttachmentResolver.swift:1, 9ffe9a0a45d5)
  • Exact-head Linux proof: A collaborator validated exact head 9ffe9a0a45d5b9609535b1a03ee1376c5b44c836 in an official Swift 6.2.4 Linux container: the Glibc branch compiled, all four Linux read-core tests passed, the CLI built, and the real binary printed version 0.13.0. (Sources/IMsgCore/AttachmentResolver.swift:4, 9ffe9a0a45d5)
  • Automated checks: Both the linux-read-core and macos checks completed successfully on the PR head, and GitHub reports the PR as cleanly mergeable. (9ffe9a0a45d5)
  • Regression provenance: The unconditional Darwin dependency appeared through the merged AttachmentResolver timeout work in pull request 176, whose merge commit is 17e36970a58dadcda5f3026cfa47498f289c4f2a. (Sources/IMsgCore/AttachmentResolver.swift:1, 17e36970a58d)

Likely related people:

  • SebTardif: The regression appears to date to the merged timeout work that most recently expanded AttachmentResolver.swift. (role: introduced adjacent behavior; confidence: high; commits: 17e36970a58d, 8981820e863f; files: Sources/IMsgCore/AttachmentResolver.swift)
  • steipete: Provided exact-head Linux validation covering the affected compilation branch, tests, CLI build, and real binary execution. (role: reviewer and proof provider; confidence: high; files: Sources/IMsgCore/AttachmentResolver.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-07-17T03:10:49.331Z sha 9ffe9a0 :: needs real behavior proof before merge. :: none

@steipete

Copy link
Copy Markdown
Collaborator

Maintainer proof on exact head 9ffe9a0a45d5b9609535b1a03ee1376c5b44c836:

  • Provider: brokered AWS Crabbox
  • Lease: cbx_2c219055faf2 (c7a.8xlarge, x86_64 Linux)
  • Runtime: official swift:6.2.4-noble container
  • Command path: resolve packages, patch dependencies, swift test, swift build --product imsg, then .build/debug/imsg --version
  • Observed: AttachmentResolver.swift compiled through the Glibc branch; all 4 Linux read-core tests passed; CLI build passed; real binary printed 0.13.0.

The lease was released after proof.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Jul 17, 2026
@steipete
steipete merged commit 33b3cf1 into openclaw:main Jul 17, 2026
2 checks passed
@omarshahine
omarshahine deleted the fix/linux-attachment-resolver-import branch July 18, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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.

2 participants