Skip to content

fix(skills): preserve skillKey in SkillSnapshot for env override resolution - #94152

Closed
lsr911 wants to merge 1 commit into
openclaw:mainfrom
lsr911:fix/issue-94146-Bug-SkillSnapshot-loses-ski
Closed

lsr911 wants to merge 1 commit into
openclaw:mainfrom
lsr911:fix/issue-94146-Bug-SkillSnapshot-loses-ski

Conversation

@lsr911

@lsr911 lsr911 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #94146

SkillSnapshot.skills[] only stored name/primaryEnv/requiredEnv, omitting skillKey. This caused applySkillEnvOverridesFromSnapshot() to look up config by skill.name instead of the resolved skillKey, so skills configured under skills.entries.<skillKey> received no env/API key injections at runtime.

Root Cause

A skill can define metadata.openclaw.skillKey (e.g. weather) while its name is different (e.g. Pretty Weather). The snapshot only captured the display name, so runtime config lookup used the wrong key.

Changes (3 files, 5 insertions)

  • src/skills/types.ts — add optional skillKey to skill entry type
  • src/skills/loading/workspace.ts — preserve skillKey when building snapshots
  • src/skills/runtime/env-overrides.ts — use skill.skillKey ?? skill.name fallback

🤖 Generated with Claude Code

…lution

SkillSnapshot.skills[] only stored name/primaryEnv/requiredEnv,
omitting skillKey. This caused applySkillEnvOverridesFromSnapshot()
to look up config by skill.name instead of the resolved skillKey,
so skills configured under skills.entries.<skillKey> received no
env/API key injections at runtime.

- Add optional skillKey to SkillSnapshot skill entry type
- Preserve skillKey when building snapshots from workspace loading
- Use skill.skillKey ?? skill.name in snapshot env override path

Fixes openclaw#94146

Co-Authored-By: Claude <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 17, 2026
@clawsweeper

clawsweeper Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed June 17, 2026, 9:37 AM ET / 13:37 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +2. Total +2 across 3 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: vector/embedding metadata: src/skills/loading/workspace.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Not assessed.
Failure reason: invalid structured output.

This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict.
Keep any merge decision on the normal maintainer review path until ClawSweeper can complete a fresh review.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best 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 1914cc35bdc8.

Evidence reviewed

PR surface:

Source +2. Total +2 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 5 3 +2
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 5 3 +2

What I checked:

  • failure reason: invalid structured output.
  • codex failure detail: Codex review failed for this PR with exit 0 and wrote invalid JSON or schema-invalid output to /home/runner/work/clawsweeper/clawsweeper/artifacts/event/codex/94152.json: decision.rootCauseCluster.currentItemRelationship fixed_by_candidate requires a canonical PR.
  • codex stderr: No stderr captured.
  • codex stdout: ttempted the same skillKey snapshot env lookup fix and included regression-test context.","commits":["1010671f3842088d8fa8fd2a11314dc3a0526569"],"files":["src/agents/skills/env-overrides.ts","src/agents/skills/workspace.ts","src/agents/skills/types.ts","src/agents/skills.test.ts"],"confidence":"medium"}],"risks":["No after-fix real behavior proof shows a real or redacted setup where a skill with name !== skillKey receives its configured env/API key from a snapshot.","The patch does not add regression coverage for the snapshot path, so reviewer confidence depends on source inspection rather than an executable guard."],"bestSolution":"Land the narrow snapshot skillKey fix after the contributor adds real behavior proof and focused regression coverage for name !== skillKey env/API key injection.","triagePriority":"P2","impactLabels":[],"mergeRiskLabels":[],"mergeRiskOptions":[],"revi.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@lsr911

lsr911 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

C:/Program Files/Git/review

@lsr911

lsr911 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Closing: no maintainer engagement after review re-trigger. Automated PR with infrastructure-only bot feedback. Will reopen if a maintainer expresses interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SkillSnapshot loses skillKey, causing snapshot env overrides to miss skills.entries.<skillKey>

1 participant