test: pin that a composition root can omit provides - #11
Merged
Conversation
Closes #9 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a type-level regression test to ensure Module() continues to allow “composition root” modules (imports + re-exported ports) to omit provides entirely, matching the published behavior and the acceptance criteria from #9.
Changes:
- Added a
module.test-d.tscase that constructs a module withimports+exportsonly (noprovideskey). - Asserted the resulting module’s type channels (
Exports,Error,Needs) remain correctly inferred for that shape.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Investigating #9:
provides— likeimportsandexports— has been optional inModule()since the initial commit, and the published 0.1.0 ships that. The issue's exact composition-root shape (imports + port re-exports, noprovideskey) already typechecks; theprovides: []lines in start's examples are ceremony start can drop today, no di release needed (companion PR in btravstack/start).What was missing here is a test guaranteeing it stays that way: the existing facade test only covered whole-module re-export without
provides. This adds a type test for the deployment-module shape from the issue.Closes #9
🤖 Generated with Claude Code