Skip to content

fix(agent): make the tooling's own tests hold in a product checkout - #462

Merged
agjs merged 1 commit into
mainfrom
fix/product-agnostic-tooling-tests
Sep 15, 2026
Merged

agjs merged 1 commit into
mainfrom
fix/product-agnostic-tooling-tests

Conversation

@agjs

@agjs agjs commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Three of bun test tools/agent failed in the first product built on the template (Tinkercaster), for reasons unrelated to that product's code:

  • Generator tests created a Projects resource, which the product already owns. They now take the first free name from a candidate list (fixtureResourceNames), and withoutRecordAccountPredicate takes the table name instead of assuming projects.
  • The generator itself broke once a checkout had a few subjects: Prettier formats a wrapped union with leading pipes, and splicing X | after SubjectInstance = produced X | | Y, which validateEdit rejected. addSubjectInstance rebuilds the union from its members; a test covers both layouts, the duplicate-subject refusal and the anchor checks.
  • The pre-push regression asserts the exact compose profile list but pinned only two of the five optional overlays; a product with WITH_MAILPIT=1/WITH_BULLMQ=1 in compose/.env added 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.
  • The same files copied into Tinkercaster: its bun test tools/agent goes from 3 failures to zero (verified in that checkout).
  • The regression script also caught a real bug in Tinkercaster's locally patched dev.sh, which is being replaced by the template's compose-level tracing defaults.

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.
@agjs
agjs merged commit c32f517 into main Sep 15, 2026
29 checks passed
@agjs
agjs deleted the fix/product-agnostic-tooling-tests branch September 15, 2026 08:42
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