Skip to content

fix: key Tia worker partials per process to survive batch recycling - #1782

Open
lazerg wants to merge 1 commit into
pestphp:5.xfrom
lazerg:fix/issue-1778-worker-token-unique
Open

fix: key Tia worker partials per process to survive batch recycling#1782
lazerg wants to merge 1 commit into
pestphp:5.xfrom
lazerg:fix/issue-1778-worker-token-unique

Conversation

@lazerg

@lazerg lazerg commented Jul 28, 2026

Copy link
Copy Markdown

What:

  • Bug Fix
  • New Feature

Description:

When recording a TIA graph with --tia --parallel --max-batch-size=N, most of the dependency graph is silently dropped. Tia::flushWorkerPartial() keys each worker's edge partial by workerToken(), which prefers ParaTest's TEST_TOKEN. TEST_TOKEN is stable per worker slot, not per process, so when ParaTest recycles the process in a slot every N tests, each new process writes its partial to the same filename and clobbers the batches its predecessors recorded in that slot. The parent's merge only ever sees the last batch per slot, so graph.json ends up with edges for a fraction of the suite and later --tia runs re-execute almost everything as uncached.

workerToken() now prefers UNIQUE_TEST_TOKEN, which ParaTest sets uniquely per worker process, and falls back to TEST_TOKEN/PID as before. The parent already merges every file matching the prefix, so one partial per process merges cleanly with no other changes. The same keying is shared by the results and no-driver partials, which are fixed by the same change.

Related:

Fixes #1778

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.

TIA: worker edge partials keyed by slot-stable TEST_TOKEN — --parallel --max-batch-size=N silently drops most of the recorded graph

1 participant