mirror of
https://github.com/conorluddy/ios-simulator-skill.git
synced 2026-09-14 20:07:12 +08:00
fe99cee12d
Closes #81. The worker's auto-sample stash previously wrote auto_samples.json as a read-modify-write of an aggregate dict, with no locking. Under concurrent stashes (busy worker, many distinct fingerprints) one stash could clobber another's writes. Switch to auto_samples.jsonl: append-only, one record per line, fsync on each write. Mirrors the events.jsonl discipline. - SessionStore.stash_auto_sample(session_id, fingerprint, sample) — appends - SessionStore.read_auto_samples(session_id) — reduces last-write-wins per fp - HangBuster._stash_auto_sample now delegates to the store; no local I/O Tests: 5 new in tests/test_hang_sessions.py covering basic append, last-write-wins, missing-file, 50-thread concurrent stash, and corrupt-line skip. Verification: ruff/black clean; 93 passed (88 → 93).