fix: tighten ztd starter prepublish UX proof#848
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR tightens the starter first-run flow by broadening the smoke-query parameter type contract to allow additional properties, improving Postgres connection-failure error diagnostics with recursive detection and aggregated recovery guidance, and extending publish-time verification to include TypeScript compilation and targeted smoke tests. ChangesStarter Quality and Recovery
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/ztd-cli/templates/src/features/smoke/queries/smoke/boundary.tsParsing error: "parserOptions.project" has been provided for Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
.env, andZTD_DB_PORT.ztd-configbefore npm publication.Verification
pnpm --filter @rawsql-ts/ztd-cli test -- ztdVerifier.unit.test.ts init.command.test.ts publishWorkflow.unit.test.tspnpm --filter @rawsql-ts/ztd-cli test -- ztdVerifier.unit.test.ts publishWorkflow.unit.test.tspnpm --filter @rawsql-ts/ztd-cli exec tsc -p tsconfig.json --noEmitgit diff --checknode scripts/verify-published-package-mode.mjspnpm exec vitest run src/features/smoke/queries/smoke/tests/smoke.boundary.ztd.test.tsnow reports the target URL and recovery steps instead of a raw AggregateError. DB-backed success was not run locally because Docker reportsall predefined address pools have been fully subnettedin this environment.Merge Readiness
Tracking issue:
Scoped checks run:
Why full baseline is not required:
Self Review
Self-review workflow: Ran the
self-reviewskill over starter first-run UX, prepublish proof coverage, error recovery, and claim wording.Self-review result: No merge blockers remain; the only unconfirmed path is DB-backed success in this local Docker environment due Docker network pool exhaustion, and the generated error text now points at that recovery case.
Concept-review workflow: Checked the ztd-cli package concept/runtime-free boundary in
docs/ztd-cli-docs.mdagainst the changed starter templates and publish verification flow.Concept-review result: No concept or package-boundary violation found; generated production code remains runtime-free and the DB/testkit pieces stay in dev/test verification paths.
CLI Surface Migration
No-migration rationale:
Upgrade note: Newly generated starters now typecheck without editing the smoke query params, and DB connection failures include direct recovery steps for Docker and
ZTD_DB_PORT.Deprecation/removal plan or issue: No deprecation or removal is introduced.
Docs/help/examples updated: Starter template behavior and published-package verification were updated; the existing starter README remains the user-facing setup guide.
Release/changeset wording:
.changeset/quiet-starter-proof.mddescribes the ztd-cli patch release.Scaffold Contract Proof
No-proof rationale:
Non-edit assertion: Newly generated starter smoke params are valid TypeScript without hand edits; this is asserted by
init.command.test.tsand the tarball starter typecheck inverify-published-package-mode.mjs.Fail-fast input-contract proof:
ztdVerifier.unit.test.tscovers AggregateError-style Postgres connection failures and asserts the starter recovery message includes the target and next steps.Generated-output viability proof:
node scripts/verify-published-package-mode.mjsnow proves the generated tarball starter by runningpnpm exec tsc --noEmit -p tsconfig.json, DB-free smoke tests, andztd-configafter dependency rebinding.Summary by CodeRabbit
Release Notes
Bug Fixes
New Features
Tests