Skip to content

fix: repair stale packaged gateway entrypoint#625

Merged
artemgetmann merged 1 commit into
mainfrom
codex/consumer-release-artifact-rebuild-20260507
May 8, 2026
Merged

fix: repair stale packaged gateway entrypoint#625
artemgetmann merged 1 commit into
mainfrom
codex/consumer-release-artifact-rebuild-20260507

Conversation

@artemgetmann
Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: replacing /Applications/OpenClaw.app over a source-owned ai.openclaw.gateway now repairs the LaunchAgent to the packaged runtime on first app launch.
  • Proof: DMG-installed app stamped OpenClawGitCommit=fe05c860a8; stale source plist /Users/user/Programming_Projects/openclaw/dist/index.js migrated to /Applications/OpenClaw.app/Contents/Resources/OpenClawRuntime/openclaw/dist/index.js; /healthz returned {"ok":true,"status":"live"} for 18 checks over 90s.
  • Shared-state footgun removed: healthy source-owned gateway no longer tricks the packaged app into attaching and skipping repair when runtime env also differs.
  • Still hurts: notarization/Sparkle release polish remains separate; this smoke used SKIP_NOTARIZE=1 and Gatekeeper correctly reports Unnotarized Developer ID.

Why This Matters

  • The previous fix: repair packaged gateway LaunchAgent replacement #620 proof covered stale entrypoint with matching runtime ownership.
  • Real replacement found the harder case: stale source entrypoint plus stale source runtime env.
  • In that state, /healthz was green, but the loaded service still ran old source code. That is fake success.

Scope Boundary

  • Changed macOS gateway attach/launchd repair logic only.
  • Did not touch Telegram runtime behavior, notifier setup, notarization, or Sparkle feed/key work.

Verification

  • swift test --filter GatewayProcessManagerTests
  • swift test --filter GatewayLaunchAgentManagerTests
  • git diff --check
  • SKIP_NOTARIZE=1 ALLOW_DEFAULT_SPARKLE_KEY_FOR_CONSUMER_SMOKE=1 bash scripts/package-openclaw-mac-dist.sh
  • Artifact checks:
    • dist/OpenClaw.app/Contents/Info.plist OpenClawGitCommit=fe05c860a8
    • OpenClawRuntime/manifest.json gitCommit=fe05c860a8, nodeVersion=22.22.1, uvVersion=0.9.21
    • codesign --verify --deep --strict --verbose=2 dist/OpenClaw.app passed
    • hdiutil verify dist/OpenClaw.dmg valid checksum
  • Live replacement proof:
    • forced stale source plist: ProgramArguments[1]=/Users/user/Programming_Projects/openclaw/dist/index.js
    • installed from rebuilt dist/OpenClaw.dmg and launched /Applications/OpenClaw.app
    • repaired plist: ProgramArguments[1]=/Applications/OpenClaw.app/Contents/Resources/OpenClawRuntime/openclaw/dist/index.js
    • loaded service: launchctl showed /Applications/OpenClaw.app/Contents/Resources/OpenClawRuntime/openclaw/dist/index.js, state running
    • watchdog: Could not find service "ai.openclaw.gateway-watchdog" in domain for user gui: 501
    • liveness: /healthz returned {"ok":true,"status":"live"} for 18 checks over 90s

AI Assistance

  • AI-assisted
  • Testing degree: live-tested

- what changed: make packaged gateway entrypoint repair independent from runtime-env ownership and cover stale source LaunchAgent regression

- why: first app launch could attach to a healthy source-owned gateway and skip the packaged LaunchAgent repair

- behavior/risk: replacement installs now reinstall the canonical gateway when ProgramArguments still point at old source code; targeted macOS launchd tests cover the path
@artemgetmann artemgetmann merged commit 5ce43d8 into main May 8, 2026
3 of 10 checks passed
artemgetmann added a commit that referenced this pull request May 8, 2026
- what changed: mark #625 and real Telegram behavioral proof in the consolidation plan and divergence tracker

- why: stale docs still treated merged gateway repair work, Telegram proof, and Sparkle ownership as open in this lane

- behavior/risk: docs-only; Sparkle/notarized rebuild stays explicitly owned by the separate release lane and GUI Channels-tab smoke remains unclaimed

Co-authored-by: Codex <codex@openai.invalid>
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.

1 participant