A 2026-07-04 13-agent quality/correctness review of be/ (this beagle-ext branch @ 5ab7f838) found resource leaks in the git-wire PUSH path added by the landed GIT-019 receive-pack-session rework: after the FF gate, a throw in buildPushPack/send (or in pushSession's advert drain) never closes/reaps the receive-pack child (stdin+stdout fds, pid), so a persistent JSQUE jab loop accumulates fds and zombies. Two sites (post.js pushRemote, wire.js pushSession) plus one uncertain ulog.js reader-map item. JS-only (native wire is keeper/WIRECLI.c); method work. The same review re-found the still-OPEN JS-076/JS-085 leaks this branch also carries — tracked there, not here (see Blockers).
post.js:334-339 pushRemote: after the FF gate, wire.buildPushPack(...) (:334) then session.send(...) (:338) run with NO try/catch; every earlier exit closes the session (relate throw :311, eq refusal :318, non-FF :324 all session.close()), so a throw in buildPushPack/send skips cleanup — and the reap lives inside send/close, which never run → the child leaks.wire.js:571-599 pushSession: spawns git-receive-pack (:574), holds wfd/rfd/pid (:575), then drainRecvAdvert(reader,false) (:577) OUTSIDE any try — a pkt/advert parse throw there leaks wfd+rfd+pid (the returned send/close/reap never come into being); contrast advertRefs (:552-562) which drains inside try/finally that flush-closes wfd, closes rfd, reaps pid.ulog.js:42-48 each() (and the _withRO/_book readers): abc.mmap("ULOG", path, "r") is never abc.close'd; on the resident sweep path a leak would accumulate — UNCERTAIN: it hinges on whether abc.mmap read-maps auto-reclaim (io.mmap's finalizer is a proven no-op; abc.mmap's could not be read), and other in-tree read-maps (store.js packAt, ingest buildIndex) are left open by design.pushRemote and pushSession close+reap the receive-pack child on EVERY exit path (success + each throw), before propagating — no leaked fd, no zombie, no peer block.ulog.js reader-map question: if abc.mmap read-maps leak, wrap the readers in try/finally + abc.close; if they auto-reclaim, record that fact and drop the item.be; never touch beagle/ C.WIRECLI.c: close wfd, close rfd, then reap(pid); every close/reap guarded so a happy-path double-close is a no-op.pushSession: wrap spawn+drainRecvAdvert in try/catch that flush-closes wfd, closes rfd, reaps pid before rethrow — mirror advertRefs :555-562.pushRemote: wrap the post-FF-gate buildPushPack→send tail in try{…}catch(e){ if(session) session.close(); throw e } (session.close is the idempotent done-guarded reaper).ulog.js: fold the readers onto one _withRO(path, fn) that try/finally-closes, once abc.mmap reclamation is confirmed to need it.wire.buildPushPack (or session.send) to throw after the FF gate; assert the receive-pack child fds+pid are closed/reaped (no leaked fd, no zombie).pushRemote (post.js:290-343): guard the buildPushPack→send tail with session.close() on throw.pushSession (wire.js:571-599): wrap spawn+drainRecvAdvert in try/catch → close wfd/rfd + reap pid before rethrow.abc.mmap read-map reclamation; if it leaks, wrap ulog.js each/_withRO/_book readers in try/finally + abc.close (else record the finding and drop this item).wire.fetch leaks wfd (still live at wire.js:339-341 — finally closes rfd+pid only), and JS-085 log.js hand-rolled _packs()+pack.mmap loop never releases the maps (its rewrite to the public resolveHexAny API removes the leak). Neither is in jab log on 5ab7f838, so both are OPEN here.jab log, so 066/072/073/075/076/084/085 are all still live — a broader reconcile tracked under JS, not this ticket.pushSession/pushRemote; its hangup fix (flush-close on the advert-only path) is correct — this ticket is only the error-path cleanup it did not add.jab log | grep JS-100).