Skip to content

[bug] stale-cleanup retry mkdir failure path falls back to generic -32000 #92

Description

@kiki830621

Problem

che-telegram-all-mcp-wrapper.sh:159 stale-cleanup retry path exits with stderr only — no JSON envelope to stdout. Race window:

rm -rf "$LOCK_DIR"
mkdir "$LOCK_DIR" 2>/dev/null || {
    echo "Failed to claim lock (stale-cleanup race)." >&2
    exit 1
}

If concurrent wrapper recreates lock dir between rm -rf and our mkdir → fall back to generic -32000. Race rare but reachable.

Surfaced by Codex (P3 #7).

Expected

Call emit_mcp_error_response before exit 1 in the retry-fail branch too, distinct message indicating race.

Priority

P3 — race rare in single-user; polish.

Source: surfaced during /idd-verify che-msg#31 (sister bug from verify ensemble — Codex + Devil's Advocate flagged convergently)

Verify report: #90 (comment)
Related issue: PsychQuant/che-msg#31
Related PR: psychquant-claude-plugins#90 (PR-1 ships v1.3.2)

🤖 Filed by /idd-verify Step 5b follow-up triage.

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