Skip to content

test(codascon): split compile-time proofs into constraints.test.ts#63

Merged
scorpevans merged 1 commit intomainfrom
test/20260304-1842-codascon-test-split
Mar 4, 2026
Merged

test(codascon): split compile-time proofs into constraints.test.ts#63
scorpevans merged 1 commit intomainfrom
test/20260304-1842-codascon-test-split

Conversation

@scorpevans
Copy link
Owner

Summary

  • Extracts §11 (type-level utility assertions) and §14 (compile-time constraint proofs) from index.test.ts into a new constraints.test.ts, leaving only runtime behavioral tests in index.test.ts
  • constraints.test.ts is fully self-contained: it duplicates the minimal fixtures (Dog, Cat, Bird, FeedCommand, GroomCommand, AsyncFeedCommand, LogCommand, DogOnlyCommand) so it can be read and verified in isolation without cross-file imports
  • Updates CLAUDE.md Memory Organization table to include the test-analysis.md topic file

The split is principled: runtime tests fail when an assertion is wrong; compile-time tests fail when a @ts-expect-error directive becomes unused — meaning the framework accidentally starts allowing something it should reject. Separating them makes the failure mode immediately clear.

Test plan

  • pnpm --filter codascon test passes — 10 tests in constraints.test.ts, 32 in index.test.ts, 42 total
  • Both files compiled by tsc via tsconfig.json include: ["src"]@ts-expect-error directives validated at build time

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scorpevans
Copy link
Owner Author

Reviewed. Checked: correct fixture duplication (Dog/Cat/Bird/FeedCommand/GroomCommand/AsyncFeedCommand/LogCommand/DogOnlyCommand all faithfully reproduced in constraints.test.ts), imports in index.test.ts trimmed to only what runtime tests need (Command, Subject, Template), §14d runtime assertion preserved in constraints.test.ts, CLAUDE.md row added with accurate description, 42 tests pass. No issues found.

@scorpevans scorpevans merged commit 981a5e1 into main Mar 4, 2026
4 checks passed
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.

1 participant