feat(cli): skip public-API generation for hand-written contracts#1391
Merged
Conversation
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Mateus Zitelli (MateusZitelli)
approved these changes
Jul 15, 2026
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.
Overview of Changes
The public-API command generator mints one CLI command per contract in
@qawolf/api-contracts. Theflow.listcontract (new in 0.2.0) is already served by the hand-writtenqawolf flows list --remote, so generating it would create a duplicate command surface for the same endpoint.This adds a skip mechanism:
buildCommandSpecsaccepts askipContractNamesset, and the composite root declareshandWrittenContractNames(currentlyflow.list) insrc/commands/publicApi/index.ts. Skipping happens before spec building, so a hand-written contract never needs to be expressible as generated flags, and no empty namespace group command is created.AGENTS.mdand the domain structure rule doc now document the skip list as the mechanism behind "never register the same endpoint both ways".Testing
bun run typecheck bun run lint bun run format:check bun run knip bun run test bun run buildNew coverage:
commandSpecs.test.tsproves a skipped contract produces no spec (using an intentionally flag-unmappable input to pin the skip-before-build behavior), andcommands/publicApi/index.test.tsproves aflow.listcontract in the tree registers noflowcommand while siblings still register.Checklist