Skip to content

fix(api): keep literal dashes inside skill frontmatter - #43602

Merged
crazywoola merged 1 commit into
langgenius:mainfrom
leilei3167:fix/issue-43600-skill-frontmatter-dashes
Oct 30, 2026
Merged

crazywoola merged 1 commit into
langgenius:mainfrom
leilei3167:fix/issue-43600-skill-frontmatter-dashes

Conversation

@leilei3167

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Skill ZIP upload rejected or shortened a SKILL.md description when the text contained ---. _parse_frontmatter used content.split("---", 2), so a delimiter inside a YAML value closed the frontmatter early. A quoted before---after description failed as invalid YAML, and a plain one was stored as before.

The parser now treats only a standalone --- line as the opening and closing delimiter. Existing required-field checks are unchanged. An opening line such as ---junk is no longer read as frontmatter.

Fixes #43600

Screenshots

Before After
N/A (API validation) N/A (API validation)

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and vp staged (frontend) to appease the lint gods

SKILL.md frontmatter was split on the first "---", so a description
containing that text was truncated or rejected as invalid YAML.
Only a standalone delimiter line now closes the frontmatter.
@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 6, 2026
@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 70.18% 70.18% +0.00%
Strict coverage 69.83% 69.83% +0.00%
Typed symbols 56,027 56,030 +3
Untyped symbols 23,925 23,925 0
Modules 3709 3709 0

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-10-06 10:16:46.104466780 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-06 10:16:37.084398358 +0000
@@ -6203,7 +6203,7 @@
 ERROR Object of class `NoneType` has no attribute `workflow_prompt` [missing-attribute]
    --> tests/unit_tests/services/agent/test_composer_mention_validation.py:113:5
 ERROR Argument `object` is not assignable to parameter `pwd` with type `bytes | None` in function `zipfile.ZipFile.read` [bad-argument-type]
-   --> tests/unit_tests/services/agent/test_skill_package_service.py:306:44
+   --> tests/unit_tests/services/agent/test_skill_package_service.py:327:44
 ERROR Object of class `NoneType` has no attribute `node_job_config_dict` [missing-attribute]
    --> tests/unit_tests/services/agent/test_workflow_publish_service.py:569:49
 ERROR Object of class `NoneType` has no attribute `node_job_config_dict` [missing-attribute]

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.62%. Comparing base (a212b1b) to head (bfbf079).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #43602      +/-   ##
==========================================
- Coverage   88.62%   88.62%   -0.01%     
==========================================
  Files        5184     5184              
  Lines      326248   326253       +5     
  Branches    65396    65398       +2     
==========================================
+ Hits       289152   289155       +3     
- Misses      31872    31874       +2     
  Partials     5224     5224              
Flag Coverage Δ
api 88.42% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@crazywoola
crazywoola added this pull request to the merge queue Oct 30, 2026
Merged via the queue into langgenius:main with commit 2b369e5 Oct 30, 2026
43 checks passed
@laipz8200 laipz8200 mentioned this pull request Nov 3, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: medium ghfind author score; see https://ghfind.com size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent config skill upload rejects or truncates YAML descriptions containing literal ---

2 participants