v0.2.2: the on-the-wire guard, a heal that cannot crash, the plan re-derived under the lock #4
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/appserver-send-v022"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v0.2.2 — the second read-only subagent's findings on v0.2.1
That report (on
ae3e69d, pinned to a git archive, 83/83 twice, every prior finding verified fixed) arrived minutes after v0.2.1 was merged; its three should-fixes and the nits are folded here.Should-fixes
delivered: true, onlyTimeout/Closed/OSErrorbecameack-unknown; any other exception (a non-object JSON frame during the ack wait, a non-objectresult/turn) fell to the generic handler →refused, reservation released, the caller resends. Now anon_wireflag makes EVERY failure after the requestack-unknown; replies are parsed defensively (a non-objectresultstill counts as acknowledged); the client skips non-object JSON frames; the verdict is set the moment the acknowledgement arrives, before anything else can fail.heal()could crash before itstry. The lock'smakedirs/os.openran unguarded: an unwritable state dir meant a traceback, no receipt line, a throttle reservation never released. Now the lock acquisition is guarded (heal-skipped,lock-unavailable:…, the send goes on through an open door), and the sender never dies without a receipt: an unexpected exception prints arefusedrow and gives the reservation back.failed/disabledmeanwhile would still be restarted; a unit someone else just started would be started again). Nowdecide(fresh)runs under the lock: disabled/failed → skipped (door-closed), the app appeared → skipped and the send answersheld-by-app, somebody started the unit (activating, or active and young) → wait instead of a second start, healed meanwhile →already-healed/door-open-now.Nits and follow-ups in this PR
thread not found(exactly) is the writer-lock verdict, no longer any "not found"; a bufferedturn/completedcounts only for a known turn id.wait_for_completionhonours notifications buffered during the ack wait.station.writers()takes the service pid (hermetic); fake server: EOF-safe length headers, close-before-ack, non-object JSON frame, non-object result; the fake systemctl also opens the door.doctornames the threads the shared server holds while the app runs in fallback mode and points atrelease(from the counter-proof on the owner's real app, 2026-10-28: the locked chat shows "open in another app",releaseheals in 658 ms, Retry brings the prompt back).release) and the bundled Codex app tools need a bridge in the shared server (the owner's requirement; design with Z).Tests
Suite 92 → 100 legs (green on every commit, three runs in a row on the last code change): closed-before-ack →
ack-unknown, garbage frame ignored, non-object result still delivered, lock unavailable → skipped + delivered, parallel door-closed heals start once (door-open-now), plan re-derived under the lock (app appeared →held-by-app; unit disabled →door-closed; unit activating →waited).Independent review
The subagent that wrote the findings verified
d66cad0on a frozen export: "delta clean", its three findings fixed and probed (non-object frame / string result → delivered with the mark kept; lock unavailable → skipped with a receipt;decide(fresh)under the lock), 100/100 twice; three nits remained and are folded in6543def. The later commits (819ceaatest relaxation,5ecdd97doctor hint + README,36222adREADME) carry no contract change. CI green on every commit (runs 13–17). Texts:v021-review/review-subagent-ae3e69d.md,review-subagent-v022-delta.mdin the evidence folder.🤖 Generated with Claude Code