Skip to content

harness/tsconfig.json excludes test, so harness test files are never typechecked #190

Description

@pdettori

Problem

harness/tsconfig.json has:

"include": ["src"]

so make typecheck and CI both typecheck harness/src and never harness/test. By contrast packages/k8s-sandbox/tsconfig.json has "include": ["src", "test"].

Why it matters, concretely

PR #188 added a required field (truncated) to the seam's ExecResult and leaned on "required, so a fourth implementation is a compile error" as a central design argument. That forcing function works in packages/ and does not reach harness/:

  • In packages/k8s-sandbox, tsc immediately flagged a hand-built fake in test/extension.test.ts, and it was fixed.
  • In harness/test, three SandboxTransport fakes silently kept compiling without the required field — two in run-leaf.test.ts and several in converge.test.ts. They passed only because undefined is falsy where the code reads truncated. They were found by review, not by the compiler.

So the design's own guarantee is only true for part of the repo, and the gap is invisible: a green make typecheck says nothing about harness test files.

A related symptom from the same PR: three type errors in packages/k8s-sandbox/test/operations.test.ts shipped in one commit because the task ran only vitest (which does not typecheck) — the compiler caught them one commit later. In harness/test, nothing would ever have caught them.

Acceptance

  • harness/tsconfig.json includes test.
  • make typecheck and CI are green afterwards (expect a batch of fixes to hand-built fakes on the first run).
  • Audit the other packages for the same asymmetry (packages/knative-server, packages/sandbox-relay, packages/ibac-stub, experiments) so the rule is uniform rather than per-package.

Refs

Found while executing #188 (ST6). Both the missing-field instances there are already fixed on that branch; this issue is about closing the hole that let them exist.

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