Define the default-on rollout for generated-app tests without destabilizing existing users.
This plan covers:
- scaffold emission,
- contract tests emission,
- UI tests emission,
- generated CI workflow emission,
- default-on switch for emitted tests.
- Phase 1 complete:
--with-testsemits test scaffold. - Phase 2 complete: contract integration test scaffold emitted.
- Phase 3 complete: UI smoke test scaffold emitted (static + optional live mode).
- Phase 4 complete: generated CI workflow emitted under
.github/workflows/generated-app-ci.yml. - Phase 5 pending: default-on switch for emitted tests.
- Phase 1: scaffold emission
- Behavior:
th generate --with-testsemits basetests/tree. - Default: OFF.
- Phase 2: contract tests emission
- Behavior: emit
tests/contract/*and addtest:contractscript. - Default: OFF.
- Phase 3: UI tests emission
- Behavior: emit
tests/ui/smoke.mjsand addtest:uiscript. - Default: OFF.
- Phase 4: generated CI template emission
- Behavior: emit
.github/workflows/generated-app-ci.yml. - Default: OFF.
- Phase 5: default-on switch
- Behavior:
th generateemits tests + generated CI workflow by default. - New opt-out flag:
--no-tests(or equivalent) to disable emitted test scaffold. - Existing
--with-testsremains accepted for compatibility for two minor releases after the switch, then becomes removable.
Default-on MUST NOT be enabled until all are true:
- Builder CI includes generated-app verification in
integration-localand stays green. - At least two consecutive weeks of green
integration-localruns onmaster. - Canonical generated app (
apps/example/job-board.schema.json) generated-app tests pass in CI. - No open P0/P1 bugs attributed to generated test scaffolding or generated app CI template.
Existing generated apps are not auto-migrated.
Migration path for existing app repos:
- Regenerate with
th generate --with-testsand copy emittedui/tests/+.github/workflows/generated-app-ci.yml. - Keep app-specific tests and custom workflows; merge generated workflow sections as needed.
- Validate locally with:
pnpm run test:contractpnpm run test:ui
- T0: Current (opt-in tests via
--with-tests). - T1: Default-on release lands.
--with-testsstill accepted (compat alias).--no-testsdocumented as supported opt-out.
- T2: Two minor releases after T1.
- Announce pending removal of
--with-testsalias in release notes.
- Announce pending removal of
- T3: Four minor releases after T1.
- Remove
--with-testsalias if adoption and support metrics are stable.
- Remove
Before releasing default-on behavior:
docs/release-checklist.mdgenerated-app tests section is complete.- PR checklist includes generated-app rollout assertions.
- SPEC and AGENTS sections for generated tests are synchronized.