Skip to content

fix: publish skills that live at the repository root - #4950

Open
troioi-vn wants to merge 2 commits into
openclaw:mainfrom
troioi-vn:fix/skill-publish-root-checkout
Open

troioi-vn wants to merge 2 commits into
openclaw:mainfrom
troioi-vn:fix/skill-publish-root-checkout

Conversation

@troioi-vn

@troioi-vn troioi-vn commented Nov 24, 2026 •

Copy link
Copy Markdown

Closes #4949
Related: #3397

What Problem This Solves

A skill that lives at the root of its repository can't be published with the reusable skill-publish.yml workflow (skill_path: "."). The workflow checks ClawHub's own source out to clawhub-source/ inside the caller's workspace, so that checkout ends up inside the skill. skill publish then collects it as skill files and fails on clawhub-source/fixtures/public-corpus/corpus.jsonl (over 10MB). Today the only way around it is an ignore rule for clawhub-source/ in the skill's .clawhubignore or .gitignore.

User Impact

Skills at the repository root publish through the reusable workflow without an ignore rule. Catalog repos with skills under skills/ behave as before.

Why This Change Was Made

actions/checkout only writes inside $GITHUB_WORKSPACE, so the workflow now moves the checkout to $RUNNER_TEMP/clawhub-source right after checking it out, installs the CLI dependencies there, and runs the CLI from that path. The caller's repository is still the publish workdir, so skill paths and source provenance don't change. This keeps the CLI out of the caller's publish tree without reserving a directory name in every skill.

package-publish.yml uses the same nested checkout, and a local root source (source: ".") probably has the same problem. I left it out to keep this PR to one workflow.

Evidence

Real GitHub Actions run (not a stub): one caller repo with only SKILL.md at its root and no ignore files, one workflow_dispatch, two jobs that differ only in the workflow ref. Both use skill_path: "." and dry_run: true. The caller repo is private, so here are the relevant lines from each job's log ("Run skill publishes" step output).

Caller workflow:

jobs:
  upstream-main:
    uses: openclaw/clawhub/.github/workflows/skill-publish.yml@main
    with:
      skill_path: "."
      dry_run: true
  fixed-branch:
    uses: troioi-vn/clawhub/.github/workflows/skill-publish.yml@259a4a4e184ecaddebf01822e3ce964c7174cbc2
    with:
      skill_path: "."
      dry_run: true

Before, @main (job failed, exit code 1):

  "summary": { "wouldPublish": 0, "published": 0, "pendingPublication": 0, "submitted": 0, "alreadySynced": 0, "skipped": 0, "failed": 1 },
  "failed": [
    {
      "slug": "clawhub-4949-repro",
      "folder": ".",
      "message": "Error: File \"clawhub-source/fixtures/public-corpus/corpus.jsonl\" exceeds 10MB limit"
    }
  ]

After, this branch at 259a4a4 (job succeeded):

  "ok": true,
  "summary": { "wouldPublish": 1, "published": 0, "pendingPublication": 0, "submitted": 0, "alreadySynced": 0, "skipped": 0, "failed": 0 },
  "wouldPublish": [
    {
      "ok": true,
      "status": "would-publish",
      "slug": "clawhub-4949-repro",
      "folder": "/home/runner/work/clawhub-4949-repro/clawhub-4949-repro",
      "version": "1.0.0",
      "fileCount": 1
    }
  ]

fileCount: 1 is the root SKILL.md alone; the CLI collected no tooling files. The later commit 35e69f3 changes only a test, so the workflow is the same as in that run.

Tests:

  • scripts/security/skill-publish-workflow.test.ts now keeps the workspace and RUNNER_TEMP apart, as on a runner, and runs the real move step before the publish step. A new case runs both steps for a root skill (with a stub bun, so no real CLI) and checks that no clawhub-source/ is in the workspace when the CLI runs, the CLI path is outside it, and --workdir is still the caller's workspace.
  • src/__tests__/skill-publish-workflow.test.ts checks the move happens before the dependency install and the install runs in RUNNER_TEMP.
  • bun run ci:static and bun run ci:unit pass locally.

Written with Claude Code (Opus 5.5) and reviewed with Codex.

@troioi-vn
troioi-vn requested a review from a team as a code owner November 24, 2026 09:01
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@troioi-vn is attempting to deploy a commit to the OpenClaw Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Moves the workflow’s ClawHub checkout into runner temporary storage before installing dependencies and publishing skills.

Example: Publish clawhub-4949-repro with skill_path '.' and dry_run true.

  • Before: Collection fails because clawhub-source/fixtures/public-corpus/corpus.jsonl exceeds 10MB.
  • After: The supplied Actions output reports wouldPublish: 1, failed: 0, and fileCount: 1.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified repair with relevant shipped-workflow logs and regression coverage; reported full validation was not independently executed in this read-only review.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The updated body supplies Actions log excerpts exercising the reusable workflow and real CLI with skill_path '.', dry_run true, one root SKILL.md, and no ignore files: main fails on tooling content while candidate 259a4a4 reports fileCount 1 and zero failures; the reviewed head changes only test assertions afterward.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A skill stored at its repository root fails workflow publishing because ClawHub’s tooling is collected as skill content.
Reason: The small workflow repair restores single-folder publishing without changing inputs, public APIs, or user-authored content.

Merge readiness

✅ Ready for maintainer review

Current main still collects workflow tooling into repository-root skills; this PR provides a focused fix with no blocking findings.

Priority: P2
Reviewed head: 35e69f31daf7c043d45722eb41bbe3609c44878f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The reusable GitHub Actions workflow checks out the caller’s skills and ClawHub tooling, invokes the CLI for selected skill folders, and returns publish receipts.

flowchart TD
  A[Caller repository] --> B[Reusable workflow]
  B --> C[Tooling in runner temporary storage]
  C --> D[ClawHub CLI]
  A --> D
  D --> E[Skill file collection]
  E --> F[Preview or publication receipt]
Loading

Technical review

Best possible solution:

Keep workflow tooling outside the caller’s publish tree while retaining the existing CLI, skill selection, and provenance handling.

Do we have a high-confidence way to reproduce the issue?

The current-main checkout location and recursive file collector establish the failure path, corroborated by the linked affected-release report and supplied Actions logs.

Is this the best way to solve the issue?

Best-fix verdict: best; moving workflow-owned tooling fixes the source of contamination, whereas a collector exclusion would reserve a caller directory name and an ignore-file workaround would burden every affected repository.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6b91b6328c8e.

Provenance checked

  • Tooling checkout placement and CLI lookup changes intended behavior with a stated reason (6fc5bb7: The original reusable workflow checked out its matching CLI source beneath the workspace; the later per-skill rewrite retained this placement.)
  • Workflow receipt-test harness keeps the original intent (183d843: The harness executes the workflow receipt parser with fixture CLI responses, distinguishing accepted uploads from completed publication.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit 6fc5bb7 adds .github/workflows/skill-publish.yml:134 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6fc5bb7cd80f; files: .github/workflows/skill-publish.yml)
  • Vincent Koc: Raw commit b2f0602 adds src/__tests__/skill-publish-workflow.test.ts:27 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b2f06028cff8; files: src/__tests__/skill-publish-workflow.test.ts)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production change +8/-2 lines One checkout move and its two dependent path updates address the collection failure.
Test change +99/-38 lines Most growth separates runner temporary storage from the workspace in the existing receipt harness and verifies the root-skill boundary.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #4949
Summary: This PR explicitly proposes the fix for the repository-root tooling-contamination report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The official publishing workflow fails for repository-root skills without a tooling-specific ignore rule, while catalog publishing remains usable.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-24T09:15:52.550Z sha 259a4a4 :: needs real behavior proof before merge. :: none

Reviewed November 24, 2026, 5:33 AM ET / 10:33 UTC (Revision 2).

@troioi-vn

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 24, 2026

This branch has not been deployed

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

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skill-publish.yml publishes its own clawhub-source checkout when skill_path is the repo root

1 participant