Skip to content

test: export boundary tests for @stackbilt/ci, classify, and validate#174

Merged
stackbilt-admin merged 2 commits into
mainfrom
feat/export-boundary-tests
May 23, 2026
Merged

test: export boundary tests for @stackbilt/ci, classify, and validate#174
stackbilt-admin merged 2 commits into
mainfrom
feat/export-boundary-tests

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

  • @stackbilt/ci: first test file — all 5 exports verified callable, annotateDriftViolations / annotateValidationStatus / formatPRComment exercised with realistic inputs
  • @stackbilt/classify: adds formatChangeClassification boundary test (was exported but untested); existing heuristicClassify / determineRecommendation coverage unchanged
  • @stackbilt/validate: new exports.test.ts — boundary check for all 4 top-level exports plus behavioral tests for citation extraction, validation result shape, and message intent classification
  • @stackbilt/surface: existing surface.test.ts already imports all public exports; no changes needed

Closes #167.

Test plan

  • 520 tests pass (pnpm vitest run) — up from 490 (+30 new)
  • All new test files listed in vitest verbose output

🤖 Generated with Claude Code

…date

Fixes #167. Adds 30 new tests across three packages that had no or
partial export coverage:

- @stackbilt/ci: first test file — verifies all 5 exports are functions,
  exercises annotateDriftViolations (BLOCKER/LOW/empty), annotateValidationStatus
  (FAIL/WARN/PASS), and formatPRComment (status, violations, suggestions, score)
- @stackbilt/classify: adds formatChangeClassification boundary test (export
  existence + markdown output shape); keeps existing heuristicClassify /
  determineRecommendation coverage
- @stackbilt/validate: new exports.test.ts — boundary check for all 4 top-level
  exports (validateCitations, extractCitations, enrichCitations, classifyMessage)
  plus behavioral tests for citation extraction, validation result shape, and
  message intent classification

@stackbilt/surface already has comprehensive route/schema coverage in
surface.test.ts; no changes needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stackbilt-admin
Copy link
Copy Markdown
Member Author

Review finding (blocking):

The new @stackbilt/ci test fixtures do not match DriftViolation, which breaks TS build in CI.

Current failures from the PR run:

  • TS2353: Object literal may only specify known properties, and 'category' does not exist in type 'DriftViolation'
  • TS2322: Type '"LOW"' is not assignable to type '"BLOCKER" | "CRITICAL" | "MAJOR" | "MINOR"'

Affected lines in this PR:

  • packages/ci/src/__tests__/ci.test.ts:48
  • packages/ci/src/__tests__/ci.test.ts:61
  • packages/ci/src/__tests__/ci.test.ts:109

Please update fixtures to the actual DriftViolation shape/severity enum so build-and-test and Governance pass.

antiPattern replaces category (not in type); LOW replaced with MINOR
(valid severities: BLOCKER | CRITICAL | MAJOR | MINOR).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stackbilt-admin
Copy link
Copy Markdown
Member Author

Fixed in 7639b63. Replaced category with antiPattern and 'LOW' with 'MINOR' across all three affected fixture objects to match the actual DriftViolation type shape.

@stackbilt-admin stackbilt-admin merged commit 090a012 into main May 23, 2026
5 checks passed
@stackbilt-admin stackbilt-admin deleted the feat/export-boundary-tests branch May 23, 2026 10:00
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.

test: add export-boundary unit tests for @stackbilt/ci, classify, validate, and surface

1 participant