refactor(tooling): fold the lint-fix leftovers in the scaffolder and release tools - #28
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe publishing-contract checker now performs single-pass validation and schema-based normalization. The scaffolder now uses shared error helpers, explicit undefined types, consistent signal propagation, and normalized request construction. ChangesPublishing contract and release validation
Scaffolder type and error consistency
Priority: ⬇️ Low — Defer the tooling refactor because it is limited to scaffolder and release-tool validation, typing, error handling, and tests without a stated customer or incident impact. Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The refactor preserves the scaffolder request and cancellation paths and the publishing-contract validation behavior covered by the supplied checks. No material merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 15 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. A rabbit checks each schema line, Comment |
5de6035 to
d3d7659
Compare
d3d7659 to
eec8f3c
Compare
eec8f3c to
d5e084c
Compare
d5e084c to
9a1ec77
Compare
9a1ec77 to
ad8294e
Compare
…release tools Publishing contract: - move each rule's diagnostic onto its zod schema so the parallel `diagnostic()` switch disappears; messages are byte-identical - drop the erased `z.ZodType` annotations; `nonEmptyString` takes the message - `readWorkspace` applies the packages/ path rule itself and returns prefixed violations, retiring the `Workspace` union and `validatePublishingContract` - zod becomes a devDependency like the other private tools Scaffolder: - one `internal/errors.ts` owns `isNodeError`/`isNotFound`/`isAlreadyExists` and `asError`; render.ts reuses `asError` instead of an inline ternary - prompt option and adapter `signal` fields accept `undefined`, so the clack adapter is the only place that strips an absent signal; `withSignal` and the conditional option objects in scaffolder.ts go away - `JsonValue` is spelled through `z.json()` like the test-utils copy - `description`, `scaffoldNameInitialValue` and `request` accept `undefined` so their builders collapse to one object literal Tests: - strictly-increasing check in first-release-bootstrap is linear again - `packOutputSchema` normalises the tuple form so `packManifest` reads `filename` directly - the publish workflow schema only shapes the fields the suite reads - `FixtureManifest` spells the concrete manifest shapes instead of records Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Oxlint failed first on the branch below, so eslint never ran here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ad8294e to
a7c2689
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Part of the post-anti-slop cleanup series. Stacked on the validation/typed-handler PR.
Publishing contract:
diagnostic()switch disappears; messages are byte-identicalz.ZodTypeannotations;nonEmptyStringtakes the messagereadWorkspaceapplies the packages/ path rule itself and returns prefixedviolations, retiring the
Workspaceunion andvalidatePublishingContractScaffolder:
internal/errors.tsownsisNodeError/isNotFound/isAlreadyExistsand
asError; render.ts reusesasErrorinstead of an inline ternarysignalfields acceptundefined, so the clackadapter is the only place that strips an absent signal;
withSignalandthe conditional option objects in scaffolder.ts go away
JsonValueis spelled throughz.json()like the test-utils copydescription,scaffoldNameInitialValueandrequestacceptundefinedso their builders collapse to one object literal
Tests:
packOutputSchemanormalises the tuple form sopackManifestreadsfilenamedirectlyFixtureManifestspells the concrete manifest shapes instead of recordsVerification: publishing-contract, typecheck, format, lint (same pre-existing finding only), knip, scaffolder (incl. acceptance), publishing-contract and release-preparation tests pass;
pnpm scaffold --helpboots. 17 files.🤖 Generated with Claude Code
Summary by CodeRabbit
Improvements
Refactor
Tests