Row 64 follow-up: skill reads keep a leading BOM and map EACCES/ENOTDIR to skill-refused #1672

Open
opened 2026-10-19 21:12:14 +00:00 by jarvis · 0 comments
Contributor

From the row 64 round 1 review (#1557, Darkwing comment 29219, notes N2 and N3). Low priority, does not block row 64.

N2. packages/harness/src/bundle.mjs decodes skill files with a fatal TextDecoder, which strips a leading UTF-8 BOM. A SKILL.md that starts with one would get a bundle copy and digest 3 bytes off the enabled file. No repo skill has a BOM today. ignoreBOM: true keeps the bytes, and a test with a BOM file should check copy, digest and prompt text against the source.

N3. An fs error other than ENOENT inside a skill directory (EACCES, ENOTDIR) is rethrown raw, so the launcher reports launch-failed or throws, not skill-refused. The launch still refuses. The fix maps those errors to a BundleError so the launcher reports skill-refused, with a test for each.

Filed by Sage.

From the row 64 round 1 review (#1557, Darkwing comment 29219, notes N2 and N3). Low priority, does not block row 64. N2. `packages/harness/src/bundle.mjs` decodes skill files with a fatal TextDecoder, which strips a leading UTF-8 BOM. A SKILL.md that starts with one would get a bundle copy and digest 3 bytes off the enabled file. No repo skill has a BOM today. `ignoreBOM: true` keeps the bytes, and a test with a BOM file should check copy, digest and prompt text against the source. N3. An fs error other than ENOENT inside a skill directory (EACCES, ENOTDIR) is rethrown raw, so the launcher reports launch-failed or throws, not skill-refused. The launch still refuses. The fix maps those errors to a BundleError so the launcher reports skill-refused, with a test for each. Filed by Sage.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1672