Skip to content

fix: Quoted skill metadata is recognized consistently - #1613

Merged
hatayama merged 1 commit into
v3-betafrom
fix/hatayama/normalize-skill-frontmatter-scalars
Jul 8, 2026
Merged

hatayama merged 1 commit into
v3-betafrom
fix/hatayama/normalize-skill-frontmatter-scalars

Conversation

@hatayama

@hatayama hatayama commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Quoted skill frontmatter values are now interpreted consistently by Unity skill setup.
  • Single- and double-quoted metadata now matches the native CLI parser.

User Impact

  • toolName: "compile" now matches the compile tool instead of retaining quote characters.
  • internal: "true" and internal: 'true' now correctly exclude internal skills from installation.
  • Tool name casing remains unchanged, while the existing case-insensitive internal flag behavior is preserved.

Changes

  • Added one scalar normalization path for name, toolName, description, and internal frontmatter fields.
  • Added focused EditMode coverage for whitespace, single quotes, double quotes, casing preservation, and quoted boolean values.
  • Kept the normalization semantics aligned with skillscan.ParseSkillFrontmatter on the Go side.

Verification

  • Red: SkillSourceFrontmatterReaderTests failed 5 of 7 cases before the implementation.
  • dist/darwin-arm64/uloop compile --project-path <PROJECT_ROOT> (0 errors, 0 warnings)
  • SkillSourceFrontmatterReaderTests (7 passed)
  • SkillInstallLayoutTests (10 passed)
  • ToolSkillSynchronizerTests (52 passed)
  • git diff --check

Review in cubic

Use one whitespace and quote normalization path for name, toolName,
description, and internal values so Unity matches the Go parser for
single- and double-quoted frontmatter scalars.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 59d82bd5-8db7-4187-a530-32faf026dd73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a private NormalizeFrontmatterScalar helper to SkillSourceFrontmatterReader that trims whitespace and strips surrounding quotes, applies it consistently to toolName, name, description, and the internal: flag parsing, and adds a new unit test fixture validating this normalization behavior.

Changes

Frontmatter normalization

Layer / File(s) Summary
Normalization helper and field parsing
Packages/src/Editor/Infrastructure/SkillSetup/SkillSourceFrontmatterReader.cs
Adds NormalizeFrontmatterScalar helper to trim whitespace and strip surrounding quotes, and updates toolName, name, and description parsing to use it instead of ad-hoc trimming.
IsInternalSkill normalization and tests
Packages/src/Editor/Infrastructure/SkillSetup/SkillSourceFrontmatterReader.cs, Assets/Tests/Editor/SkillSourceFrontmatterReaderTests.cs
Normalizes the internal: scalar before case-insensitive comparison to "true", and adds unit tests covering quoted scalar trimming, tool-name casing preservation, and IsInternalSkill correctness.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: consistent handling of quoted skill metadata.
Description check ✅ Passed The description is directly related to the PR and accurately explains the parsing and test changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hatayama/normalize-skill-frontmatter-scalars

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@Packages/src/Editor/Infrastructure/SkillSetup/SkillSourceFrontmatterReader.cs`:
- Around line 14-16: The NormalizeFrontmatterScalar helper is removing any
leading or trailing quote characters instead of only a matching wrapping pair,
which can mutate legitimate values. Update NormalizeFrontmatterScalar in
SkillSourceFrontmatterReader to first trim whitespace, then only unwrap the
value when it starts and ends with the same quote character (single or double)
before returning it. Keep the fix localized to this helper since its output is
used for name, toolName, description, and internal.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 315a3ffe-b7e7-4701-b2ac-78ab198df46e

📥 Commits

Reviewing files that changed from the base of the PR and between 58ccd48 and 1fde241.

⛔ Files ignored due to path filters (1)
  • Assets/Tests/Editor/SkillSourceFrontmatterReaderTests.cs.meta is excluded by none and included by none
📒 Files selected for processing (2)
  • Assets/Tests/Editor/SkillSourceFrontmatterReaderTests.cs
  • Packages/src/Editor/Infrastructure/SkillSetup/SkillSourceFrontmatterReader.cs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Re-trigger cubic

@hatayama

hatayama commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hatayama
hatayama merged commit 49f0302 into v3-beta Jul 8, 2026
10 checks passed
@hatayama
hatayama deleted the fix/hatayama/normalize-skill-frontmatter-scalars branch July 8, 2026 11:50
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
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