Skip to content

fix(swiftformat): sync GatewayModels exclusions with OpenClawProtocol - #41242

Merged
thewilloftheshadow merged 3 commits into
openclaw:mainfrom
neeravmakwana:fix/swift-protocol-exclusions
Mar 10, 2026
Merged

fix(swiftformat): sync GatewayModels exclusions with OpenClawProtocol#41242
thewilloftheshadow merged 3 commits into
openclaw:mainfrom
neeravmakwana:fix/swift-protocol-exclusions

Conversation

@neeravmakwana

Copy link
Copy Markdown
Contributor

AI-assisted: yes (Cursor). Testing: lightly tested.

Summary

  • Problem: .swiftformat and .swiftlint.yml still exclude apps/macos/Sources/MoltbotProtocol/..., but the generated Swift protocol models now live under apps/macos/Sources/OpenClawProtocol/....
  • Why it matters: these stale exclusions no longer protect the generated GatewayModels.swift file, so formatter/linter runs can drift away from the current generated-file path again.
  • What changed: updated the SwiftFormat directory exclusion and the SwiftLint generated-file exclusion to point at apps/macos/Sources/OpenClawProtocol/GatewayModels.swift.
  • What did NOT change (scope boundary): no generator logic, generated model contents, runtime behavior, or protocol schema changed.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

None.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local git checkout against latest GitHub main
  • Model/provider: n/a
  • Integration/channel (if any): n/a
  • Relevant config (redacted): n/a

Steps

  1. Check current GitHub main for GatewayModels.swift references and generated-file paths.
  2. Confirm MoltbotProtocol was introduced during the earlier macOS rename work, then verify the later refactor: rename to openclaw move changed the generated file path history to OpenClawProtocol.
  3. Update the two stale exclusion entries that still referenced the removed MoltbotProtocol path.

Expected

  • Swift formatter/linter exclusions should point at the current generated protocol path under apps/macos/Sources/OpenClawProtocol.
  • No stale MoltbotProtocol exclusion should remain for GatewayModels.swift.

Actual

  • Both exclusions now point at apps/macos/Sources/OpenClawProtocol/GatewayModels.swift.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Trace/history used for verification:

  • fix(macOS): rename Clawdbot directories and references to Moltbot #2844 explicitly renamed apps/macos/Sources/ClawdbotProtocol to apps/macos/Sources/MoltbotProtocol and updated .swiftformat / .swiftlint.yml as part of that change.
  • Commit 9a71607 (refactor: rename to openclaw) is the path transition point where apps/macos/Sources/MoltbotProtocol/GatewayModels.swift history moves to apps/macos/Sources/OpenClawProtocol/GatewayModels.swift.
  • Current GitHub code search now finds MoltbotProtocol only in these two exclusion configs, while generator/package/docs/test references already use OpenClawProtocol.

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: live GitHub history for the old/new generated file paths; current GitHub code search for MoltbotProtocol vs OpenClawProtocol; local diff only changes the two stale exclusions.
  • Edge cases checked: .swiftformat excludes the whole generated protocol directory, while .swiftlint.yml excludes the specific generated file; both now align with the current path.
  • What you did not verify: local pnpm format:swift / pnpm lint:swift execution, because this environment does not have the swiftformat and swiftlint binaries installed.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this commit to restore the previous exclusions.
  • Files/config to restore: .swiftformat, .swiftlint.yml
  • Known bad symptoms reviewers should watch for: Swift formatter/linter unexpectedly touching the generated protocol models if the path is changed again without updating exclusions.

Risks and Mitigations

  • Risk: there could be another stale exclusion or generated-file reference from the Moltbot -> OpenClaw rename sequence.
  • Mitigation: live GitHub code search currently only finds MoltbotProtocol in these two config entries; generator, package, docs, and test references already point to OpenClawProtocol.

Made with Cursor

@greptile-apps

greptile-apps Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes two stale formatter/linter exclusions that still referenced the old MoltbotProtocol directory name after the rename to OpenClawProtocol. The changes are minimal, correct, and scoped entirely to CI/infra config — no runtime behaviour is affected.

Key findings:

  • Both exclusions (--exclude in .swiftformat and the excluded: entry in .swiftlint.yml) now correctly point to apps/macos/Sources/OpenClawProtocol/GatewayModels.swift.
  • A codebase-wide search confirms there are no remaining MoltbotProtocol references after this change — the rename is fully complete.
  • The apps/macos/Sources/OpenClawProtocol/ directory currently contains only GatewayModels.swift, so the pre-existing asymmetry between .swiftformat (directory-level exclusion) and .swiftlint.yml (file-level exclusion) is functionally equivalent and poses no practical risk.

Confidence Score: 5/5

  • This PR is safe to merge — it is a two-line config-only fix with no runtime impact and no remaining stale references.
  • Both changes are correct and complete: the old MoltbotProtocol paths no longer exist in the repository, and the new OpenClawProtocol paths match the actual location of GatewayModels.swift. A full codebase search confirms no other MoltbotProtocol references remain, and the OpenClawProtocol directory contains only the single generated file both configs are excluding. No logic, security, or behavioral risk.
  • No files require special attention.

Last reviewed commit: 6e02949

@thewilloftheshadow
thewilloftheshadow merged commit 5decb00 into openclaw:main Mar 10, 2026
20 of 21 checks passed
aiwatching pushed a commit to aiwatching/openclaw that referenced this pull request Mar 10, 2026
Moshiii pushed a commit to Moshiii/openclaw that referenced this pull request Mar 11, 2026
Moshiii pushed a commit to Moshiii/openclaw that referenced this pull request Mar 11, 2026
Ruijie-Ysp pushed a commit to Ruijie-Ysp/clawdbot that referenced this pull request Mar 12, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants