Commit Graph
1 Commits
Author SHA1 Message Date
hoelee eaad2828fa gate_policy: read-modify-write the park counters (an owner edit must survive a running engine)
Measured 2026-10-11: an item parked at 2 rounds was released by the owner (park entry deleted) so it
could be retried at a lower crf - and the very next failure of ANOTHER item restored the entry, from
the stale in-memory snapshot of the engine that had loaded the file before the edit. The released
item was then SKIPped as parked. save_policy now re-reads the file and writes only the counters this
process bumped (POLICY_DIRTY), so a deleted park entry or an added accept entry survives.

Regression: scripts/test_policy_merge.py (4 checks: released item stays released, external accept
entry kept, counter reaches disk, and the old behaviour would have restored it).
2026-10-11 14:08:08 +08:00