import io

p = 'NS23-W1-JIT.md'
s = io.open(p, encoding='utf-8').read()
anchor = "### Still to do"
add = """- **A THIRD defect, which my own tests EXPOSED rather than caused.**
  `a_second_poll_with_nothing_new_emits_nothing_and_the_first_was_not_empty` went red at
  `assert!(second.is_empty())`. Cause: seen-sets live under `perch::session_dir`, which reads
  `SPT_HOME`, and `crate::testutil::isolated_home()` retargets `SPT_HOME` **process-wide** for
  every test that takes the lock. Three tests in this module flushed a seen-set and reloaded it
  WITHOUT taking that lock, so a guard-holding test running in parallel could move the home
  between the flush and the reload — the keys were then "unseen" and the second poll rendered.
  Adding two more guard-holding tests widened the window until it fired. Fixed by giving all
  three (`a_second_poll_…`, `a_changed_state_…`, `a_new_session_has_seen_nothing`) the same
  guard — the mechanism `testutil.rs` documents as "one variable, one lock" (releases#111).
  **The red was a real latent race in the suite, not a defect in the new work**; it would have
  fired eventually on any future test that took the guard.

### Still to do"""
assert s.count(anchor) == 1
io.open(p, 'w', encoding='utf-8', newline='\n').write(s.replace(anchor, add))
print('ok')
