Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@steipete
Copy link
Contributor

Summary

  • add follow-up fixes for config.patch: restart/sentinel test + tool hash refactor + UI state typing
  • document config.patch restart/wake params
  • cover raw-mode save/apply gating in UI

Testing

  • pnpm lint
  • pnpm build
  • pnpm test

@cursor
Copy link

cursor bot commented Jan 24, 2026

PR Summary

Follow-up to harden and document config.patch behavior and polish UI config editing.

  • Gateway tool: refactor config.apply/config.patch to derive baseHash via resolveConfigSnapshotHash (resolveBaseHashFromSnapshot) instead of manual hashing
  • Tests: add E2E verifying config.patch writes config, stores a restart sentinel (kind=config-apply, stats.mode=config.patch), and schedules restart
  • Docs (CLI/Tools/Gateway configuration): clarify config.patch performs validate+write+restart+optional wake; document params sessionKey, note, restartDelayMs; add note to config.apply; promote config.patch in common RPCs/tool list
  • UI: add configRawOriginal/configFormOriginal state fields; test that Save/Apply are disabled when raw config is unchanged

Written by Cursor Bugbot for commit c870568. This will update automatically on new commits. Configure here.

@steipete steipete merged commit 8e159ab into main Jan 24, 2026
27 of 43 checks passed
@steipete steipete deleted the fix/gateway-config-patch-followup branch January 24, 2026 23:33
@steipete
Copy link
Contributor Author

Landed via squash merge onto main.

  • Gate: pnpm lint && pnpm build && pnpm test (before changelog-only follow-up commit)
  • Land commit: 8e159ab
  • Merge commit: 8e159ab

Thanks @Glucksberg!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

expect(parsed.payload?.stats?.mode).toBe("config.patch");
} catch {
expect(patchRes.ok).toBe(true);
}
Copy link

Choose a reason for hiding this comment

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

E2E test catch block masks sentinel verification failures

Medium Severity

The test "writes config, stores sentinel, and schedules restart" has a catch block that silently passes when sentinel file verification fails. If fs.readFile throws (file doesn't exist, permissions error) or JSON.parse fails, the catch block falls back to expect(patchRes.ok).toBe(true) which was already verified on line 191. This means the test can pass even when the sentinel file is never written or contains incorrect content, defeating the purpose of verifying sentinel creation.

Fix in Cursor Fix in Web

mcinteerj pushed a commit to mcinteerj/moltbot that referenced this pull request Jan 25, 2026
* fix: land config.patch restarts/docs/tests (openclaw#1624) (thanks @Glucksberg)

* docs: update changelog entry for config.patch follow-up (openclaw#1653) (thanks @Glucksberg)
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.

2 participants