Skip to content

[bug] Serialize run-parent directory creation across parallel lanes #502

Description

@Anionix

Trigger

GitHub CI for PR #501 at exact head 0e632261d5d64da645a29e696f6b5f4ede842a7a ran the fair, claims, prompt, and equivalence smoke lanes in parallel.

Run: https://github.com/Anionix/data-format-lab/actions/runs/30074518996

Expected

Independent lanes may create the shared runs/ ancestor concurrently without failing.

Actual

The prompt lane failed in workflow._create_missing_private_parents() with:

FileExistsError: [Errno 17] File exists: 'runs'\n```\n\nAll pytest, Python quality gates, and the other smoke lanes succeeded.\n\n## Cause hypothesis\n\nThe implementation checks `directory.exists()` before `directory.mkdir(mode=0o700)`. Another lane can create the directory between those operations.\n\n## Impact\n\nA valid PR can fail the blocking full CI gate nondeterministically whenever parallel lanes share a missing run ancestor.\n\n## Acceptance\n\n- Make ancestor creation idempotent under concurrent creators without weakening the private-mode contract.\n- Add a deterministic focused regression test for the check/create race.\n- Verify the blocked PR against the fixed `main` SHA.\n\n## Lifecycle\n\n`DISCOVERED -> ENCODED -> ROUNDTRIP_VERIFIED -> BENCHMARKED -> REPORTED`; this defect blocks safe transition into benchmark execution and must fail closed rather than produce partial evidence.

Activity

  1. Anionix commented on Jul 24, 2026

    @Anionix
    OwnerAuthor

    Verified on live origin/main: PR #503 merged as 800d1ea3ac213fec6ead320e021d237d7978a78a, containing fix SHA 269afe4a1a58c99180810ca35f52978efd39234f. Exact-SHA GitHub verify, CodeQL, and diagnostics all passed; the parallel smoke race did not recur.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions