Skip to content

fix: normalize quoted user-invocable frontmatter#87

Open
Gujiassh wants to merge 2 commits intopbakaus:mainfrom
Gujiassh:fix/quoted-user-invokable-clean
Open

fix: normalize quoted user-invocable frontmatter#87
Gujiassh wants to merge 2 commits intopbakaus:mainfrom
Gujiassh:fix/quoted-user-invokable-clean

Conversation

@Gujiassh
Copy link
Copy Markdown
Contributor

@Gujiassh Gujiassh commented Apr 5, 2026

Summary

  • normalize quoted boolean frontmatter values only for the user-invocable flag (while keeping the legacy user-invokable spelling readable too)
  • stop coercing unrelated quoted values like description: 'true' into booleans
  • add focused regression coverage for quoted flags in both raw frontmatter parsing and readSourceFiles

Testing

  • bun test tests/lib/utils.test.js
  • PATH=/home/cc/tmp/bunshim:$PATH bun run build

@Gujiassh Gujiassh requested a review from pbakaus as a code owner April 5, 2026 08:25
Only normalize quoted booleans for the user-invocable frontmatter flag so other quoted fields like argument-hint and description continue to round-trip as plain strings.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 5, 2026

Follow-up fix pushed in 56ba63b. The failing CI turned out to be broader than the original quoted user-invocable case: quoted non-boolean values like argument-hint: "[target]" were being preserved with quotes instead of round-tripping as plain strings. The parser now strips quotes for general quoted values, while only coercing quoted booleans for user-invocable / legacy user-invokable. Revalidated with bun test and PATH=/home/cc/tmp/bunshim:$PATH bun run build.

@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 6, 2026

Quick validation from my side on the current branch tip:

  • bun test tests/lib/utils.test.js60 pass / 0 fail

So the quoted-frontmatter normalization behavior covered by this PR is locally green on the current head.

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