fix(config): refresh runtime snapshot from disk after write. Fixes #37175#37313
Conversation
Greptile SummaryThis PR fixes a stale-snapshot race condition where a second WebSocket connection's The approach taken — Key changes:
Confidence Score: 4/5
Last reviewed commit: 3df4457 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 166b536bd5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
166b536 to
f43c88e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f43c88e9a3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
676a026 to
3df4457
Compare
|
@greptile-apps review it |
|
hi @gumadeiras , would you mind taking a look at this PR? Your feedback would be appreciated. |
3df4457 to
4b59d66
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b59d66dad
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbbe40af2b
ℹ️ 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".
27594ac to
69e1861
Compare
|
Merged via squash.
Thanks @bbblending! |
|
Thanks @gumadeiras for building on this and hardening the fix — really appreciate it. |
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…7175 (#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
上游更新摘要(abb8f6310 → bda63c3,164 commits): ### 新功能 - ACP: 新增 resumeSessionId 支持 ACP session 恢复(openclaw#41847) - CLI: 新增 openclaw backup create/verify 本地状态归档命令(openclaw#40163) - Talk: 新增 talk.silenceTimeoutMs 配置项,可自定义静默超时(openclaw#39607) - ACP Provenance: 新增 ACP 入站溯源元数据和回执注入(openclaw#40473) - Brave 搜索: 新增 llm-context 模式,返回 AI 精炼摘要(openclaw#33383) - browser.relayBindHost: Chrome relay 可绑定非 loopback 地址(WSL2 支持)(openclaw#39364) - node-pending-work: 新增 node.pending.pull/ack RPC 接口 - Telegram: 新增 exec-approvals 处理器,支持 Telegram 内命令执行审批 - Mattermost: 新增 target-resolution,修复 markdown 保留和 DM media 上传 - MS Teams: 修复 Bot Framework General channel 对话 ID 兼容性(openclaw#41838) - secrets/runtime-web-tools: 全新 web runtime secrets 工具模块 - cron: 新增 store-migration,isolated-agent 直送核心通道,delivery failure notify - TUI: 自动检测浅色终端主题(COLORFGBG),支持 OPENCLAW_THEME 覆盖(openclaw#38636) ### 修复 - macOS: launchd 重启前重启已禁用服务,修复 openclaw update 卡死问题 - Telegram DM: 按 agent 去重入站 DM,防止同一条消息触发重复回复(openclaw#40519) - Matrix DM: 修复 m.direct homeserver 检测,保留房间绑定优先级(openclaw#19736) - 飞书: 清理插件发现缓存,修复 onboarding 安装后重复弹窗(openclaw#39642) - config/runtime snapshots: 修复 config 写入后 secret 快照丢失问题(openclaw#37313) - browser/CDP: 修复 ws:// CDP URL 反向代理和 wildcard 地址重写 - agents/failover: 识别 Bedrock tokens per day 限额为 rate limit ### 版本 - ACPX 0.1.16 - iOS/macOS 版本号更新 - Android: 精简后台权限 构建验证:待执行
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…enclaw#37175 (openclaw#37313) Merged via squash. Prepared head SHA: 69e1861 Co-authored-by: bbblending <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Summary
agents.createon one WebSocket connection,agents.updateon another fails with "agent not found" because the second connection'sloadConfig()returns a stale in-memory snapshot.writeConfigFile, always clear the runtime snapshot. When the process had both snapshots before the write, refresh both from disk (loadConfig()+nextCfg) so follow-up reads get normalized config and subsequent writes keep secret-preservation. When it had no snapshot, do not set a new one so callers keep reading from disk/cache and external edits toopenclaw.jsonremain visible.src/config/io.tsandsrc/config/io.runtime-snapshot-write.test.ts; no API or config schema changes.Change Type
Scope
Linked Issue/PR
User-visible / Behavior Changes
Second connection's
agents.updatenow sees the newly created agent without reload/restart.Security Impact
Compatibility / Migration
Risks and Mitigations
None.