fix(qqbot): respect OPENCLAW_HOME for media paths#83567
Conversation
|
Codex review: needs real behavior proof before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. from source: current main derives QQ Bot media roots from PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Write new QQ Bot media under the Do we have a high-confidence way to reproduce the issue? Yes, from source: current main derives QQ Bot media roots from Is this the best way to solve the issue? Not yet: switching media roots fixes the central custom-home path, but the merge-ready solution should preserve or explicitly decide legacy HOME-root media reads and still needs real QQ Bot proof. Label justifications:
Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 67f8683ca30a. |
Fixes #83562.
Summary
OPENCLAW_HOMEwhen it is configured, matching OpenClaw core state path behavior.HOMEbehavior as the fallback whenOPENCLAW_HOMEis not set.$OPENCLAW_HOME/.openclaw/media/qqbotis accepted by the structured payload local-file guard.Scout audit
resolveStateDir/home resolution insrc/utils.ts, but this extension helper avoids importing core internals; local path helper reused by existing QQ Bot data/media functions.getQQBotDataPath,getQQBotMediaPath, and shared media-root guard keep the same returned shape under.openclaw; only base home resolution changes whenOPENCLAW_HOMEis explicitly configured.#83562/qqbot media OPENCLAW_HOME.Validation
pnpm test extensions/qqbot/src/engine/utils/platform.test.ts-> 9 passedgit diff --check-> passedpnpm check:changed-> passed