Skip to content

fix: CI failure — concurrent trace file writes produce corrupted JSON #644

Description

@anandgupta42

Description

The test Concurrent sessions > concurrent traces to same session ID overwrite cleanly is failing on main with:

SyntaxError: JSON Parse error: Unterminated string

Root cause:FileExporter.export() uses fs.writeFile() (non-atomic), while the snapshot() method uses atomic writes (tmp + rename). When concurrent sessions write to the same trace file, a snapshot rename can race with a non-atomic writeFile, producing truncated JSON.

CI run:https://github.com/AltimateAI/altimate-code/actions/runs/23985613053/job/69956978499

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