The recorder now keeps an announce invariant (its header flag bit 0, FLAG_ANNOUNCED_BYTES_RECORDED;
the version stays 2): at each didModifyRange: of a Managed buffer, the last m2v.write before it
that carries each 4 KiB chunk of the range holds the bytes the program's CPU copy held there, the
GPU's that a synchronizeResource: read back included. A player that also plays the read-back into
its CPU copy pushes the GPU's bytes where the program put its own back without the stream writing
them again, which is how r3's appender lost its count reset at call 4319503 and overran its list.
The reader takes the flags, refusing a segment with another bit or with flags unlike the first
segment's, and the writer writes them (StreamWriter::with_flags). The player tells the backend
before the first call (Backend::announced_bytes_recorded). On a marked stream a
synchronizeResource: of a buffer played with two copies leaves the CPU's copy as the stream's
writes made it: the new runtime's backend copies the GPU's copy into an aside buffer of its own
(one per buffer, in a Shared place, given back at the buffer's release), which a check of the
buffer reads from the read-back to its next didModifyRange:; the old runtime's backend moves
nothing, and its checks read the GPU's copy as before. An unmarked stream plays as before. Each
backend's report says which rule played on its "announced bytes" line, with the read-backs it
kept out. docs/REPLAY-STREAM.md takes the flags (section 1), the invariant (section 6) and the
player's rule (section 10).
Tests: a unit test of the flags (read alike in every segment, refused otherwise); rt_replay
device tests of one stream played marked and unmarked: a write of 5s announced, a fill of 9s
read back (a check sees the 9s), an announcement with no write after it, then a copy of the
buffer and checks: marked, the GPU's copy and the CPU's hold the stream's 5s; unmarked, the 9s
read back (the marked test fails on a player that ignores the flag). Check follows.