fix(worker): keep live OpenClaw token out of bulk file sync - #983
fix(worker): keep live OpenClaw token out of bulk file sync#983RerankerGuo wants to merge 1 commit into
Conversation
📊 CI Metrics ReportSummary
By Role
Per-Test Breakdown
Trends✅ 1 test(s) improved (fewer LLM calls) Generated by HiClaw CI on 2026-07-13 16:41:34 UTC |
37c091d to
f8a2102
Compare
|
@shiyiyue1102 Hi! This PR only touches the Worker |
f8a2102 to
f510114
Compare
1bd7d85 to
0a2c186
Compare
|
Preventing a stale MinIO copy of openclaw.json from briefly overwriting the live Worker token is valuable. The current PR cannot be reviewed independently because it conflicts with main and includes stacked #985 and #1015 test commits. Please rebase onto the latest main branch and rebuild the PR so the diff contains only the file-sync change, its focused regression, and the required changelog entry. A behavioral test that proves the bulk mirror never replaces the local token would be stronger than only checking for an exclude string. |
0a2c186 to
94550bc
Compare
|
Rebased and rebuilt the PR on current
Verification:
|
Summary
Fixes #809 by preventing the manual OpenClaw Worker file-sync path from ever replacing the live
openclaw.jsonwith the stale MinIO copy, even briefly.The previous flow copied the live file aside, bulk-mirrored the remote workspace over it, and merged the saved local copy afterward. OpenClaw watches this file, so the stale Matrix token could be observed during that overwrite window and used on reconnect.
Changes
openclaw.jsoninto a Worker-specific temporary file;openclaw.jsonfrom the bulkmc mirror;accessToken;mcimplementation.The behavior test reads the live token inside the mocked bulk-mirror operation. It fails if
openclaw.jsonwas not excluded or if the stale remote token became visible. It also verifies that Manager-owned model/channel fields are updated, Worker-owned fields remain, other workspace files are pulled, and the temporary remote config is removed.Scope
This PR contains only:
manager/agent/worker-agent/skills/file-sync/scripts/agentteams-sync.shmanager/tests/test-agentteams-sync.shThe previously stacked integration-test commits are no longer part of the branch.
Verification
bash -n manager/agent/worker-agent/skills/file-sync/scripts/agentteams-sync.sh manager/tests/test-agentteams-sync.shbash manager/tests/test-agentteams-sync.shgit diff --checkImpact
mc cpreplaces the previous local backup copy; bulk mirror scope is reduced by one file