Skip to content

fix(sync): reuse deep URL branch cache - #453

Merged
christso merged 1 commit into
mainfrom
fix/skill-sync-update-hang
Aug 23, 2026
Merged

fix(sync): reuse deep URL branch cache#453
christso merged 1 commit into
mainfrom
fix/skill-sync-update-hang

Conversation

@christso

Copy link
Copy Markdown
Contributor

Summary

  • derive the fetch branch from /tree/<branch>/... and /blob/<branch>/... GitHub URLs when callers do not pass a branch override
  • use that effective branch for both the cache key and git clone
  • preserve explicit FetchOptions.branch precedence

Problem

fetchPlugin() parsed the branch embedded in a deep GitHub URL but ignored it unless every caller also copied that branch into FetchOptions. A standalone skill URL could therefore use the unqualified repository cache and perform a second full clone instead of reusing its existing @main cache. For the Hermes Agent repository this left allagents update silent long enough to appear stuck.

Verification

  • bun test tests/unit/core/plugin.test.ts — 17 passed
  • bun run typecheck
  • bun run lint — 92 files checked
  • bun run build

E2E

From /home/christso/.openclaw/agent-profiles/profiles/scout:

/home/christso/projects/EntityProcess/allagents-skill-sync-update-hang/dist/index.js update

Observed exit 0 in 1.32 seconds and one har-derived-api-client skill synced for Copilot.

Deep-URL cache-key smoke check with an isolated HOME containing only the existing branch-qualified cache:

HOME=/tmp/allagents-skill-sync-repro/home ALLAGENTS_CLONE_TIMEOUT_MS=1 bun -e "import { fetchPlugin } from './src/core/plugin.ts'; const result = await fetchPlugin('https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/web-development/har-derived-api-client', { offline: true }); console.log(JSON.stringify({ action: result.action, cachePath: result.cachePath }));"

Observed action: skipped with cache path ending in NousResearch-hermes-agent@main; no fallback clone was attempted.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5fb970c
Status: ✅  Deploy successful!
Preview URL: https://acdb3d80.allagents.pages.dev
Branch Preview URL: https://fix-skill-sync-update-hang.allagents.pages.dev

View logs

@christso
christso merged commit addd441 into main Aug 23, 2026
5 checks passed
@christso
christso deleted the fix/skill-sync-update-hang branch August 23, 2026 10:49
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