Skip to content

flake: packages/cli/src/mcp-errors.test.ts > unit · errors.explain > every x command it hands out is machine-readable #1266

Closed

Description

@github-actions

flake-hunt saw this fail in https://github.com/developerz-ai/ultimate/actions/runs/44443484119.

suite round seed
unit 1 4213420217
unit 2 2879767910
unit 3 3435136434

Replay each round in its order:

bun run x -- test unit --workers 4 --isolate -- --randomize --seed=4213420217
bun run x -- test unit --workers 4 --isolate -- --randomize --seed=2879767910
bun run x -- test unit --workers 4 --isolate -- --randomize --seed=3435136434

The file alone, same seed — order across files is lost, so green here is not a fix:

bun test ./packages/cli/src/mcp-errors.test.ts --randomize --seed=4213420217

What Bun printed:

42 |       const fix = explainErrorCode(code)?.fix ?? '';
43 |       for (const command of xCommands(fix)) {
44 |         expect(`${code}: ${command}`).toContain('--json');
                                           ^
error: expect(received).toContain(expected)

Expected to contain: "--json"
Received: "X_HEAVY_COMMAND_NOT_FOUND: x heavy run -- bun test"

      at <anonymous> (/home/runner/work/ultimate/ultimate/packages/cli/src/mcp-errors.test.ts:44:39)

::error file=packages/cli/src/mcp-errors.test.ts,line=44,col=39,title=error: expect(received).toContain(expected)::Expected to contain: "--json"%0AReceived: "X_HEAVY_COMMAND_NOT_FOUND: x heavy run -- bun test"%0A%0A      at <anonymous> (/home/runner/work/ultimate/ultimate/packages/cli/src/mcp-errors.test.ts:44:39)

Activity

  1. sebyx07 commented on Nov 19, 2026

    @sebyx07
    Contributor

    Fixed on main by a22539b (#1261), which carried later commits than the hunted a5733be.

    Cause: not order dependence: the fix command for X_HEAVY_COMMAND_NOT_FOUND omitted --json, so the machine-readable check failed on every run. The fix hands out x heavy run --json -- bun test.

    Evidence

    • Restoring the a5733be version of packages/cli/src/mcp-errors.ts on main makes this test fail again under --randomize --seed=4213420217. With main's version it passes.
    • The test passes on the current tip 0700715 under all three seeds from the failing hunt (4213420217, 2879767910, 3435136434), run file by file with CI=true.
    • Hunt 44447976868 on a22539b was green in all six rounds (unit and live, three fresh seeds each).
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

    flake-hunta test flake-hunt.yml saw fail under a shuffled order

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions