Skip to content

fix: ensure_skills_clone helper semantics + correct operator messaging#69

Merged
royosherove merged 2 commits into
mainfrom
fix/skills-helper-semantics
May 18, 2026
Merged

fix: ensure_skills_clone helper semantics + correct operator messaging#69
royosherove merged 2 commits into
mainfrom
fix/skills-helper-semantics

Conversation

@royosherove
Copy link
Copy Markdown
Member

Fixes from Codex Review of PR #68

5 critical production issues addressed:

1. Git fetch doesn't update working copy

  • Changed: git fetch origin + git checkoutgit reset --hard origin/$branch
  • Effect: Re-running pack now gets fresh skills instead of keeping stale

2. Helper destroys working skills on failure

  • Changed: Only move-aside if clone will succeed
  • Warn mode now preserves stale checkout rather than deleting and continuing
  • Includes backup restore logic on clone failure

3. Silent failures everywhere

  • All 5 packs now check ensure_skills_clone return code before logging
  • Uses ok on success, warn on optional failure
  • Operators can now distinguish success from failure

4. Pi messaging contradicts spec

  • Updated: "reference docs; manual extension creation needed" → "auto-discovered by pi"
  • Aligns with official Pi docs (auto-discovers SKILL.md folders)

5. IronClaw points to non-guaranteed path

  • Removed: Reference to ~/.openclaw/workspace/skills/ (other pack)
  • Added: Direct link to loki-skills repo

Verification

✅ Codex review: 0 issues
✅ Architect review: 0 issues
All PR #68 paths remain correct. Helper is now production-safe.

Fixes 5 critical issues found in Codex review of PR #68:

1. Git fetch doesn't update working copy: Changed 'git fetch + checkout' to 'git reset --hard origin/$branch' so re-running pack gets fresh skills

2. Helper destroys working skills on failure: Only move-aside existing if clone succeeds; in warn mode preserve stale checkout over nothing

3. Silent failures: All 5 packs now check return code before logging success; uses 'ok' on success, 'warn' on optional failure

4. Pi messaging contradicts spec: Updated to reflect that pi auto-discovers SKILL.md folders, not just reference docs

5. IronClaw points to non-guaranteed path: Changed from '~/.openclaw/workspace/skills/' to loki-skills repo link

Helper now preserves backups and prevents destructive updates in warn mode. All pack callers use truthful status messages.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9176790bc3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packs/common.sh
Comment on lines +50 to +53
else
log "Skills repo update failed; keeping existing checkout (warn mode)"
return 0
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return non-zero when repo update fails in warn mode

When git fetch/reset fails for an existing skills checkout, this branch returns success (0) in warn mode, so callers print a green “Skills installed” message even though no update occurred. In the current install scripts, that hides real update failures (for example, transient network/auth errors or a damaged local repo) and prevents the fallback clone path from running, leaving stale or broken skills while reporting success.

Useful? React with 👍 / 👎.

@royosherove royosherove merged commit 4ebbc5e into main May 18, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant