You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repeated GUI physical body recovery hits watchdog after several completed reattachments #2016
New required-gate failure during #1809 exact recovery-subset implementation, base c9ed17ce plus owned source WIP. Approved .scratch-recovery-subset-regrant-{command,results}.log, TRX jrowe_DAEMON_2026-12-03_23_39_31_net10.0.trx:36 executed/34 passed/2 failed. Both physical-parent-loss cases of ProductionBodyRecovery_RepeatedCanonicalRecoveryPreservesOriginalGraphAndExactFrozenReads hit the unchanged30000ms test watchdog. Both logical reconnect counterparts pass. Test deliberately performs24body revisions and6actual reattachments with real GUI history projection and exact frozen body checks.
The preceding #2015 unavailable-reference-retirement primary has a narrow authenticated regrant path implemented, not an authorization waiver. These two failures are now overall watchdog failures after multiple complete recoveries, not the former unavailable-reference exception. Stage logs reach revision19/fifth physical reconnect with replacement MAIN allowed to open. Triggering cause UNKNOWN: no proof yet of expected fixture budget versus stalled owner/reattach path. No timeout increase, reduction of original assertions/recoveries, blanket retry or success-shaped cleanup applied. Dedicated isolated read-only diagnosis requested before correction/retry. All original logs/evidence preserved; no whole qualification claim.
Isolated read-only diagnosis: variant-specific frontiers; cause remains unproved
Original evidence: designated worktree pf1117-1545, HEAD c9ed17ce plus owned WIP; .scratch-recovery-subset-regrant-{command,results}.log and actual Phantom.Workspaces.Tests\TestResults\jrowe_DAEMON_2026-12-03_23_39_31_net10.0.trx, run 3a44e004-c570-40ba-bcf1-418eed3d4b15: 36 executed / 34 passed / 2 failed. The generic scripts\test-results.log is a different, passing 14-row WebView run and is not evidence for these failures. Read current exact-subset/regrant implementation diff, the new acceptance and production fixture, reconnect lifecycle and original #2015 diagnosis. No target execution/retry.
Exact latest positive stage for EACH physical variant
Variant
Original TRX timing (-08:00)
Last positively established frontier
reverse:false, physical:true
start 23:40:21.5649806, end 23:40:51.5879611; reported duration 30.0076023s
Revision 19, fifth reconnect: body mutation returned; actual previous listener owner retired; projection-capacity wait and replay-gap assertion completed; replacement-MAIN gate released; last output production recovery: replacement main may open.
reverse:true, physical:true
start 23:40:58.7499577, end 23:41:28.7554712; duration 30.0050958s
Revision 11, third reconnect: same completed stages through production recovery: replacement main may open. Not revision 19/fifth reconnect.
For HTTP, earlier reconnects at revisions 3/7/11/15 logged chat connected, admitted-frame drain and canonical projection complete; advancing through revision 19 proves graph/reference drains and all per-revision zero-recovery-owner/original-model/original-slot assertions completed through revision 18. For reverse, reconnects at 3/7 have those receipts, and the same per-revision assertions completed through revision 10. These are control-flow deductions from the actual receipts and source, not a count-based assumption that all recoveries succeeded.
At each final attempt the record includes listener-owner disposal entered/completed, actual owner retired, mutations admitted, client MAIN disconnected and observe-agent-session-restart open. Neither row then records replacement feature-discovery/attach open, chat connected, connected/frame/canonical drain completion, or that revision's graph/reference drains enter. Frozen reads (after all 24 revisions), promotion and final graph assertions are not reached in the captured execution frontier.
What this proves, and what it does NOT
RemoteCanonicalProductionRecoveryTests.cs:795-810 awaits actual previous.Retired, mutation/projection admission, forces a replay gap, releases nextOpen, then awaits the fixture's connected.Task. Its callback requires remote.IsConnected plus an increased MAIN connection count. The last receipt therefore locates the last observed incomplete fixture operation at the replacement-connected wait, after previous listener-owner retirement, not inside the previous-owner-disposal await. NativeToolBodySnapshotScenario.cs:261-273 has not yet returned from that reconnect into its explicit admitted-frame/canonical drains.
The wire logs independent open ...before its attach gate (RemoteCanonicalControlRecoveryTests.cs:1158-1183). Consequently gate release is not proof that replacement MAIN opened, and the missing final discovery/attach receipts cannot be explained as a logged attach merely still waiting behind that gate. An observe-agent-session-restart open receipt establishes entry only, not its response, reader completion, channel disposal or return to automatic reconnect.
Both TRXs report only Test execution timed out after 30000 milliseconds, with no useful suspended stack, stderr or PRIMARY before cleanup receipt. This is the whole Avalonia test invocation budget, encompassing production setup, GUI attach/hydration, all revisions/recoveries/drains/read assertions and cleanup; it is not a measured 30-second timeout of owner retirement, canonical rehydration, or physical reattach. The 240-second runner partition watchdog did not fire. TRX classifies these as failed rows (its timeout counter is zero); neither that counter nor the failure text identifies a blocked task.
There are no per-stage elapsed timestamps. It is therefore unknown whether the final connected wait was briefly entered at overall deadline, genuinely stalled, abandoned following a completed/faulted reconnect owner, or waiting on restart observation/transport lifecycle. Source inspection shows automatic reconnect can await restart observation before opening replacement MAIN (RemoteAgentChat.cs:751-775); ReconnectNowAsync:709-748 also captures recovery retirement and waits for projection before publishing connected. The original evidence does not identify which internal await/state actually applied. A prior source recovery receipt is not a snapshot of all later retirement tasks. No owner leak, publication deadlock, rehydration stall, deficient fixture budget or transport bug is causally established by these artifacts.
The logical counterparts passed in 3.8359835s (HTTP) and 3.2765009s (reverse), but their transport-lifecycle work differs. Those passes neither prove the physical cases fit 30 seconds nor prove that physical failure is an inherited defect.
The owned changes directly touch exact recovery-reference subsets/publication receipts, per-operation canonical retirement and snapshot restoration, and authenticated reference-retirement regrant. This acceptance exercises those paths. Do not classify as unrelated without an independent mechanism; branch overlap also does not prove a specific regression. Attribution remains undetermined / retained in current-change qualification scope.
#2015's actual earlier report was unavailable signed reference retirement collected during cleanup, followed by disconnected origin retirement, with the primary obscured. These originals instead report a framework watchdog after the positive stages above, with no captured unavailable-reference exception. The new narrow tool-reference-attachment-lost handling and successful earlier iterations do not establish that #2015 caused these timeouts, nor that all retirement paths are correct. Do not merge the causes.
Exact missing observations for the exclusive owner
Monotonic entered/completed/faulted/cancelled timestamps from test start for setup, GUI hydration, every mutation/reconnect/drain, frozen reads, promotion and cleanup, especially release-gate-to-deadline elapsed time. Required to separate cumulative budget exhaustion from a sustained stall.
At the final loss: completion/state/error of the owned reconnect task and requested/owner state; restart-observation open/read/result/EOF/disposal/return; reconnect eligibility/deadline and retry attempt; feature-discovery entry/exit, MAIN open/admission, first replacement frame, connection-count change and connected callback. Required to distinguish no replacement attempt from an admitted-but-unpublished replacement or a failed/terminated reconnect whose fixture completion remains pending.
Correlated states of old/current canonical recovery and captured retirement operation, cancellation and published/applied frontiers, admitted-frame/projection tasks, actual body binding MAIN-loss/regrant generation, exact reference/recovery-owner counts, outstanding publication receipts and retirement outcomes. These hooks are not recorded in the original artifacts; their mere presence in source is not evidence of their runtime values.
First primary and each cleanup failure, preserved independently; final frozen-read/promotion completion receipts. No such completion may be inferred from this method's name or intended loop count.
These are observations needed for a future separately authorized owner run, not an execution request or proposed fix. Keep the 30,000ms watchdog, all 24 revisions / 6 recoveries, exact frozen reads, identity/ownership assertions, authentication and drains unchanged. No timeout increase, workload reduction, blanket retry or error suppression is supported.
Evidence SHA256: original TRX 5B2A13EC658C8723A81C90338E8AB66A7BBB6DC0172E76BCA51CE62E5AE3B7B2; original results log ACD5A91E8F553403F812FF464EC0C9CD2575FE4D141A35CD923E7CDBD724DA85.
No source/index/skills/tracker-body edits, builds/tests, application/debugger launches, private data/other-worktree access, dump operations, .gitignore changes or retries. Only read-only inspection and this requested diagnosis comment; exclusive source/build ownership remains elsewhere.
Read-only follow-up: completed reconnect owner, with a pre-cleanup terminalization mechanism
Actual approved run, not a new execution by this diagnosis:pf1117-1545, source d70b7d53ef2a91f5b719d81fc1dd90476970eefd plus exactly the two additive diagnostics in NativeToolBodySnapshotScenario.cs (elapsed wire receipts) and RemoteCanonicalProductionRecoveryTests.cs (await actual disconnect, then surface the completed reconnect owner). Evidence: .scratch-recovery-subset-owner-trace-{command,results}.log; Phantom.Workspaces.Tests\TestResults\jrowe_DAEMON_2026-12-03_23_49_41_net10.0.trx, run f1983016-1ef9-4c0c-8df8-4bfffc5a1aa4: 4 executed / 1 passed / 3 failed. The original 24 revisions, six recoveries, exact frozen-body equality, identity/reference assertions and 30,000ms watchdog remain in source.
Variant
Actual TRX duration
Last attempted recovery / positive frontier
HTTP, physical=true
9.1492570s, failed
Revision 11, third recovery; actual listener owner retired/client disconnected at ~8539ms; replacement gate released at 8709ms; completed reconnect owner assertion, no new discovery/attach for this final attempt. Earlier recoveries at 3 and 7 completed.
HTTP, physical=false
3.5743827s, failed
Revision 7, second recovery; actual listener owner retired/client disconnected at ~3167ms; gate released at 3411ms; same completed-owner assertion, no final discovery/attach. Recovery at 3 completed.
Reverse, physical=true
2.6952197s, failed
Revision 7, second recovery; actual listener owner retired/client disconnected at ~2401ms; gate released at 2549ms; same completed-owner assertion, no final discovery/attach. Recovery at 3 completed.
Reverse, physical=false
4.9959770s, passed
This row passed the unchanged whole acceptance, including all 24 revisions/six recoveries and frozen reads/promotion. Not a qualification of the other variants.
Elapsed values above are the fixture stopwatch's wire receipts, not separately measured await durations. The failed rows now record PRIMARY before cleanup: The actual reconnect owner completed without connecting its replacement MAIN. They are not watchdog failures. Failed rows do not reach the final frozen-read/promotion checks.
Important fixture distinction: the two HTTP labels do not establish two different loss mechanisms here. NativeToolBodySnapshotScenario does not enable ReuseMainTransport. ProductionRecoveryFixture.ReconnectAsync:786-797 chooses physical-vs-logical disposal only for reverse; HTTP calls wire.AbortMain() for either value unless ReuseMainTransport was explicitly enabled. Thus both HTTP rows exercise socket abort in this scenario. Do not infer a reproduced true shared-socket logical-HTTP failure from the parameter label.
Established causal chain: not merely an exception manufactured by cleanup
The stored MAIN pump error contains both processing failure and carrier-retirement failure. HTTP's inner path is HttpTransport.RecoverAsync:120 -> SendFrameAsync:219 -> RetirementLossSocket.SendAsync:1338 -> actual WebSocket send, failing on an Aborted socket (physical=true) or disposed ClientWebSocket (physical=false). ChannelRecoveryControlSends.RunAsync:219 faults its tracked send; channel RetireAsync:109 joins and preserves that fault. The logical close write is not the captured failing send.
RemoteAgentSessionClient.PumpAsync:845-854 closes its recovery-carrier generation and awaits actual channel disposal before publishing disconnect. If disposal faults, it combines the processing/retirement errors, sets terminal = true, and stops replacement-carrier waits. Only afterward (:857-873) does it clear the current channel, skip establishing a reconnect deadline because terminal is true, publish UnexpectedlyDisconnected, then fault the pump task.
ReconnectAsync:405-408 explicitly rejects a terminal client (also a missing/expired deadline). RemoteAgentChat.ReconnectAfterLossAsync:775-793 treats InvalidOperationException as an end to automatic reconnect; CompleteReconnectAfterLossAsync:677-695 can consequently complete its owned task successfully without connecting. The fixture now exposes that completed owner instead of waiting indefinitely on connected.Task.
Cleanup later takes RetireToolBodyOriginAsync's terminal path, calls CloseChannelAsync, and awaits the already-failed pump, explaining why the TRX's top-level error is Production recovery fixture cleanup failed. The same pump's terminal-retirement branch necessarily ran before its disconnect notification; there is no replacement MAIN in between to substitute a later pump. This is a source-order/recorded-stack causal deduction, not an assumption that every cleanup error was primary.
Conclusion: the captured carrier-retirement send failure is a sufficient, pre-cleanup cause of permanent reconnect ineligibility in all three failures. It is not cleanup-only noise. The run does not expose the exact internal exception caught by the automatic reconnect loop, so it does not prove that no additional canonical-retirement failure also contributed before that loop returned.
Reverse physical variant is the same lifecycle problem, not an HTTP exception-name guess
Its inner send failure is specifically ReverseHttpMessageChannel.RecoverAsync:395: after awaiting actual recovery admission, the code sees owner.transportEnded != 0 and deliberately throws TransportReceiveInterruptedException(EndOfStreamException("The reverse relay ended."))before the registration CONTROL write. ChannelRecoveryControlSends retains it; reverse channel RetireAsync:468 faults its send drain; MAIN pump takes the identical terminal-retirement branch. This is direct evidence of a known-ended physical relay being converted into a terminal session through the send/drain contract, not evidence of failed authorization or a negative retirement receipt.
Ownership contract and correct fix boundary
ChannelRecoveryControlSends currently uses one sticky task for two different facts: local send-owner completion and successful CONTROL transmission. Close() stops new sends and returns that task; even an already-completed failed write poisons carrier disposal. This correctly prevents abandoning admitted sends, but equating every transport-delivery failure with failed logical/session retirement is wrong for recoverable physical loss.
There are distinct ownership planes which a fix must preserve:
Carrier/local I/O: stop admission atomically with physical termination, join every previously admitted send (including blocked/pre-admission reverse sends), and do not release transport resources while those owners still execute. Merely marking transportEnded, closing pending request waiters, completing CarrierEnded, or observing socket EOF is not that join. HTTP parent retirement currently disposes socket/read/keepalive/send-lock without joining the channels' tracked CONTROL sends; reverse parent retirement awaits its read loop, not those channel-send owners. HTTP's existing reader-before-control-waiter ordering does not cover the blocked/in-flight-send race.
CONTROL delivery/result: a proven physical delivery interruption must remain an explicit failed exchange, with its operation ID and provenance, separate from the local drain-completed result. Close exact attachment-bound waiters; retain the established exact-ID rejoin rules for generic recovery operations. Do not advertise a reply, successful command, or retired allocation because a write stopped.
Logical/native authority: signed allocation owner retirement, validated retirement receipts, canonical publication/model/native barriers and body reference/origin release remain separately required. AcknowledgedChannelLifetime still requires its actual receipt/confirmed authority; ChannelRecoveryControlClient.RequestAsync explicitly says a send failure does not establish server-allocation retirement. The previous observed MAIN listener's disposal is not proof that every independent signed query or CONTROL owner drained.
Lifecycle fix to implement only in the exclusive owner's scope: make physical-close/send-admission and actual local send-drain ownership explicit in both HTTP and reverse, carrying a distinct, proven physical-delivery-loss outcome instead of promoting it to an undifferentiated retirement-integrity exception. MAIN may retain reconnect eligibility only after that local drain is actually complete and the outcome is known to be carrier loss; existing logical recovery/regrant must still obtain its genuine authority/receipts on the newly authenticated carrier. Any non-transport send error, actual failed owner drain, authorization rejection, invalid receipt or native/publication failure must remain fatal/observable. A catch (WebSocketException/IOException/ObjectDisposedException) around disposal, returning success from faulted sends, removing the await writes, or deleting the pump's terminal-retirement handling wholesale would violate this contract. No blanket retries or timeout increase.
This identifies the required separation, not a proven one-line patch. Current artifacts do not log the failing CONTROL's type/ID, all send admission/completion ordering, or every remote owner's result; those cannot be reconstructed from the shared send stack. MAIN admission credit is a concrete candidate (AgentSessionMainDeliveryReceiver.AcknowledgeAsync sends after frame admission and races CarrierEnded), not an established initiating operation.
Precise remaining observation / regression gate for the owner
Correlate attachment/channel generation, CONTROL operation ID/type/bank, request admission, send entry/completion/failure, physical-end transition and parent/channel drain completion. Record the original physical outcome separately from non-transport errors. For HTTP distinguish a send admitted before abort from one admitted after termination, and queue/send-lock versus actual socket entry. For reverse distinguish a blocked recovery-admission continuation from a request racing the ended flag. Record terminal, deadline and the exact reconnect-loop exit exception before cleanup.
Deterministically hold a CONTROL send across actual physical abort/parent retirement for both transports, including reverse before recovery admission. Prove disposal does not finish before the held local owner completes, no post-close send enters, old replies cannot reach replacement generations, and a physically interrupted exchange never becomes a retirement receipt. Keep the existing live-carrier admitted-write/cancelled exact-ID-rejoin coverage. The current HTTP PhysicalLoss_MarksMainEndedBeforeFailingControlWaitersAndAdmittingTheirRetirement test waits until server controls entered; it does not exercise a held outbound write at loss.
Inject a non-transport send/drain fault and a rejected/mismatched retirement/authentication result independently; each must still propagate and must not qualify as recoverable physical loss. Retain the real native/publication receipt barrier and assert it cannot be bypassed by parent EOF. Then run the unchanged acceptance with all 24 revisions/six reattachments/exact frozen reads/identity/reference checks under the same 30s watchdog; separately exercise true logical HTTP with explicit shared-parent reuse rather than relying on this row's physical=false label.
Attribution remains in current-change qualification scope; no baseline execution or proof of independence supports unrelated. The exact-subset/regrant commit itself does not change the inspected transport/client lifecycle files; that alone does not establish when the race was introduced. #1979 is an existing server-side missing admitted-carrier report, not this run's established client-side failure. No conclusion is imported from #2011, and no older unknown case is declared solved or merged with this cause.
Request-correlated observation .scratch-2016-control-identity-observed-* (TRX00_24_55,4/1/3) identifies the actual failing bank, not a guess: attachment-bound MAIN DeliveryCredit. HTTP operation a3199d90-7008-48de-8669-eea51535b8dc on78428ae1-a9c6-4798-b1d2-14782e18a865 hit aborted-socket write; other HTTP operation1e46c65a-5fa3-4bf2-b973-69e5fe936494 hit disposed socket. Reverse operation b2b24c79-c5fe-4c9c-a582-68ce88db8e77 hit actual ended-relay guard. Write-owner enter/completion/drain and physical-end traces precede PRIMARY-before-cleanup; cleanup is not the initiating transport loss.
Only physically evidenced attachment-bound credit write failures get a distinct failed-exchange marker. Carrier disposition can identify that exact exchange/carrier only AFTER all admitted local writers have joined. Original failed exchange remains failed; no ACK/result/retired allocation is synthesized. Parent physical termination closes send admission; it joins writers before resource release. HTTP input-close masks late unowned replies but retains the carrier's actual writer ownership until drain. Reverse reader faults still join writer owners and preserve both failures. Empty aggregates, nontransport writers and foreign-token cancellation cannot establish physical credit loss. Current auth/integrity errors and signed allocation/native receipts remain required/fatal.
One later run20/19/1 (TRX00_52_21) exposed ManagedWebSocket.SendFrameLockAcquiredNonCancelableAsync wrapping disposed NetworkStream as OCE. Public.NET10 source verifies that noncancelable wrapper uses default token (old token field itself wasn't serialized): https://github.com/dotnet/runtime/blob/v10.0.0/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs#L530-L537 and#L1714-L1720. Guard is only actual socket-write, CONTROL, supplied token noncancelable, exception token EXACTLY same, socket Aborted/Closed. Before-send callbacks stay outside classification; foreign-token negative test remains fatal. No generic cancellation/IO/disposal catch-as-success.
Associated server2017 is distinct: globally admitted queued reply did not own per-carrier drain yet; now reservation occurs before queueing. Genuinely late closed-carrier credit gets explicit matched failed exchange, not fabricated successful ACK. Other banks/authorization failures are not recoverable by that code.
Current-head1f9 receipts:50targeted transport incl original buffered-close contracts,30core exact credit receipt/body authority/durability,14native body equality/copy/inspection/original owners. Current required held+interrupted run49/41/8FAILED (TRX01_33_41) remains red:8mock-negotiation prerequisites in2008, not reached intended faults; no waiver. Includes actual real-GUI4variants24versions/sixrecoveries, held subset/native/read/control/lost-allocation and real persisted authority/cancellation cases among41passes. Final-source approved50x10 PASS; final-source6GUI/subset x10 still in progress at this comment. Older37x10/6x10 at2a3ebb7a are separate receipts. All failures/logs/TRXs preserved, original watchdogs/assertions retained.
Source inspection/review also found and corrected actual drain ownership edge races (logical-closed HTTP carrier removed before its writer done; reverse reader fault skipped writer await), each deterministic regression. This is not a clean-context whole-fix verification/checkin or resolution of older2011 masked cleanup causes/2005extra-command identity. Full382/357/25FAILED stays a69f20f3, not current HEAD. No integration/release/closure.
Final receipt update: approved FINAL1f9bf7f0 six-case actual GUI/subset recovery stability completed6x10 ALL PASS (.scratch-2016-final-committed-recovery-stability10-command.log), original24changes/sixrecoveries/30000ms watchdog/full frozen equality/original graph+promotion owners retained. Final transport50x10 ALL PASS, core30/native14pass. Required49/41/8FAILED is still current, not overwritten by these greens. Mock-root passing cases are not a substitute for proving the missing negotiated fault/interrupt paths. No full recovery/release claim or issue closure.
Activity
JoshuaRowePhantom commentedon Dec 4, 2026
Isolated read-only diagnosis: variant-specific frontiers; cause remains unproved
Original evidence: designated worktree
pf1117-1545, HEADc9ed17ceplus owned WIP;.scratch-recovery-subset-regrant-{command,results}.logand actualPhantom.Workspaces.Tests\TestResults\jrowe_DAEMON_2026-12-03_23_39_31_net10.0.trx, run3a44e004-c570-40ba-bcf1-418eed3d4b15: 36 executed / 34 passed / 2 failed. The genericscripts\test-results.logis a different, passing 14-row WebView run and is not evidence for these failures. Read current exact-subset/regrant implementation diff, the new acceptance and production fixture, reconnect lifecycle and original #2015 diagnosis. No target execution/retry.Exact latest positive stage for EACH physical variant
reverse:false, physical:true23:40:21.5649806, end23:40:51.5879611; reported duration30.0076023sproduction recovery: replacement main may open.reverse:true, physical:true23:40:58.7499577, end23:41:28.7554712; duration30.0050958sproduction recovery: replacement main may open. Not revision 19/fifth reconnect.For HTTP, earlier reconnects at revisions 3/7/11/15 logged
chat connected, admitted-frame drain andcanonical projection complete; advancing through revision 19 proves graph/reference drains and all per-revision zero-recovery-owner/original-model/original-slot assertions completed through revision 18. For reverse, reconnects at 3/7 have those receipts, and the same per-revision assertions completed through revision 10. These are control-flow deductions from the actual receipts and source, not a count-based assumption that all recoveries succeeded.At each final attempt the record includes listener-owner disposal entered/completed, actual owner retired, mutations admitted, client MAIN disconnected and
observe-agent-session-restartopen. Neither row then records replacement feature-discovery/attach open,chat connected, connected/frame/canonical drain completion, or that revision'sgraph/reference drains enter. Frozen reads (after all 24 revisions), promotion and final graph assertions are not reached in the captured execution frontier.What this proves, and what it does NOT
RemoteCanonicalProductionRecoveryTests.cs:795-810awaits actualprevious.Retired, mutation/projection admission, forces a replay gap, releasesnextOpen, then awaits the fixture'sconnected.Task. Its callback requiresremote.IsConnectedplus an increased MAIN connection count. The last receipt therefore locates the last observed incomplete fixture operation at the replacement-connected wait, after previous listener-owner retirement, not inside the previous-owner-disposal await.NativeToolBodySnapshotScenario.cs:261-273has not yet returned from that reconnect into its explicit admitted-frame/canonical drains.The wire logs
independent open ...before its attach gate (RemoteCanonicalControlRecoveryTests.cs:1158-1183). Consequently gate release is not proof that replacement MAIN opened, and the missing final discovery/attach receipts cannot be explained as a logged attach merely still waiting behind that gate. Anobserve-agent-session-restartopen receipt establishes entry only, not its response, reader completion, channel disposal or return to automatic reconnect.Both TRXs report only
Test execution timed out after 30000 milliseconds, with no useful suspended stack, stderr orPRIMARY before cleanupreceipt. This is the whole Avalonia test invocation budget, encompassing production setup, GUI attach/hydration, all revisions/recoveries/drains/read assertions and cleanup; it is not a measured 30-second timeout of owner retirement, canonical rehydration, or physical reattach. The 240-second runner partition watchdog did not fire. TRX classifies these as failed rows (itstimeoutcounter is zero); neither that counter nor the failure text identifies a blocked task.There are no per-stage elapsed timestamps. It is therefore unknown whether the final connected wait was briefly entered at overall deadline, genuinely stalled, abandoned following a completed/faulted reconnect owner, or waiting on restart observation/transport lifecycle. Source inspection shows automatic reconnect can await restart observation before opening replacement MAIN (
RemoteAgentChat.cs:751-775);ReconnectNowAsync:709-748also captures recovery retirement and waits for projection before publishing connected. The original evidence does not identify which internal await/state actually applied. A prior source recovery receipt is not a snapshot of all later retirement tasks. No owner leak, publication deadlock, rehydration stall, deficient fixture budget or transport bug is causally established by these artifacts.The logical counterparts passed in
3.8359835s(HTTP) and3.2765009s(reverse), but their transport-lifecycle work differs. Those passes neither prove the physical cases fit 30 seconds nor prove that physical failure is an inherited defect.Attribution and separation from #2015
The owned changes directly touch exact recovery-reference subsets/publication receipts, per-operation canonical retirement and snapshot restoration, and authenticated reference-retirement regrant. This acceptance exercises those paths. Do not classify as unrelated without an independent mechanism; branch overlap also does not prove a specific regression. Attribution remains undetermined / retained in current-change qualification scope.
#2015's actual earlier report was unavailable signed reference retirement collected during cleanup, followed by disconnected origin retirement, with the primary obscured. These originals instead report a framework watchdog after the positive stages above, with no captured unavailable-reference exception. The new narrow
tool-reference-attachment-losthandling and successful earlier iterations do not establish that #2015 caused these timeouts, nor that all retirement paths are correct. Do not merge the causes.Exact missing observations for the exclusive owner
These are observations needed for a future separately authorized owner run, not an execution request or proposed fix. Keep the 30,000ms watchdog, all 24 revisions / 6 recoveries, exact frozen reads, identity/ownership assertions, authentication and drains unchanged. No timeout increase, workload reduction, blanket retry or error suppression is supported.
Evidence SHA256: original TRX
5B2A13EC658C8723A81C90338E8AB66A7BBB6DC0172E76BCA51CE62E5AE3B7B2; original results logACD5A91E8F553403F812FF464EC0C9CD2575FE4D141A35CD923E7CDBD724DA85.No source/index/skills/tracker-body edits, builds/tests, application/debugger launches, private data/other-worktree access, dump operations, .gitignore changes or retries. Only read-only inspection and this requested diagnosis comment; exclusive source/build ownership remains elsewhere.
JoshuaRowePhantom commentedon Dec 4, 2026
Read-only follow-up: completed reconnect owner, with a pre-cleanup terminalization mechanism
Actual approved run, not a new execution by this diagnosis:
pf1117-1545, sourced70b7d53ef2a91f5b719d81fc1dd90476970eefdplus exactly the two additive diagnostics inNativeToolBodySnapshotScenario.cs(elapsed wire receipts) andRemoteCanonicalProductionRecoveryTests.cs(await actual disconnect, then surface the completed reconnect owner). Evidence:.scratch-recovery-subset-owner-trace-{command,results}.log;Phantom.Workspaces.Tests\TestResults\jrowe_DAEMON_2026-12-03_23_49_41_net10.0.trx, runf1983016-1ef9-4c0c-8df8-4bfffc5a1aa4: 4 executed / 1 passed / 3 failed. The original 24 revisions, six recoveries, exact frozen-body equality, identity/reference assertions and 30,000ms watchdog remain in source.Elapsed values above are the fixture stopwatch's wire receipts, not separately measured await durations. The failed rows now record
PRIMARY before cleanup: The actual reconnect owner completed without connecting its replacement MAIN.They are not watchdog failures. Failed rows do not reach the final frozen-read/promotion checks.Important fixture distinction: the two HTTP labels do not establish two different loss mechanisms here.
NativeToolBodySnapshotScenariodoes not enableReuseMainTransport.ProductionRecoveryFixture.ReconnectAsync:786-797chooses physical-vs-logical disposal only for reverse; HTTP callswire.AbortMain()for either value unlessReuseMainTransportwas explicitly enabled. Thus both HTTP rows exercise socket abort in this scenario. Do not infer a reproduced true shared-socket logical-HTTP failure from the parameter label.Established causal chain: not merely an exception manufactured by cleanup
HttpTransport.RecoverAsync:120 -> SendFrameAsync:219 -> RetirementLossSocket.SendAsync:1338 -> actual WebSocket send, failing on an Aborted socket (physical=true) or disposed ClientWebSocket (physical=false).ChannelRecoveryControlSends.RunAsync:219faults its tracked send; channelRetireAsync:109joins and preserves that fault. The logical close write is not the captured failing send.RemoteAgentSessionClient.PumpAsync:845-854closes its recovery-carrier generation and awaits actual channel disposal before publishing disconnect. If disposal faults, it combines the processing/retirement errors, setsterminal = true, and stops replacement-carrier waits. Only afterward (:857-873) does it clear the current channel, skip establishing a reconnect deadline because terminal is true, publishUnexpectedlyDisconnected, then fault the pump task.ReconnectAsync:405-408explicitly rejects a terminal client (also a missing/expired deadline).RemoteAgentChat.ReconnectAfterLossAsync:775-793treatsInvalidOperationExceptionas an end to automatic reconnect;CompleteReconnectAfterLossAsync:677-695can consequently complete its owned task successfully without connecting. The fixture now exposes that completed owner instead of waiting indefinitely onconnected.Task.RetireToolBodyOriginAsync's terminal path, callsCloseChannelAsync, and awaits the already-failed pump, explaining why the TRX's top-level error isProduction recovery fixture cleanup failed. The same pump's terminal-retirement branch necessarily ran before its disconnect notification; there is no replacement MAIN in between to substitute a later pump. This is a source-order/recorded-stack causal deduction, not an assumption that every cleanup error was primary.Conclusion: the captured carrier-retirement send failure is a sufficient, pre-cleanup cause of permanent reconnect ineligibility in all three failures. It is not cleanup-only noise. The run does not expose the exact internal exception caught by the automatic reconnect loop, so it does not prove that no additional canonical-retirement failure also contributed before that loop returned.
Reverse physical variant is the same lifecycle problem, not an HTTP exception-name guess
Its inner send failure is specifically
ReverseHttpMessageChannel.RecoverAsync:395: after awaiting actual recovery admission, the code seesowner.transportEnded != 0and deliberately throwsTransportReceiveInterruptedException(EndOfStreamException("The reverse relay ended."))before the registration CONTROL write.ChannelRecoveryControlSendsretains it; reverse channelRetireAsync:468faults its send drain; MAIN pump takes the identical terminal-retirement branch. This is direct evidence of a known-ended physical relay being converted into a terminal session through the send/drain contract, not evidence of failed authorization or a negative retirement receipt.Ownership contract and correct fix boundary
ChannelRecoveryControlSendscurrently uses one sticky task for two different facts: local send-owner completion and successful CONTROL transmission.Close()stops new sends and returns that task; even an already-completed failed write poisons carrier disposal. This correctly prevents abandoning admitted sends, but equating every transport-delivery failure with failed logical/session retirement is wrong for recoverable physical loss.There are distinct ownership planes which a fix must preserve:
transportEnded, closing pending request waiters, completingCarrierEnded, or observing socket EOF is not that join. HTTP parent retirement currently disposes socket/read/keepalive/send-lock without joining the channels' tracked CONTROL sends; reverse parent retirement awaits its read loop, not those channel-send owners. HTTP's existing reader-before-control-waiter ordering does not cover the blocked/in-flight-send race.AcknowledgedChannelLifetimestill requires its actual receipt/confirmed authority;ChannelRecoveryControlClient.RequestAsyncexplicitly says a send failure does not establish server-allocation retirement. The previous observed MAIN listener's disposal is not proof that every independent signed query or CONTROL owner drained.Lifecycle fix to implement only in the exclusive owner's scope: make physical-close/send-admission and actual local send-drain ownership explicit in both HTTP and reverse, carrying a distinct, proven physical-delivery-loss outcome instead of promoting it to an undifferentiated retirement-integrity exception. MAIN may retain reconnect eligibility only after that local drain is actually complete and the outcome is known to be carrier loss; existing logical recovery/regrant must still obtain its genuine authority/receipts on the newly authenticated carrier. Any non-transport send error, actual failed owner drain, authorization rejection, invalid receipt or native/publication failure must remain fatal/observable. A
catch (WebSocketException/IOException/ObjectDisposedException)around disposal, returning success from faulted sends, removing theawait writes, or deleting the pump's terminal-retirement handling wholesale would violate this contract. No blanket retries or timeout increase.This identifies the required separation, not a proven one-line patch. Current artifacts do not log the failing CONTROL's type/ID, all send admission/completion ordering, or every remote owner's result; those cannot be reconstructed from the shared send stack. MAIN admission credit is a concrete candidate (
AgentSessionMainDeliveryReceiver.AcknowledgeAsyncsends after frame admission and racesCarrierEnded), not an established initiating operation.Precise remaining observation / regression gate for the owner
terminal, deadline and the exact reconnect-loop exit exception before cleanup.PhysicalLoss_MarksMainEndedBeforeFailingControlWaitersAndAdmittingTheirRetirementtest waits until server controls entered; it does not exercise a held outbound write at loss.physical=falselabel.Attribution remains in current-change qualification scope; no baseline execution or proof of independence supports
unrelated. The exact-subset/regrant commit itself does not change the inspected transport/client lifecycle files; that alone does not establish when the race was introduced. #1979 is an existing server-side missing admitted-carrier report, not this run's established client-side failure. No conclusion is imported from #2011, and no older unknown case is declared solved or merged with this cause.Evidence SHA256: results
7F9500B7FB6E2AF390995271249DBDD2AF50A5001943CCA6277320ABE90190F8; TRXFAADA82E4512E6D83ECAAC078611387A1ABA16629DECCE88C154F886CFF53B49.Read-only source/artifact inspection only. No source/index/skill edits, builds/tests/retries, application/debugger launches, private-data inspection or dump changes. Exclusive implementation/build ownership remains elsewhere.
JoshuaRowePhantom commentedon Dec 4, 2026
Causal correction committed (NOT issue closure/whole release) through1f9bf7f0be104170a76f7b9207029580815f8e13, actual phantom ref verified. Earlier commits2a3ebb7a/d077dfe3.
Request-correlated observation .scratch-2016-control-identity-observed-* (TRX00_24_55,4/1/3) identifies the actual failing bank, not a guess: attachment-bound MAIN DeliveryCredit. HTTP operation a3199d90-7008-48de-8669-eea51535b8dc on78428ae1-a9c6-4798-b1d2-14782e18a865 hit aborted-socket write; other HTTP operation1e46c65a-5fa3-4bf2-b973-69e5fe936494 hit disposed socket. Reverse operation b2b24c79-c5fe-4c9c-a582-68ce88db8e77 hit actual ended-relay guard. Write-owner enter/completion/drain and physical-end traces precede PRIMARY-before-cleanup; cleanup is not the initiating transport loss.
Only physically evidenced attachment-bound credit write failures get a distinct failed-exchange marker. Carrier disposition can identify that exact exchange/carrier only AFTER all admitted local writers have joined. Original failed exchange remains failed; no ACK/result/retired allocation is synthesized. Parent physical termination closes send admission; it joins writers before resource release. HTTP input-close masks late unowned replies but retains the carrier's actual writer ownership until drain. Reverse reader faults still join writer owners and preserve both failures. Empty aggregates, nontransport writers and foreign-token cancellation cannot establish physical credit loss. Current auth/integrity errors and signed allocation/native receipts remain required/fatal.
One later run20/19/1 (TRX00_52_21) exposed ManagedWebSocket.SendFrameLockAcquiredNonCancelableAsync wrapping disposed NetworkStream as OCE. Public.NET10 source verifies that noncancelable wrapper uses default token (old token field itself wasn't serialized): https://github.com/dotnet/runtime/blob/v10.0.0/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs#L530-L537 and#L1714-L1720. Guard is only actual socket-write, CONTROL, supplied token noncancelable, exception token EXACTLY same, socket Aborted/Closed. Before-send callbacks stay outside classification; foreign-token negative test remains fatal. No generic cancellation/IO/disposal catch-as-success.
Associated server2017 is distinct: globally admitted queued reply did not own per-carrier drain yet; now reservation occurs before queueing. Genuinely late closed-carrier credit gets explicit matched failed exchange, not fabricated successful ACK. Other banks/authorization failures are not recoverable by that code.
Current-head1f9 receipts:50targeted transport incl original buffered-close contracts,30core exact credit receipt/body authority/durability,14native body equality/copy/inspection/original owners. Current required held+interrupted run49/41/8FAILED (TRX01_33_41) remains red:8mock-negotiation prerequisites in2008, not reached intended faults; no waiver. Includes actual real-GUI4variants24versions/sixrecoveries, held subset/native/read/control/lost-allocation and real persisted authority/cancellation cases among41passes. Final-source approved50x10 PASS; final-source6GUI/subset x10 still in progress at this comment. Older37x10/6x10 at2a3ebb7a are separate receipts. All failures/logs/TRXs preserved, original watchdogs/assertions retained.
Source inspection/review also found and corrected actual drain ownership edge races (logical-closed HTTP carrier removed before its writer done; reverse reader fault skipped writer await), each deterministic regression. This is not a clean-context whole-fix verification/checkin or resolution of older2011 masked cleanup causes/2005extra-command identity. Full382/357/25FAILED stays a69f20f3, not current HEAD. No integration/release/closure.
JoshuaRowePhantom commentedon Dec 4, 2026
Final receipt update: approved FINAL1f9bf7f0 six-case actual GUI/subset recovery stability completed6x10 ALL PASS (.scratch-2016-final-committed-recovery-stability10-command.log), original24changes/sixrecoveries/30000ms watchdog/full frozen equality/original graph+promotion owners retained. Final transport50x10 ALL PASS, core30/native14pass. Required49/41/8FAILED is still current, not overwritten by these greens. Mock-root passing cases are not a substitute for proving the missing negotiated fault/interrupt paths. No full recovery/release claim or issue closure.