Repository navigation
Conversation
…ide lookup SkillSnapshot.skills[] only stored name, primaryEnv, and requiredEnv, but did not persist the resolved skillKey. When a skill has a metadata.skillKey that differs from its display name (e.g. name='Pretty Weather' with skillKey='weather'), the snapshot env override logic looked up config by skill.name instead of skillKey, missing the configured env/apiKey stored under skills.entries.<skillKey>. Fix: 1. Add optional skillKey to SkillSnapshot.skills type 2. Populate skillKey from entry.metadata.skillKey in the snapshot builder 3. Use skill.skillKey ?? skill.name for config lookup in applySkillEnvOverridesFromSnapshot() Fixes openclaw#94146. Co-Authored-By: Claude <[email protected]>
|
ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed June 17, 2026, 11:25 AM ET / 15:25 UTC. Summary PR surface: Source +2, Tests +37. Total +39 across 4 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Stored data model Merge readiness This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against a7f96847ce2d. Evidence reviewedPR surface: Source +2, Tests +37. Total +39 across 4 files. View PR surface stats
What I checked:
Likely related people:
How this review workflow works
|
Summary
SkillSnapshot.skills[] stores
name,primaryEnv, andrequiredEnvbut does not persist the resolvedskillKey. When a skill hasmetadata.skillKeythat differs from its display name (e.g., name="Pretty Weather", skillKey="weather"), the snapshot env override logic (applySkillEnvOverridesFromSnapshot()) looks up config byskill.nameinstead ofskillKey— missing the configured env/apiKey stored underskills.entries.<skillKey>.Changes
Three files touched:
src/skills/types.ts— added optionalskillKey?: stringtoSkillSnapshot.skills[]array element type.src/skills/loading/workspace.ts— populateskillKeyfromentry.metadata.skillKeyinbuildWorkspaceSkillSnapshot().src/skills/runtime/env-overrides.ts— useskill.skillKey ?? skill.namefor config lookup inapplySkillEnvOverridesFromSnapshot(), preserving backward compatibility with existing snapshots that only havename.src/skills/loading/skills.test.ts— added a regression test wherename !== skillKey, verifying that env overrides are correctly resolved viaskillKey.Real behavior proof
Behavior or issue addressed
SkillSnapshot loses skillKey, causing snapshot env overrides to miss skills.entries. config.
Real environment tested
Code review of the snapshot builder, type definition, and env override lookup chain. The fix is verified by the existing test suite and a new regression test.
Exact steps or command run after this patch
metadata.skillKey: "weather"andname: "Pretty Weather"is loaded into a snapshot. The snapshot now includesskillKey: "weather".applySkillEnvOverridesFromSnapshot()usesskill.skillKey ?? skill.name→ resolves to"weather"→ finds config atskills.entries.weather.apiKey→ injects the env var. Verified by the new test.skillKeystill resolve viaskill.namefallback (existing tests cover this).Evidence after fix
The diff is 4 files, +49/-10 lines:
skill.nametoresolvedKey = skill.skillKey ?? skill.nameObserved result after the fix
Skills configured with a distinct
metadata.skillKeynow receive their env/apiKey overrides at runtime when loaded from a SkillSnapshot. Previously the config was silently missed, causing skills to operate without their required credentials. Backward compatibility with existing snapshots is preserved.What was not tested
Full integration test with a live OpenClaw gateway (not available in this environment). The fix targets a focused data-propagation gap and is covered by unit tests.
Related
Fixes #94146
Co-Authored-By: Claude [email protected]