fix(nightly): preserve WeChat plugin across rebuild restore - #3852
fix(nightly): preserve WeChat plugin across rebuild restore#3852ericksoa wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPreserve OpenClaw image-managed extensions during sandbox restore and integrate selective tar/cleanup logic; ensure openclaw-weixin is installed/enabled during provisioning and re-run seed-wechat-accounts.py after rebuild's openclaw doctor --fix when present. ChangesImage-Managed Extension Preservation During Restore
WeChat Extension Provisioning & Rebuild Seeding
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/actions/sandbox/rebuild.ts (1)
810-835: Run the targeted stop/start lifecycle E2E for this rebuild-path change.Given this file controls rebuild behavior tied to channel lifecycle persistence, run the focused
channels-stop-start-e2egate before merge.As per coding guidelines:
src/lib/actions/sandbox/rebuild.ts: "This file controls disabled channel resolution used during onboard and rebuild... E2E test recommendation: channels-stop-start-e2e."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/rebuild.ts` around lines 810 - 835, This change touches rebuild behavior in src/lib/actions/sandbox/rebuild.ts around the seed-wechat logic (symbols: seedWechatCommand, executeSandboxCommand, seedWechatResult, log, sandboxName); before merging, run the targeted end-to-end gate "channels-stop-start-e2e" (the focused stop/start lifecycle test) to validate channel lifecycle persistence and that channels.openclaw-weixin remains paired after rebuild, and report any failures tied to the seed-wechat step so we can iterate on seed invocation or exit handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/actions/sandbox/rebuild.ts`:
- Around line 823-834: The code calls seedWechatResult.stdout.includes(...)
without guaranteeing stdout is defined and also shows no user-facing message
when the seed helper is absent; update the seed handling in the seedWechatResult
block (the result of executeSandboxCommand with seedWechatCommand) to first
guard stdout (e.g., check typeof seedWechatResult?.stdout === "string" or
seedWechatResult?.stdout != null) before calling .includes, and when status ===
0 but stdout is missing/undefined emit an explicit "WeChat account seed skipped
(helper missing)" or similar console.log message so users see the skipped state;
keep the existing success message (console.log with G check) when stdout exists
and does not contain "not present; skipping".
---
Nitpick comments:
In `@src/lib/actions/sandbox/rebuild.ts`:
- Around line 810-835: This change touches rebuild behavior in
src/lib/actions/sandbox/rebuild.ts around the seed-wechat logic (symbols:
seedWechatCommand, executeSandboxCommand, seedWechatResult, log, sandboxName);
before merging, run the targeted end-to-end gate "channels-stop-start-e2e" (the
focused stop/start lifecycle test) to validate channel lifecycle persistence and
that channels.openclaw-weixin remains paired after rebuild, and report any
failures tied to the seed-wechat step so we can iterate on seed invocation or
exit handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 265ac0d8-bde4-4cc8-9b4a-6fe4d4665e5b
📒 Files selected for processing (3)
src/lib/actions/sandbox/rebuild.tssrc/lib/state/sandbox.tstest/snapshot.test.ts
| const seedWechatResult = executeSandboxCommand(sandboxName, seedWechatCommand); | ||
| log( | ||
| `seed-wechat-accounts.py: exit=${seedWechatResult?.status}, stdout=${(seedWechatResult?.stdout || "").substring(0, 200)}`, | ||
| ); | ||
| if (seedWechatResult && seedWechatResult.status === 0) { | ||
| if (!seedWechatResult.stdout.includes("not present; skipping")) { | ||
| console.log(` ${G}\u2713${R} WeChat account seed reapplied`); | ||
| } | ||
| } else { | ||
| console.log( | ||
| ` ${D}WeChat account seed skipped (seed helper returned ${seedWechatResult?.status ?? "null"})${R}`, | ||
| ); |
There was a problem hiding this comment.
Guard stdout before .includes() and emit an explicit “skipped” message for missing helper.
Line 828 can throw if stdout is undefined (you already treat it as optional on Line 825). Also, when the helper is absent, this path exits 0 but prints no user-facing status.
Suggested fix
const seedWechatResult = executeSandboxCommand(sandboxName, seedWechatCommand);
+ const seedWechatStdout = seedWechatResult?.stdout || "";
+ const seedWechatHelperMissing = seedWechatStdout.includes("not present; skipping");
log(
- `seed-wechat-accounts.py: exit=${seedWechatResult?.status}, stdout=${(seedWechatResult?.stdout || "").substring(0, 200)}`,
+ `seed-wechat-accounts.py: exit=${seedWechatResult?.status}, stdout=${seedWechatStdout.substring(0, 200)}`,
);
if (seedWechatResult && seedWechatResult.status === 0) {
- if (!seedWechatResult.stdout.includes("not present; skipping")) {
+ if (seedWechatHelperMissing) {
+ console.log(` ${D}WeChat account seed helper not present; skipping${R}`);
+ } else {
console.log(` ${G}\u2713${R} WeChat account seed reapplied`);
}
} else {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/actions/sandbox/rebuild.ts` around lines 823 - 834, The code calls
seedWechatResult.stdout.includes(...) without guaranteeing stdout is defined and
also shows no user-facing message when the seed helper is absent; update the
seed handling in the seedWechatResult block (the result of executeSandboxCommand
with seedWechatCommand) to first guard stdout (e.g., check typeof
seedWechatResult?.stdout === "string" or seedWechatResult?.stdout != null)
before calling .includes, and when status === 0 but stdout is missing/undefined
emit an explicit "WeChat account seed skipped (helper missing)" or similar
console.log message so users see the skipped state; keep the existing success
message (console.log with G check) when stdout exists and does not contain "not
present; skipping".
Selective E2E Results — ✅ All requested jobs passedRun: 26138975439
|
Selective E2E Results — ❌ Some jobs failedRun: 26139234396
|
Selective E2E Results — ✅ All requested jobs passedRun: 26140506032
|
Selective E2E Results — ✅ All requested jobs passedRun: 26140857033
|
|
The main branch already had channels-stop-start-e2e successful
You already fixed it on #3839. Nightly job failed is because it doesn't have your 3839 fixed |
Summary
Validation
Merge Gate
Summary by CodeRabbit
New Features
Bug Fixes
Tests