Skip to content

Timing-sensitive tests fail under parallel workspace runner (concurrency=3) #2132

Closed

Description

@jackwener

Investigation from Slock task #147 (by Maka前端执行专家, reviewed by maka-审美专家). Evidence:

  • --concurrency 3: 3/3 runs fail at least one test. --concurrency 1: 0/2 fail. Each package standalone: all green (runtime ×4, runtime-host ×3, and runtime-host immediately after runtime ×3 — rules out dirty-teardown).
  • Falsified hypotheses: /tmp fill-up (entries 331→339, readdir 1ms) and orphaned child processes.
  • Conclusion: machine saturation breaks fixed-time assumptions, not shared-resource contention.

High-frequency failures (exactly these three):

  • runtime-host: Host auxiliary models meter provider usage and abort physical requests
  • runtime: file tools follow the execution boundary
  • runtime: one file takes one write lock however its path is spelled

Ask: relax the fixed waits/timeouts in these three tests or convert to conditional waits. Interim mitigation lands separately: add both packages to SERIAL_WORKSPACE_DIRS in scripts/run-workspace-tests-parallel.mjs (precedent: packages/headless).

Activity

  1. jackwener commented on Aug 4, 2026

    @jackwener
    MemberAuthor

    Interim mitigation landed in #2136 (merged, e16ad2d): packages/runtime and packages/runtime-host moved to SERIAL_WORKSPACE_DIRS — remove those two entries when the timing assumptions in the three tests above are fixed. The same PR also fixed a runner defect found during this work: runSerial was skipped entirely whenever any parallel workspace failed, which had packages/headless silently not running on failing local runs. Serial batch now always executes and failures from both batches are reported together.

  2. Benjamin-eecs commented on Aug 4, 2026

    @Benjamin-eecs
    Contributor

    Taking this one, following the issue's own analysis:

    • execution-model-composition: abort the stalled effect with an explicit controller, only after the dispatch barrier settles. The abort reason keeps the TimeoutError name, so the errorClass assertion stands. The 10s test timeout moves to the 20s precedent.
    • filesystem-authority: replace the 20ms sleep with deferred barriers. The release happens only after the second edit is provably queued on the lock.
    • Remove the two SERIAL_WORKSPACE_DIRS entries, per the note in fix(scripts): the serial workspace batch was never running after a parallel failure #2136.

    Validation: repeated full runs at --concurrency 3 plus standalone package runs, counts in the PR.

  3. added 2 commits that reference this issue on Aug 4, 2026
    1de3d97
    ebc1489
  4. added a commit that references this issue on Aug 4, 2026
    1db5e9d
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