Skip to content

fix(frontmatter,prompts): close two regressions from the Bun built-in swap#68

Merged
arzafran merged 1 commit into
mainfrom
fix/codex-yaml-prompt-regressions
Jun 22, 2026
Merged

fix(frontmatter,prompts): close two regressions from the Bun built-in swap#68
arzafran merged 1 commit into
mainfrom
fix/codex-yaml-prompt-regressions

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

A Codex cross-model review of the dependency swap (#65) caught two real behaviour regressions that our own tests missed — both reproduced, both fixed here. Neither is critical, but each quietly weakens something the old libraries handled for free.

Summary

  • Duplicate frontmatter keys are caught again. Bun.YAML.parse silently keeps the last value on a duplicate mapping key (name: foo then name: bar{ name: "bar" }), where the old yaml package threw "Map keys must be unique". That means lint:skills / lint:knowledge stopped flagging duplicate keys in skill/agent frontmatter. parseFrontmatterStrict now detects duplicate top-level keys itself and reports them. The scan is column-0 only — nested mappings, list items, and block-scalar continuations are always indented, so they never false-trip (there's a test for exactly that).
  • promptYn no longer hangs on Ctrl+C. With @inquirer/confirm, SIGINT threw and the caller fell back to the default. With raw node:readline, Ctrl+C while the question is pending did nothing — rl.close() does not unblock a pending question(); only an AbortSignal rejects it (verified directly in Bun). A SIGINT → AbortController now restores the fall-back-to-default behaviour so interactive installer/merge prompts can't wedge.

Test Plan

  • bun test618 pass, 0 fail (+2 frontmatter tests: duplicate-key flagged, indented repeats not false-flagged)
  • bun run lint:skills / lint:knowledge clean on the real corpus (no false positives from the new detector)
  • bun run typecheck clean · bun run lint exit 0
  • SIGINT fix mechanism verified directly: rl.question(prompt, { signal }) rejects with AbortError on abort; rl.close() alone leaves it hung. (The TTY+signal path isn't unit-testable deterministically, so it's verified by the mechanism probe, not a unit test.)

… swap

An independent Codex cross-model review of the yaml→Bun.YAML and
@inquirer/confirm→node:readline migration (#65) surfaced two real Medium
regressions, both reproduced and confirmed:

- Bun.YAML silently keeps the last value on duplicate mapping keys, where the
  `yaml` package threw "Map keys must be unique". parseFrontmatterStrict now
  detects duplicate top-level keys itself, so lint:skills / lint:knowledge keep
  catching them. The scan is column-0 only — nested mappings, list items, and
  block-scalar continuations are always indented, so they never false-trip
  (covered by a test).
- promptYn (readline) hung on Ctrl+C: readline's close() does not unblock a
  pending question() — only an AbortSignal rejects it. Wired a
  SIGINT→AbortController so Ctrl+C falls back to the default, restoring the
  behavior @inquirer/confirm gave for free.

Full suite 618 pass / 0 fail; lint:skills/lint:knowledge clean on the real corpus.
@arzafran arzafran merged commit 839778d into main Jun 22, 2026
15 checks passed
@arzafran arzafran deleted the fix/codex-yaml-prompt-regressions branch June 22, 2026 12:07
arzafran added a commit that referenced this pull request Jun 22, 2026
Patch release covering the unreleased fixes since 11.28.0:
- #68: Bun built-in swap follow-ups (Bun.YAML duplicate-key detection in
  parseFrontmatterStrict; promptYn Ctrl+C via SIGINT→AbortController)
- install-summary count fix: skills/ counts SKILL.md subdirs (35 not 1),
  docs/ counts recursively (22), with regression tests

Bumps VERSION, plugin.json, and prepends the 11.28.1 CHANGELOG section.
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