fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)

refactor(coding-agent): harden session action races (#576) master

* refactor(coding-agent): harden session action races * fix(coding-agent): revalidate turn batches after commit fence acquisition * fix(coding-agent): reschedule pump after batch revalidation deferral * fix(coding-agent): restore cross-lane queue-key coalescing and compaction pending checks The underlying bugs originate in PR #573, but this fix lands at the stack head in PR #576 to avoid rebasing three dependent PRs immediately before release. * refactor(coding-agent): delete compensating scheduler state * fix(coding-agent): count only pending successors after compaction * fix(coding-agent): honor prompt abort during fence wait and fix compaction test await * test(coding-agent): remove flaky post-compaction continue regression The fake-timer event-await combination never completes under CI timing. The production change it covered (pending-successor counting after threshold compaction, 697fcf474) remains covered by the passing 'resumes after threshold compaction when only agent-level queued messages exist' test exercising the same projection. * fix(coding-agent): reject fence waiters on session disposal * fix(coding-agent): restore settlement, ordering, and idle guards Several fixes originate in #574/#575 but land at the stack head to avoid rebasing the whole chain. * fix(coding-agent): serialize injected admission with the commit fence * fix(coding-agent): release fence on admission failure and unify pause-aware admission * fix(coding-agent): stabilize waitForIdle event-queue wait and drop dead queue-key probe * fix(coding-agent): preserve batched action message order (fixes #576) * fix(coding-agent): revalidate commands after commit fence (fixes #576) --------- Co-authored-by: Alex Zhang <alex.lx.zhang@gmail.com>