Skip to content

push-scripts.test.ts: timing flake in the UserPromptSubmit drop-second-shelf case reddens unrelated PRs #216

Description

@A1igator

src/lib/push-scripts.test.ts, case "the prompt arm (UserPromptSubmit) > drops the second shelf rather than overrunning, when the first leg was slow", is a pre-existing timing flake: measured 1-in-3 isolated runs on one branch and 1-in-6 (with 2 failures in one run) on a clean worktree at eb39bad, a head that predates any recent change to the file (last touched in #201). It failed CI on unrelated consent-model work twice on 2026-08-26. The case races a slow first leg against the drop decision; it needs a deterministic seam (fake timers or a barrier) instead of wall-clock sleeps.

Found during PR #185's rounds; reported twice by the working node before filing.

🤖 Generated with Claude Code

https://claude.ai/code/session_013TE4zSrBc7Qw1qPodTGCT9

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