chore(husky): refuse a push whose own packages fail check-types - #1781
Conversation
The repo-wide typecheck stays advisory, since it can be red for a package the author never touched. The packages the push changes are now held to it with a cached filtered re-run, so a type error the push carries is refused here rather than printed as a note and left for CI.
|
Warning Review limit reachedNext included review available in 37 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49f3e3c440
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The blocking typecheck now runs on the packages gate-scope derives plus every package that depends on them, with --only so an unchanged dependency's red stays a note. The root manifest and the lockfile join gate-scope's graph-wide set, so a dependency change is judged unfiltered like a workspace-list change.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5796886e06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Next revision is committed locally (turbo --affected --only; see the thread reply). Its push is refused by its own hook while main's nextly typecheck is red, so it lands right after #1780 merges. |
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
@nextlyhq/eslint-plugin
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
PR title fails Conventional Commits checkExamples of valid titles:
|
What
The pre-push hook runs the repo-wide
check-typesand, by design, only prints a NOTE when it fails: the whole-repo scope can be red for a package the author never touched, and a hook that refuses over someone else's breakage teaches--no-verify.That stays. What changes: the packages the push AFFECTS are held to
check-typeswith a re-run that replays from turbo's cache and costs seconds. "Affects" is the packagesscripts/gate-scope.mjsderives from the diff (the same scope the test gate uses) plus every package that depends on them (--filter=...<pkg>), with--onlyso their unchanged dependencies stay out of the verdict. A type error there is refused; one outside stays a note.Root
package.jsonandpnpm-lock.yamljoin gate-scope's graph-wide set besidepnpm-workspace.yamlandturbo.jsonc: a dependency change cannot be attributed to a package, so both the test gate and the type verdict run unfiltered for it (exit 2). Root paths only; a workspace's own manifest scopes to that workspace.Turbo's
--affectedwas tried first and measured: it reads any root-level change,scripts/included, as touching all 27 packages, which would refuse a scripts-only push over a red in a package it never reached. The derived filters do not.Why now
#1754 merged with an implicit
anyin a test file. The hook printed the error as a note; CI, which blocks on it, could not report because its queue cannot drain (#1778).mainhas been red oncheck-typessince (#1780 fixes the line). A gate whose only enforcement was elsewhere had no enforcement that day.Verified
The block was run directly against the real turbo task with
main's currentnextlyerror present: a push scoped to@nextlyhq/plugin-seoruns 1 package and continues with the note (its unchanged dependency's red does not block); a push scoped to@nextlyhq/blocks-engineruns 14 packages, reachesnextlyas a dependent, and is refused; no package touched notes and continues; graph redefined and red refuses; types green is silent. This branch's own pushes exercised the note path live, once with.huskyalone and once withscripts/changed.CI-only, no changeset.