Problem
The CLAUDE.md OSS policy requires: "every public export must have test coverage."
An audit of export boundaries found four packages with untested public exports:
| Package |
Untested export(s) |
Risk |
@stackbilt/ci |
setOutput, setSummary, annotateDriftViolations, annotateValidationStatus, formatPRComment — all 5 exports have zero unit tests |
High: these are the GitHub Actions integration helpers; regressions are invisible until CI breaks in a consumer |
@stackbilt/classify |
formatChangeClassification() |
Medium: markdown formatter; output format is a contract for CLI display and MCP consumers |
@stackbilt/validate |
classifyMessage() boundary behavior |
Medium: governs how commit messages are classified; edge-case failures are silent |
@stackbilt/surface |
formatSurfaceMarkdown() |
Low: display formatter, but exported as public API |
Changes
Add dedicated unit test files for each gap:
packages/ci/src/__tests__/ci.test.ts — test all 5 CI helper functions with mock @actions/core outputs. Cover: output format, annotation format for drift violations, PR comment markdown structure.
packages/classify/src/__tests__/format.test.ts — test formatChangeClassification() output shape for each change type variant.
packages/validate/src/__tests__/classify.test.ts — test classifyMessage() with conventional commit examples, edge cases (empty body, missing scope, multi-line).
packages/surface/src/__tests__/format.test.ts — test formatSurfaceMarkdown() with zero routes, single route, multi-framework route table.
Acceptance
pnpm test passes with new files included
pnpm test --coverage shows 100% line coverage on the newly-tested exports
- No existing tests removed or modified
Notes
These tests are split-stable — @stackbilt/ci, @stackbilt/classify, @stackbilt/validate, and @stackbilt/surface are all governance-only packages that carry forward unchanged in any @stackbilt/build commercial split. Safe to write now.
Problem
The CLAUDE.md OSS policy requires: "every public export must have test coverage."
An audit of export boundaries found four packages with untested public exports:
@stackbilt/cisetOutput,setSummary,annotateDriftViolations,annotateValidationStatus,formatPRComment— all 5 exports have zero unit tests@stackbilt/classifyformatChangeClassification()@stackbilt/validateclassifyMessage()boundary behavior@stackbilt/surfaceformatSurfaceMarkdown()Changes
Add dedicated unit test files for each gap:
packages/ci/src/__tests__/ci.test.ts— test all 5 CI helper functions with mock@actions/coreoutputs. Cover: output format, annotation format for drift violations, PR comment markdown structure.packages/classify/src/__tests__/format.test.ts— testformatChangeClassification()output shape for each change type variant.packages/validate/src/__tests__/classify.test.ts— testclassifyMessage()with conventional commit examples, edge cases (empty body, missing scope, multi-line).packages/surface/src/__tests__/format.test.ts— testformatSurfaceMarkdown()with zero routes, single route, multi-framework route table.Acceptance
pnpm testpasses with new files includedpnpm test --coverageshows 100% line coverage on the newly-tested exportsNotes
These tests are split-stable —
@stackbilt/ci,@stackbilt/classify,@stackbilt/validate, and@stackbilt/surfaceare all governance-only packages that carry forward unchanged in any@stackbilt/buildcommercial split. Safe to write now.