Seeded defect in a throwaway copy of HEAD: record appends to the file instead of replacing it, so a second record leaves two documents.
FAIL twice. mode schedule, clock none, night open: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 188 (line 8 column 1)
FAIL twice. mode schedule, clock running, night none: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 168 (line 8 column 1)
FAIL twice. mode schedule, clock running, night open: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 168 (line 8 column 1)
FAIL twice. mode schedule, clock running, night ended: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 168 (line 8 column 1)
FAIL twice. mode schedule, clock running, night past: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 168 (line 8 column 1)
FAIL twice. mode schedule, clock running, night unreadable: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 168 (line 8 column 1)
FAIL twice. mode schedule, clock passed, night open: a second record leaves a file that cannot be read: Unexpected non-whitespace character after JSON at position 188 (line 8 column 1)

Second run, after the code round of review. The defect is record as it was: a record for another id was written over the first, and over a file that cannot be read.
FAIL twice. mode schedule, clock none, night open: a record for another id was written over the first
FAIL twice. mode schedule, clock none, night open: a refused record changed the first one
FAIL twice. mode schedule, clock none, night open: a record was written over a file that cannot be read
FAIL twice. mode schedule, clock none, night open: a refused record changed the damaged file
FAIL twice. mode schedule, clock running, night none: a record for another id was written over the first
FAIL twice. mode schedule, clock running, night none: a refused record changed the first one
