Skip to content

Replace custom YAML handling with built-in import and export - #258

Open
rhennigan wants to merge 1 commit into
mainfrom
refactor/built-in-yaml
Open

rhennigan wants to merge 1 commit into
mainfrom
refactor/built-in-yaml

Conversation

@rhennigan

Copy link
Copy Markdown
Member

Summary

  • Replace the custom YAML parser and serializer with built-in YAML import/export support available in Wolfram Language 15.0+.
  • Preserve missing/empty-file behavior and source labels in parse failures; simplify parse errors because the built-in importer does not expose line diagnostics.
  • Use explicit UTF-8 byte-array conversion for string helpers to avoid ImportString/ExportString Unicode issues observed in 15.0.1.
  • Update YAML and generated skill formatting expectations and add tests for anchors, aliases, Unicode, and mixed containers.

Validation

  • 825 tests passed across YAML.wlt, InstallMCPServer.wlt, AgentSkills.wlt, and AgentSkillsBuild.wlt.
  • CodeInspector reported no issues in changed source and test files; git diff --check passed.
  • The additional DeployAgentToolsSkills.wlt run had four remaining failures involving Windows path separator expectations and an unavailable chmod executable.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation matches the stated migration and includes comprehensive coverage for compatibility, errors, Unicode, and built-in YAML features.

0 open findings

What changed in this PR

Replaces custom YAML parsing/serialization with Wolfram Language 15.0 built-ins while preserving error handling and Unicode behavior.

Changes:

  • Uses built-in YAML import/export with explicit UTF-8 conversion for strings.
  • Simplifies YAML parse errors and removes custom parser code.
  • Updates and expands YAML and generated-skill tests.
File Description
Kernel/​YAML.wl Implements built-in YAML handling.
Kernel/​Messages.wl Simplifies YAML parse errors.
Kernel/​AgentSkills.wl Updates parser documentation.
Tests/​YAML.wlt Updates expectations and adds feature coverage.
Tests/​InstallMCPServer.wlt Updates generated YAML expectations.
Tests/​DeployAgentToolsSkills.wlt Updates skill frontmatter expectations.
Tests/​AgentSkills.wlt Updates generated skill snapshots.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants