test(dist-bundle): assert inlined prompt content survives bundling

After the prompts-core migration the TypeScript prompt sources were
deleted; the only mechanism delivering markdown prompts to npm users
is bun build inlining via bunfig.toml [loader] ".md" = "text"
and import attributes. bun test runs from src/index.ts, not from
dist/index.js, so a future Bun upgrade that silently regresses
markdown inlining would pass source tests green while the published
bundle is broken with Cannot find module ../prompts/atlas/default.md
at first agent load.

Add a smoke test that scans the built dist/index.js for unique
signature strings from each migrated prompt file (15 signatures:
3 ultrawork + 5 atlas + 3 prometheus + 4 mode prompts). Skips
gracefully if dist/index.js does not exist (local bun test before
build). Wire into the existing CI Verify dist bundle tests step in
.github/workflows/ci.yml so the regression catches in CI build.

Closes pre-publish blocker V1 and V33.
This commit is contained in:
YeonGyu-Kim
2026-05-25 01:33:06 +09:00
parent 14b3523af6
commit 3e0a975d1f
2 changed files with 104 additions and 1 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ jobs:
test -f dist/index.d.ts || (echo "ERROR: dist/index.d.ts not found!" && exit 1)
- name: Verify dist bundle tests
run: bun test src/shared/dist-bundle-bun-globals.test.ts
run: bun test src/shared/dist-bundle-bun-globals.test.ts src/shared/dist-bundle-prompt-content.test.ts
- name: Auto-commit schema changes
if: github.event_name == 'push' && github.ref == 'refs/heads/master'