Skip to content

TypeScript: worker overlays symlink the build output, so worker builds write through to the real tree and parallel workers race — both false SURVIVED and false KILLED #31

Open

Description

@columforge

Project shape: tests import a committed build-output directory (lib/), so the per-mutant test command is build && run tests. workers.py links everything under the root except src into each worker overlay — that includes lib/.

Consequences, observed on a TypeScript project (src/parse.ts, 126 sites):

  1. Write-through: a worker's build writes through the lib/ symlink into the real tree, mutating files outside the overlay.
  2. Cross-worker race: with N workers, N builds race on the same real lib/ files — a mutant's tests can execute against another worker's build.

Evidence (same mutant, both directions wrong):

  • turnAt (let turn = 0 → 1): the 8-worker parallel run reported SURVIVED; running that mutant in isolation fails 4 tests (should be KILLED).
  • Opposite direction also observed: mutants reported KILLED in parallel whose isolated rerun survives.

Full-run comparison: parallel fresh 75/51, serial fresh 73/53 — errors in both directions.

Related: #19 and #29 (linked directories make tests exercise the original — false SURVIVED). This adds the write-through and the parallel race, which is what produces false KILLED too, and it also means a parallel run corrupts the snapshot that #21's differential then inherits.

Suggested fix direction: exclude the build-output directory from linking (read outDir from tsconfig) and copy it into each worker instead — or give each worker a private outDir. Cloned main on 2026-11-06; happy to provide the full run logs.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions