test(codascon): split compile-time proofs into constraints.test.ts#63
Merged
scorpevans merged 1 commit intomainfrom Mar 4, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.test.tsinto a newconstraints.test.ts, leaving only runtime behavioral tests inindex.test.tsconstraints.test.tsis 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 importsCLAUDE.mdMemory Organization table to include thetest-analysis.mdtopic fileThe split is principled: runtime tests fail when an assertion is wrong; compile-time tests fail when a
@ts-expect-errordirective 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 testpasses — 10 tests inconstraints.test.ts, 32 inindex.test.ts, 42 totaltscviatsconfig.json include: ["src"]—@ts-expect-errordirectives validated at build time🤖 Generated with Claude Code