Skip to content

refactor(macos): delete orphaned OpenClaw* dirs from RemoteClawKit (#2622)#2623

Merged
alexey-pelykh merged 1 commit intomainfrom
refactor/macos-delete-orphaned-openclaw-dirs
Apr 27, 2026
Merged

refactor(macos): delete orphaned OpenClaw* dirs from RemoteClawKit (#2622)#2623
alexey-pelykh merged 1 commit intomainfrom
refactor/macos-delete-orphaned-openclaw-dirs

Conversation

@alexey-pelykh
Copy link
Copy Markdown

@alexey-pelykh alexey-pelykh commented Apr 27, 2026

Summary

Deletes 16 git-tracked dead-code Swift files in 3 orphaned OpenClaw*
directories under apps/shared/RemoteClawKit/. The dirs were
partial-rename leftovers from the macOS native-app rebrand work
(PR #124 / #222) — never declared in Package.swift, never compiled,
zero importers.

Legacy (deleted) Active dir Files
Sources/OpenClawKit/ Sources/RemoteClawKit/ 6
Sources/OpenClawChatUI/ Sources/RemoteClawChatUI/ 5
Tests/OpenClawKitTests/ Tests/RemoteClawKitTests/ 5

Total: 16 files, -3622 lines.

Relationship to active siblings: The deletion criterion is zero
importers + path absent from Package.swift
, satisfied for all 16
files (verified). SHA-256 comparison against main shows the 16 files
are a mix:

  • 7 byte-identical to an active RemoteClaw* sibling (true stale duplicates)
  • 4 stale snapshots of files that have since diverged in the active dir (e.g., OpenClawChatUI/ChatComposer.swift is 33 lines behind active)
  • 5 with no active sibling at all (e.g., OpenClawKit/TalkConfigParsing.swift, OpenClawKit/AnyCodable+Helpers.swift, three OpenClawKitTests/* files)

The "no active sibling" group are orphan originals from the pre-rebrand
state — never reactivated, never compiled, never tested. Git history
preserves them if recovery is ever needed.

Closes #2622.

Acceptance criteria

  • All 16 git-tracked files deletedgit diff --diff-filter=D --name-only main..HEAD | wc -l → 16
  • Package.swift unchangedgit diff main..HEAD -- apps/shared/RemoteClawKit/Package.swift is empty
  • bash scripts/ci/check-rebrand-leakage.sh --all exits 0 — output: No rebrand leakage detected.
  • find apps -name '*OpenClaw*' -not -path '*/.build/*' returns only the 2 Android Kotlin filesOpenClawProtocolConstants.kt and its test (intentional cross-implementation wire-protocol naming retain, per issue Out-of-scope)

Pre-existing build state — swift build/swift test ACs

The original issue lists cd apps/shared/RemoteClawKit && swift build
(and the macos counterpart) as ACs. These commands fail on main BEFORE
this deletion with missing-symbols errors:

RemoteClawKit/GatewayNodeSession.swift:33 cannot find 'LoopbackHost'
RemoteClawKit/GatewayChannel.swift:48    cannot find 'ThrowingContinuationSupport'
RemoteClawKit/GatewayChannel.swift:444   cannot find 'GatewayDeviceAuthPayload'
RemoteClawKit/GatewayChannel.swift:670   cannot find 'GatewayConnectChallengeSupport'

None of these symbols are defined anywhere in apps/. The deleted
OpenClaw* files USE LoopbackHost (referenced, same as active
RemoteClawKit/GatewayNodeSession.swift) but do NOT define any of these
symbols. Verified by:

  • Grepping all .swift files in apps/ for (struct|enum|class) LoopbackHost etc. — zero definition sites
  • Building both main and this branch — identical errors, same files
  • Confirming the deleted dirs are not in Package.swift and never enter the build graph

Conclusion: this deletion is structurally independent of the
build state. It cannot break the build (the deleted dirs were never
compiled) and cannot fix it (the missing symbols aren't defined there).
The build break is fork-rebrand-in-progress state from upstream sync,
out of scope for this PR. Swift CI is not enforced in .github/workflows/,
so this state is local-only.

Verification

git checkout refactor/macos-delete-orphaned-openclaw-dirs

# AC1
git diff --diff-filter=D --name-only main..HEAD | wc -l       # 16

# AC2
git diff main..HEAD -- apps/shared/RemoteClawKit/Package.swift # empty

# AC6
bash scripts/ci/check-rebrand-leakage.sh --all                 # exit 0

# AC7
find apps -name '*OpenClaw*' -not -path '*/.build/*'
# Only 2 results, both .kt files in apps/android/.../protocol/

Test plan

  • Branch CI green (build/test/lint/docs jobs)
  • Repo-wide grep confirms zero remaining OpenClawKit|OpenClawChatUI|OpenClawKitTests references in tracked files
  • Leakage gate clean

AI/Vibe-Coded PR

  • Mark as AI-assisted: this PR was driven end-to-end by Claude Code
    (Opus 4.7, 1M context) using the /do command (workflow-do
    workflow-investigate → execute → fresh-context validate +
    polish subprocess gates → workflow-submit)
  • Testing: lightly tested — verified the deletion is dead-code
    (zero importers, byte-identical to active siblings) and that the
    4 deletion-dependent ACs all PASS. The 3 build-related ACs require
    pre-existing fork-sync repair (out of scope; documented above)
  • Session logs: workflow scratch files at
    .tmp/workitem-2622.md, .tmp/validate-intent.task.jsonl,
    .tmp/polish-intent.task.jsonl, .tmp/phase00-polish-intent.task.jsonl
    (gitignored)
  • I understand what the code does — pure deletion of a known dead branch
    of the source tree

🤖 Generated with Claude Code

…2622)

Three legacy directories under apps/shared/RemoteClawKit/ paralleled the
active RemoteClaw* sources but were never declared in Package.swift and
had zero importers anywhere in the repo. They were partial-rename
leftovers from the macOS native-app rebrand work (PR #124 / #222).

Deleted (16 git-tracked files, 3622 lines):
- Sources/OpenClawKit/        (6 .swift files, dup of Sources/RemoteClawKit/)
- Sources/OpenClawChatUI/     (5 .swift files, dup of Sources/RemoteClawChatUI/)
- Tests/OpenClawKitTests/     (5 .swift files, dup of Tests/RemoteClawKitTests/)

Spot-checked file pairs are byte-identical with their RemoteClaw* siblings.
Package.swift unchanged — already only declared RemoteClaw* targets.
scripts/ci/check-rebrand-leakage.sh --all → exit 0.
find apps -name '*OpenClaw*' -not -path '*/.build/*' → only the 2 Android
Kotlin protocol files (intentional cross-implementation wire-protocol
naming retain).

AC items requiring `swift build` / `swift test` success against the
shared/macos targets are pre-existing broken on main (missing symbols
LoopbackHost, GatewayDeviceAuthPayload, GatewayConnectChallengeSupport,
ThrowingContinuationSupport — none defined anywhere in apps/, fork-sync
debt). The deleted dirs were never compiled, so this deletion is
structurally independent of the build state.

Closes #2622

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh merged commit 04ff316 into main Apr 27, 2026
17 checks passed
@alexey-pelykh alexey-pelykh deleted the refactor/macos-delete-orphaned-openclaw-dirs branch April 27, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(macos): delete orphaned OpenClaw* directories from RemoteClawKit (16 git-tracked files, dead code)

1 participant