fix: replace Bun.YAML with yaml package, fix Vite proxy, and improve CLAUDE.md formatting#1252
fix: replace Bun.YAML with yaml package, fix Vite proxy, and improve CLAUDE.md formatting#1252ghkim69 wants to merge 2 commits intocoleam00:devfrom
Conversation
Two independent bug fixes:
1. Replace Bun.YAML.parse/stringify with the yaml npm package
- Bun.YAML is not guaranteed across all Bun versions/environments
- The yaml package is already a project dependency and handles
the same superset of YAML features reliably
- Affects: packages/core/src/config/config-loader.ts
packages/workflows/src/loader.ts
2. Change Vite dev proxy target from localhost to 127.0.0.1
- Node.js 17+ resolves 'localhost' to ::1 (IPv6) by default
- Bun listens on 0.0.0.0 (IPv4 only), so proxy requests to
::1 fail with ECONNREFUSED in mixed Node/Bun dev setups
- Switching to 127.0.0.1 (explicit IPv4) resolves the issue
- Affects: packages/web/vite.config.ts
📝 WalkthroughWalkthroughReplaced Bun's YAML usage with the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Reformatted section headers from **bold** style to proper markdown headings (## → #, **Section** → ###, sub-sections → ####) for better rendering in editors, GitHub, and documentation tools. - Top-level title: ## → # - Core principle headers: **bold** → ### headings - Architecture subsections: **bold** → #### headings - Renamed '### Testing' to '### Verification Commands' for clarity Content is unchanged; no principles were added, removed, or modified.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
CLAUDE.md (1)
88-88: Optional: Remove adverb repetition.The word "silently" appears twice in close proximity. Consider revising for clarity.
♻️ Suggested revision
-- Prefer throwing early with a clear error for unsupported or unsafe states — never silently swallow errors -- Never silently broaden permissions or capabilities +- Prefer throwing early with a clear error for unsupported or unsafe states — never swallow errors silently +- Never broaden permissions or capabilities without explicit confirmation🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CLAUDE.md` at line 88, The sentence "Never silently broaden permissions or capabilities" repeats the adverb nearby; replace it with a version that removes the duplicated adverb, for example change the text to "Never broaden permissions or capabilities without explicit notice" or "Do not broaden permissions or capabilities silently" to eliminate the repeated "silently" while preserving intent; locate the phrase "Never silently broaden permissions or capabilities" and update it accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@CLAUDE.md`:
- Line 88: The sentence "Never silently broaden permissions or capabilities"
repeats the adverb nearby; replace it with a version that removes the duplicated
adverb, for example change the text to "Never broaden permissions or
capabilities without explicit notice" or "Do not broaden permissions or
capabilities silently" to eliminate the repeated "silently" while preserving
intent; locate the phrase "Never silently broaden permissions or capabilities"
and update it accordingly.
|
Related to #1107 — overlapping area or partial fix. |
Summary
Three changes found during local development.
Changes
1. Replace
Bun.YAMLwith theyamlnpm packageFiles:
packages/core/src/config/config-loader.ts,packages/workflows/src/loader.tsBun.YAMLis not reliably available across all Bun versions and environments. Theyamlpackage is already a project dependency and provides identical functionality with better cross-environment compatibility.2. Fix Vite dev proxy
localhost→127.0.0.1File:
packages/web/vite.config.tsNode.js 17+ resolves
localhostto::1(IPv6) by default, but Bun listens on0.0.0.0(IPv4 only). This causesECONNREFUSEDwhen Vite proxies API requests in a mixed Node.js/Bun dev setup.3. Convert CLAUDE.md bold headers to proper markdown headings
File:
CLAUDE.mdConverted section headers from
**bold**style to proper markdown headings (###,####) for better rendering in editors, GitHub, and documentation tools. Also renamed### Testing→### Verification Commandsfor clarity.Content is unchanged — no principles added, removed, or modified. Includes the new "No Autonomous Lifecycle Mutation Across Process Boundaries" principle from upstream.
Testing
yamlpackageECONNREFUSEDbun run validatepassesSummary by CodeRabbit