Skip to content

fix(macos): guard config writer fallback - #79326

Merged
BunsDev merged 1 commit into
mainfrom
meow/macos-config-writer-guard
May 8, 2026
Merged

BunsDev merged 1 commit into
mainfrom
meow/macos-config-writer-guard

Conversation

@BunsDev

@BunsDev BunsDev commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject destructive macOS config snapshots before atomic replacement when they would remove persisted gateway.mode or suspiciously shrink the config.
  • Preserve gateway auth/envelope behavior on protected local fallback writes and stop stale gateway save failures from falling through to direct writes.
  • Add rejected-payload audit artifacts with private 0600 permissions plus regression coverage for config writer, ConfigStore, and AppState sync paths.

Verification

  • swift test --package-path apps/macos --filter OpenClawConfigFileTests
  • swift test --package-path apps/macos --filter AppStateRemoteConfigTests
  • swift test --package-path apps/macos --filter ConfigStoreTests
  • pnpm lint:swift
  • git diff --check origin/main..HEAD
  • Blacksmith Testbox pnpm check:changed reached apps lane but failed because the Testbox Linux image lacks swiftlint; local macOS lint above covers that missing native tool path.

Fixes #64973.
Fixes #74890.

Replaces the focused guard work from #75815 with the same behavior adapted onto current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR size: M

Projects

None yet

1 participant