Skip to content

fix: stop Gateway without source rebuild#104357

Merged
steipete merged 1 commit into
mainfrom
codex/stop-gateway-with-built-cli
Jul 11, 2026
Merged

fix: stop Gateway without source rebuild#104357
steipete merged 1 commit into
mainfrom
codex/stop-gateway-with-built-cli

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • stop the managed Gateway through the existing built dist/index.js
  • prevent source launchers from auto-building stale output before the stop is dispatched

Proof

  • live updater output showed pnpm openclaw gateway stop auto-building stale dist before stopping PID 66870
  • test/scripts/openclaw-live-updater.test.ts (26 passed)
  • updater skill frontmatter formatted and valid
  • autoreview clean

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9443c5df8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

runCommand("pnpm", ["openclaw", "gateway", "stop"], update.checkout);
// Use the existing built CLI directly. Source launchers may auto-build a
// stale dist before dispatching `gateway stop`, recreating the live-import race.
runCommand(process.execPath, ["dist/index.js", "gateway", "stop"], update.checkout);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle missing dist before direct Gateway stop

When inspectBuildState marks the build as missing, actions.gatewayBuild is true, but this new stop path now executes node dist/index.js gateway stop before pnpm build. In a fresh or corrupted mirror where dist/index.js is absent, Node exits with module-not-found and the updater never reaches the rebuild that is supposed to self-heal missing build output.

Useful? React with 👍 / 👎.

@steipete steipete self-assigned this Jul 11, 2026
@steipete
steipete merged commit 14a056a into main Jul 11, 2026
88 of 90 checks passed
@steipete
steipete deleted the codex/stop-gateway-with-built-cli branch July 11, 2026 09:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant