Skip to content

fix(sdk): accept CRLF skill frontmatter in Go and Rust - #46

Merged
samzong merged 1 commit into
lathe-cli:mainfrom
git-jxj:fix/sdk-crlf-frontmatter
Oct 9, 2026
Merged

samzong merged 1 commit into
lathe-cli:mainfrom
git-jxj:fix/sdk-crlf-frontmatter

Conversation

@git-jxj

@git-jxj git-jxj commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

A valid SKILL.md with Windows CRLF line endings installs through the TypeScript and Python SDKs, but Go and Rust reject it with invalid-frontmatter because their frontmatter delimiters only match LF.

Normalize CRLF in the temporary text used for frontmatter parsing in Go and Rust. Bundle contents stay unchanged for copying and hashing. Add shared golden cases for a successful CRLF install with an original-byte metadata hash and rejection of an invalid skill name with CRLF.

Scope Check

  • Stays within the v0.1 bundled-skill installer boundary.
  • Does not add marketplace, registry, private remote install, script execution, GUI, MCP server, or agent runtime behavior.
  • Updates golden cases for observable installer behavior changes.
  • Regenerates host constants after spec/hosts.json changes. (Not applicable; host data is unchanged.)

Verification

  • make check

The new install case fails against unchanged Go and Rust implementations (installed: [], errors: [{reason: "invalid-frontmatter"}]) and passes with the fix. The full gate covers all four SDKs, 91 shared golden cases, standalone Go modules, Rust include-dir and clippy, Python lint/tests, and all four consumer examples. cargo fmt --check --manifest-path rust/Cargo.toml, Go formatting, and git diff --check also pass.

Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
@git-jxj
git-jxj requested a review from samzong as a code owner October 9, 2026 02:46
@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Oct 9, 2026
@samzong

samzong commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@samzong samzong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/approve

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T03:05:22.587221Z cad6f34 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: cad6f34680

ℹ️ 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".

@samzong
samzong merged commit 50a6509 into lathe-cli:main Oct 9, 2026
11 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants