Skip to content

make typecheck covers 4 packages; CI typechecks 6 — a local green can hide a CI failure #191

Closed

Description

@pdettori

Problem

The two typecheck matrices disagree.

Makefile:

typecheck:
	cd harness && pnpm exec tsc --noEmit
	cd packages/k8s-sandbox && pnpm exec tsc --noEmit
	cd packages/knative-server && pnpm exec tsc --noEmit
	cd experiments && pnpm exec tsc --noEmit

.github/workflows/ci.yml (Typecheck step) runs the same four plus:

	cd packages/sandbox-relay && pnpm exec tsc --noEmit
	cd packages/ibac-stub && pnpm exec tsc --noEmit

Why it matters

make typecheck is what contributors and agents run as the local gate, and CLAUDE.md documents it as the typecheck command. A change touching packages/sandbox-relay or packages/ibac-stub can therefore be locally green and fail in CI — and the failure surfaces only after a push, which is the slowest possible feedback.

This bit during #188: the branch's local gate was reported as "typecheck clean" on the strength of make typecheck, and the two extra packages had to be run separately by review to establish that the seam change did not affect them (it did not — neither imports it).

Fix

Add the two missing packages to the Makefile target so the local gate matches CI. Better still, drive both from one list so they cannot drift again — e.g. a tsc --build project-references setup, or a small script both the Makefile and CI call.

Acceptance

  • make typecheck covers every package CI typechecks.
  • The two lists derive from a single source, or a CI check fails if they diverge.

Refs

Found by the whole-branch review of #188 (ST6).

Activity

  1. added a commit that references this issue on Sep 6, 2026
  2. pdettori commented on Sep 6, 2026

    @pdettori
    MemberAuthor

    Auto-closed by #226 (e0905c6), merged as 1b5d4ef. Adding detail because the fix turned out larger than this issue's framing.

    The drift was bidirectional, not "CI is a superset." At the time of the fix:

    Package make typecheck CI
    harness, k8s-sandbox, knative-server, experiments ✅ ✅
    packages/config-bundle ✅ ❌
    packages/sandbox-relay ❌ ✅
    packages/ibac-stub ❌ ✅

    So config-bundle was typechecked only locally — the inverse of the failure mode filed here, and the one that matters more, since CI is what gates merges.

    Two packages were checked by neither. packages/session-backend and packages/work-queue ship TypeScript with no tsconfig.json at all, and harness depends on both. Nine packages needed the script, not the seven a straight reading of this issue implies. Both typechecked clean, so bringing them in cost nothing but the tsconfig — but nothing would have told us that.

    The recursive form has the same bug one level down. Both call sites are now pnpm -r typecheck, which removes the second list. But pnpm -r <script> silently skips a package that doesn't declare the script and still exits 0 — so before this landed, pnpm -r typecheck reported success while checking 2 of 9 packages. Swapping two hand-maintained lists for one quieter hole would not have been a fix.

    harness/test/typecheck-coverage.test.ts closes it. It reads the members from pnpm-workspace.yaml rather than hardcoding them, and asserts every package carrying TypeScript has a tsconfig.json and a typecheck script — plus, for #190, that the tsconfig covers test. Each assertion was verified failing first, and the parser throws loudly if it ever reads zero globs, since a silently-empty parse would make the whole suite pass vacuously.

    Not chosen: tsc --build project references. Structurally stronger — a real build graph, incremental — but it needs composite: true and emitted declarations across all nine packages, which is a lot of churn for the same guarantee. The workspace already had pnpm -r test as the precedent, so the recursive script matches the existing idiom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions