Skip to content

A page load during a trial's write can read half of its result.json #433

Backlog

Description

@harenome

Priority

P3 · When convenient: the window is one write long and the next read is whole; a killed writer leaves the part.

Evidence

#370 moved the job's files to ondisk.write_whole. A trial's files still go through job._write, which truncates and writes in place (result.json, score.json, logs). merge unlinks a trial's result.json, then writes it with open(..., "w"). A read meanwhile leaves the trial out.

Main a8226ba, _write paused halfway, parse_job meanwhile:

before:   [('u1__a', 1.0)]
on disk:  62 bytes: '_name": "u1",\n "standard": {},'
during:   []
after:    [('u1__a', 0.0)]

Reproduction

  1. A standard job with one trial.
  2. Rewrite its result.json with job._write, paused halfway.
  3. parse.parse_job meanwhile.

Expected

A reader sees the old file or the new one, never a part.

Acceptance

  • job._write writes through ondisk.write_whole, never through a link or folder at the path.
  • merge writes each trial's result.json through ondisk.write_whole.
  • A failed trial write leaves the previous file or none, never a part (test).

Related

#366, #370

Activity

  1. added
    bug
    P3
    on Nov 25, 2026
  2. added theissue type on Nov 25, 2026
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

    P3bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions