fix(agent): make the tooling's own tests hold in a product checkout - #462
Merged
Merged
Conversation
Three tooling tests assumed the template's shape and failed in the first product built on it: - the generator tests created a Projects resource, which the product already owned; they now pick the first free name from a candidate list, and the record-scope mutant takes the table name instead of assuming projects. - the generator itself broke on a product with a few subjects: Prettier formats a wrapped union with leading pipes, and splicing X | after the equals sign produced X | | Y. The union is rebuilt from its members. - the pre-push regression asserted the exact compose profile list but pinned only two of the five optional overlays; a product with Mailpit and BullMQ enabled in compose/.env added their profiles. All five are pinned off in that step.
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
Three of
bun test tools/agentfailed in the first product built on the template (Tinkercaster), for reasons unrelated to that product's code:Projectsresource, which the product already owns. They now take the first free name from a candidate list (fixtureResourceNames), andwithoutRecordAccountPredicatetakes the table name instead of assumingprojects.X |afterSubjectInstance =producedX | | Y, whichvalidateEditrejected.addSubjectInstancerebuilds the union from its members; a test covers both layouts, the duplicate-subject refusal and the anchor checks.WITH_MAILPIT=1/WITH_BULLMQ=1incompose/.envadded their profiles. That step now pins all five off, matching its own comment.Test plan
bun run agent:check: 87 tests, zero failures, on the template.bun test tools/agentgoes from 3 failures to zero (verified in that checkout).dev.sh, which is being replaced by the template's compose-level tracing defaults.