Skip to content

ci: pre-push hook cannot pass — turbo typecheck fails on a clean checkout, and the suggested fix crashes on Windows #207

Description

@SandroHub013

Description

turbo typecheck fails on a clean checkout, and the repository's pre-push hook runs it — so pushing is blocked.

Two independent causes.

1. packages/identity — a generated file is being reformatted, breaking its checksum

Its typecheck is wrangler types --check && tsc --noEmit. The --check half compares the committed worker-configuration.d.ts against what wrangler would generate:

X [ERROR] Types at worker-configuration.d.ts are out of date.
          Run `wrangler types` to regenerate.

The types are not out of date. Diffing the generated __BaseEnv_Env interface against the committed one, the declarations are identical and only the indentation differs — wrangler writes tabs, the committed file has spaces. The file is generated, is not listed in .prettierignore, and prettier --check still reports it. Reformatting a file whose tool verifies it by checksum is enough to fail the check.

Because turbo typecheck fails the whole run when one package fails, this single package takes the monorepo down.

2. On Windows, the remedy the error suggests cannot be applied

Running wrangler types prints the project types to stdout and then dies before writing the file:

Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
error: script "typecheck" exited with code 9

That is a libuv crash inside wrangler 4.103.0 (4.120.1 is available). git status confirms the file is never written. A Windows contributor is therefore told to run a command that cannot succeed on their machine.

3. Compounding it: the symlink issue (#195)

On the same run, @nikcli-ai/app and @nikcli-ai/enterprise fail with TS1128 because custom-elements.d.ts is a tracked symlink that Windows materializes as a text file. That is #195, fixed in #199, and it means turbo typecheck has two independent reasons to fail before the identity package is even reached.

Net effect: no Windows contributor can push without --no-verify, and the hook cannot be satisfied by fixing anything in their own branch.

Nikcli version

1.265.0 (live-main @ 9ad41600, clean worktree)

Steps to reproduce

  1. Clean clone on Windows, bun install.
  2. bunx turbo typecheck — fails at @nikcli-ai/app (TS1128) and @nikcli-ai/identity (exit 9).
  3. cd packages/identity && bunx wrangler types — prints types, crashes, writes nothing (git status stays clean).
  4. Any git push runs the same typecheck through the pre-push hook and is rejected.

Operating System

Windows 11 Home 10.0.26200

Terminal

Git Bash, Bun 1.3.14, wrangler 4.103.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions