Skip to content

chore(husky): let turbo say which packages a push affects - #1789

Merged
mobeenabdullah merged 1 commit into
mainfrom
chore/pre-push-affected-scope
Sep 11, 2026
Merged

mobeenabdullah merged 1 commit into
mainfrom
chore/pre-push-affected-scope

Conversation

@mobeenabdullah

Copy link
Copy Markdown
Collaborator

What

Follow-up to #1781, which merged before its last revision could be pushed: that revision was refused by its own hook while main was red, which is the rule working.

The blocking typecheck verdict now comes from turbo's own --affected (with TURBO_SCM_BASE=origin/main, merge-base semantics) rather than from filters derived from directories. The difference that matters: turbo.jsonc declares scripts/**, the root manifest and the lockfile as global inputs, because apps/playground's typecheck compiles scripts/dev-doctor.mjs and a lockfile bump changes what every package compiles against. A directory-derived filter cannot see that a root script reaches a workspace; turbo's hash does. --only still keeps unchanged dependencies out of the verdict.

The trade this makes, stated

A push that changes a global input is judged against every package, so a scripts/-only push is refused while any package is red. CI's typecheck follows the same hashes, so that push would be refused at merge regardless; the hook says it earlier. This branch's own push exercised the other side: .husky alone is no package and no global input, one root task ran, the push went through with the note.

Verified

Against main's real nextly error at the time: a scripts/ change selected all 28 packages and was refused; #1780's branch (nextly changed, fix present) selected 14 and passed; a docs-only branch passed.

CI-only, no changeset.

turbo.jsonc declares scripts/**, the root manifest and the lockfile as
global inputs, so a root script a workspace compiles reaches that
workspace's typecheck through the hash and not through any package
directory. --affected reads that model directly, dependents included,
where a filter derived from directories could not.
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c4b123ad-3485-4b79-b89d-2a18210ce879

📥 Commits

Reviewing files that changed from the base of the PR and between 4a34f1e and 3d6fcb2.

📒 Files selected for processing (1)
  • .husky/pre-push

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T12:28:57.615782Z 3d6fcb2 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 3d6fcb295e

ℹ️ 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".

@mobeenabdullah
mobeenabdullah merged commit 3c73c35 into main Sep 11, 2026
12 of 13 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Whole-Repository Code Hygiene Summary

Full dead-code, duplication, and complexity report for the PR branch as it stands now. Playground is excluded. Quality gate enforcement on introduced issues is performed by the Changed files job.

🌿 Fallow

Warning

Review needed

⚠️ 73 code issues · ⚠️ 694 clone groups · ⚠️ 1044 health findings

See inline review comments for per-finding details.

Code issues (73)
Category Count
Unused files 2
Unused exports 5
Unused dependencies 19
Unused devDependencies 6
Unresolved imports 2
Unlisted dependencies 1
Circular dependencies 38
Duplication (694 groups · 29077 lines · 4.1%)
Locations Lines Tokens
schemas/_dialect-bundles/mysql.relations.ts:40-134
schemas/_dialect-bundles/postgres.relations.ts:40-134
schemas/_dialect-bundles/sqlite.relations.ts:40-134
95 593
cli/commands/db-sync-demote.ts:70-75
cli/commands/db-sync-promote.ts:38-43
cli/commands/dev-build.ts:100-105
cli/commands/dev-build.ts:179-184
cli/commands/dev-build.ts:299-304
cli/commands/dev-build.ts:411-416
cli/commands/dev-build.ts:552-557
cli/commands/dev-server.ts:575-580
cli/commands/dev-server.ts:840-845
cli/commands/dev-server.ts:1143-1148
cli/commands/migrate-field-groups.ts:110-115
6 70
entries/EntryList/EntryTableSkeleton.tsx:74-98
collection/components/CollectionTableSkeleton.tsx:94-118
field-group/components/FieldGroupTableSkeleton.tsx:90-114
plugins/components/PluginsTableSkeleton.tsx:86-110
singles/components/SinglesTableSkeleton.tsx:77-101
src/components/table-skeleton.tsx:100-124
25 89
collections/config/validate-config.ts:380-433
field-groups/config/validate-field-group.ts:185-238
singles/config/validate-single.ts:190-243
54 152
dispatcher/handlers/collection-dispatcher.ts:922-964
field-groups/services/field-group-table-provisioning.ts:186-236
singles/services/reconcile-single-companion.ts:110-160
51 149

… and 689 more groups.

Across 423 files.

Complexity (1044 functions above threshold)
File Function Severity Cyclomatic Cognitive CRAP Lines
singles/services/single-mutation-service.ts:981 <arrow> critical 251 ! 324 ! 13859.2 ! 1625
collections/services/collection-mutation-service.ts:6209 <arrow> critical 174 ! 177 ! 6713.6 ! 1301
src/init/reload-config.ts:1319 applyReload critical 144 ! 228 ! 4623 ! 1433
shared/lib/entry-validation.ts:223 validateFieldValue critical 109 ! 157 ! 2675.3 ! 432
blocks-engine/src/measure-bytes.ts:646 surveyDocument critical 102 ! 250 ! 137.1 ! 658

5001 files, 76567 functions analyzed (thresholds: cyclomatic > 20, cognitive > 15, CRAP >= 30)

Codebase health

Metric Value
Maintainability 91.7 / 100
Avg complexity 1.8

Tip

Run fallow fix --dry-run to preview auto-fixes.
Add /** @public */ above exports to preserve them.

@github-actions

Copy link
Copy Markdown
Contributor

PR title fails Conventional Commits check

Unknown scope "husky" found in pull request title "chore(husky): let turbo say which packages a push affects". Scope must match one of: nextly, admin, admin-css, client, ui, adapter-postgres, adapter-mysql, adapter-sqlite, adapter-drizzle, storage-s3, storage-vercel-blob, storage-uploadthing, blocks-engine, blocks-react, builder, plugin-form-builder, plugin-page-builder, plugin-seo, plugin-sdk, create-nextly-app, eslint-config, eslint-plugin, module-specifiers, prettier-config, tsconfig, telemetry, playground, root, ci, docs, deps, release.

Examples of valid titles:

  • feat(admin): add role manager dialog
  • fix(adapter-postgres): handle connection pool exhaustion
  • chore(deps): bump zod to 4.2.0

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