Repository navigation
Conversation
…lution SkillSnapshot.skills[] only stored name, primaryEnv, and requiredEnv but not skillKey. When skills.entries.<skillKey> was configured using a source-specific key instead of the skill name, applySkillEnvOverridesFromSnapshot looked up config by skill.name, missing the env overrides. Fix: persist skillKey in the snapshot and fall back to skill.name at lookup time for backward compatibility with older snapshots. Fixes openclaw#94146
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this branch targets the right skills snapshot bug, but the open sibling PR is the stronger canonical landing path because it includes persisted session snapshot alignment, old-snapshot refresh handling, focused regression tests, and stronger proof. Canonical path: Continue with #94163 or an equivalent canonical fix, then close the linked bug and redirect narrower duplicate branches. So I’m closing this here and keeping the remaining discussion on #94163. Review detailsBest possible solution: Continue with #94163 or an equivalent canonical fix, then close the linked bug and redirect narrower duplicate branches. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main builds snapshots without the resolved Is this the best way to solve the issue? No. This PR has the right new-snapshot direction, but it is not the best landing path because it omits persisted session snapshot alignment, old-snapshot refresh, regression tests, and sufficient real behavior proof that the sibling PR now provides. Security review: Security review cleared: The diff touches env-secret lookup but reuses existing config resolution and sanitizer paths, with no dependency, workflow, download, permission, or new secret-storage changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d1b917120a47. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Closing — stale, P2, and marked |
Summary
SkillSnapshot.skills[]only storedname,primaryEnv, andrequiredEnvbut notskillKeyskills.entries.<skillKey>was configured with a source-specific key (e.g.,weather) instead of the skill display name (e.g.,Pretty Weather),applySkillEnvOverridesFromSnapshot()looked up config byskill.name, missing the env overrides entirelyskillKeyin the snapshot and useskill.skillKey ?? skill.nameat lookup time for backward compatibilityFixes #94146
Changes
src/skills/types.ts— AddskillKey?: stringto theSkillSnapshot.skillsitem typesrc/skills/loading/workspace.ts— Preserveentry.metadata?.skillKeywhen building the snapshotsrc/skills/runtime/env-overrides.ts— Useskill.skillKey ?? skill.nameto resolve config, falling back to name for older snapshotsReal behavior proof
Proof type: Runtime behavior proof that reads the actual TypeScript source from OpenClaw's worktree and demonstrates the skillKey resolution change via tsx.
What the proof demonstrates:
skill.name→ misses env overrides when name differs from skillKeyskill.skillKey ?? skill.name→ uses skillKey when available, falls back to name for old snapshotsReal setup tested: Linux x64 (kernel 4.19.112), Node.js v24.13.1, OpenClaw commit 202b346.
Proof script (
/tmp/proof-94221-real.mjs):Terminal output:
Tests and validation
Risk checklist
Did user-visible behavior change? (Yes — but only for skills with a configured skillKey; previously broken env overrides now work)
Did config, environment, or migration behavior change? (No)
Did security, auth, secrets, network, or tool execution behavior change? (No)
What is the highest-risk area?
?? skill.namefallback ensures backward compatibilityHow is that risk mitigated?
?? skill.namefallback handles missing skillKey gracefullyCurrent review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?