Repository navigation
fix(app): isolate archive HTTP from renderer stream pressure - #5063
Conversation
Signed-off-by: Guillaume Loret <[email protected]>
Signed-off-by: Guillaume Loret <[email protected]>
…-path Signed-off-by: Guillaume Loret <[email protected]>
Signed-off-by: Guillaume Loret <[email protected]>
Signed-off-by: Guillaume Loret <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
Signed-off-by: Guillaume Loret <[email protected]>
Signed-off-by: Guillaume Loret <[email protected]>
Revert-fails evidence — intentional historical red control, not a final-head failureRestored only Result: exit 1; 0 passed / 1 failed / 0 skipped. Assertion at Immutable local receipt: A wider safety sweep subsequently caught missing Stop POST cancellation through IPC; 379c1c3 narrows cancellation to the abort endpoint at both IPC ends and adds an explicit prompt/command non-cancellation negative test. The original working-session E2E assertions are unchanged and are rerunning before this PR is marked ready. |
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (290022 ms), confidentiality-review (108856 ms), spec-provenance-review (463515 ms), desktop-den-sync-review (385879 ms), design-spec-review (413047 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (379c1c3f7e04e04cee97ca707d04d171a06cb675). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Signed-off-by: Guillaume Loret <[email protected]>
Unmount-oracle provenance (2b15b90)The broader Stop cases now pass with abort-POST cancellation preserved. The next failing step was an older E2E expectation that a PATCH held BEFORE upstream dispatch would complete and announce success after the route unmounted. I checked that oracle on an initially clean dedicated worktree at origin/dev/#5014 merge d16d4a1, with the identical command #5014 deliberately aborts pending archive on unmount and returns an unknown write outcome. The updated step now requires cancellation to reach the held native PATCH, exactly one canceled attempt, no late mutation/retry over two seconds, no successful-archive announcement, Settings navigation preserved, and the original unarchived session still accessible on return. Production was NOT changed to complete a canceled request just to satisfy the old oracle. The rest of the working/approval/admission/queue/Undo matrix remains intact. Full final-head sweep is running before readiness/merge. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (2b15b906a47f896395a3d005b113fbced7f5dd06). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Final-head test evidence — PassedCommit Every section below comes from a completed head-matching 1. Finite archive IPC preserves scoped requests, cancellation, no retries and external trust boundaries — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped (5 Node tests, 2 Bun tests). Assertion evidence: real loopback GET/PATCH preserved authentication, directory scope and request body; HTTP rejection did not trigger another request; held-body cancellation settled; a redirect target received zero requests; external, HTTPS-loopback and lookalike hosts retained the supplied Chromium fetch. Archive GET/PATCH used IPC while default clients and SSE kept their original routes. Stop's ten-second deadline reached Receipt: 2. Archive deadlines settle stalled reads and uncertain writes, preserve caller cancellation, and retain pin and working-session contracts — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped, wrapping 117 native tests passed / 0 failed. Assertion evidence: stalled preflight/body waits settled before the bridge deadline without a late PATCH; dispatched but unconfirmed writes returned unknown rather than false cancellation; holds/busy state recovered; unmount and effective Request signals remained bounded; pin, working-target refusal and approval contracts remained intact. Receipt: 3. Mailbox registration expires after a poll gap, independently of pin or engine work; a fresh poll restores it — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped. Assertion evidence: receipt expired at five seconds and rejected a late reply; registration stayed connected at 20,000 ms but not 20,001 ms; disconnected context was refused before enqueue; a fresh poll restored a successful request/reply. This proves the mailbox contract, not the historical outage's trigger. Receipt: 4. Archiving exits only the viewed conversation, and working sessions require a confirmed stop without replay — PassedCommand: Result for this case: Passed. Combined two-case command: exit 0, 2 passed / 0 failed / 0 skipped. Assertion evidence: idle and cross-workspace archive/Undo preserved the correct route and transcript; retry, permissions and questions required confirmation; cancel did not stop/archive work; false/error/timeout/unconfirmed aborts remained retryable without archive; confirmed Stop handled queued, background and child work without replay. Side-chat and tab identities remained scoped. On unmount, exactly one held native PATCH was canceled before upstream dispatch; zero late mutation/retry over two seconds, no false success announcement, and Settings retained navigation. This updated unmount oracle is supported by the clean #5014-only control described in the provenance comment, not a production change to force success after cancellation. Receipt: 5. Accepted commands require exact engine admission before archive and never replay after Undo — PassedCommand: Result for this case: Passed. Combined command counts are reported once in section 4. Assertion evidence: the configured native command and fixture model were observed; unconfirmed command admission blocked unsafe archive; exact accepted work was reconciled without a duplicate dispatch; archive/Undo did not replay the command or its canceled queued work. Receipt: 6. Sidebar archive succeeds while real same-origin HTTP/1.1 SSE pressure remains held — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped. Assertion evidence: eight actual SSE requests across two fixture workspaces produced established HTTP/1.1 connections and queued excess requests. A previously successful raw renderer GET timed out under pressure while timers/frames and independent engine reads stayed healthy. The trusted sidebar click archived the idle, non-pinned empty target in 119.1 ms on this head, with exactly one successful main PATCH, zero renderer PATCHes, no abort/prompt replay, unchanged neighbors, and all initially established blockers still held. A subsequent raw renderer GET still timed out, proving the test did not clear pressure to obtain success. All injected streams were cleaned up. Receipt: 7. Pinned idle sessions archive from sidebar/mailbox; held preflight fails promptly without late PATCH and recovers — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped. Assertion evidence: pinned UI and cross-workspace mailbox archive completed without a focused conversation; unpin-then-archive also worked; pin preference and unrelated sessions were preserved. The main HTTP witness held a real transcript body: structured Receipt: 8. A synthetic single-poll body gap expires registration while the renderer remains live; release restores context — PassedCommand: Result: exit 0; 1 passed / 0 failed / 0 skipped. Assertion evidence: after one actual pending-poll body was held for more than 21 seconds, the exact no-connected-window response arrived in under one second while the same document, route, composer, interval/RAF heartbeats and unrelated renderer/runner HTTP stayed healthy. Session inventory/metadata/transcript/todo digests were unchanged and no engine write was attempted. Releasing the one body resumed real polling and restored context without replay: two contexts delivered across three completed requests. No SSE saturation was injected in this test. This is an independent possible mechanism, not attribution of the installed incident. Receipt: Additional verification and negative controlsAll exited 0 on this head:
|
|
Final merge gate: Passed at 2b15b90. Eight head-matching testkit tests passed, zero failed/skipped; all eight evidence sections verified together in comment 5704161887. App/Electron/evals typechecks and 976-callback check passed. Live required set verified from dev rules: openwork-tests-required, PASS (run 35146246650). Warden APPROVED this exact SHA (run 35146246582); zero unresolved review threads; all eight branch commits verified G signatures and matching DCO trailers; no .github/, .warden/, or warden.toml PR changes. PR is ready, MERGEABLE, CLEAN. Merge is explicitly authorized for this bug. Historical red controls are labeled separately and are not fixed-head failures. Original installed incident attribution remains unconfirmed; the scoped pressure remediation and safety behavior are proven. |
Summary
Follow-up to #5014 (merged). Preserve archive's safety state machine and isolate its finite desktop HTTP requests from Chromium's SSE connection pool.
POST /session/:id/abort; prompt/command admission POSTs retain their existing contract.RCA and boundaries
reports/rca-archive-timeout-ui-path-2026-09-16.mdA controlled empty, idle, non-pinned session reproduced the exact ten-second archive toast: the ownership GET received no headers while independent engine reads succeeded. #5014 alone still timed out under that pressure. The fixed sidebar archive completes while SSE blockers remain held.
The main-hosted affordance invokes the same renderer hook; it was not an independent native archive implementation. Generic main
electronNet.fetchalso timed out in calibration, so changing only IPC routing would not suffice.A separate held-poll-body test proves registration can expire while the renderer and unrelated HTTP stay healthy. This is a possible mechanism, not attribution of the original installed incident. This PR does not relax the mailbox lease, weaken preflight, raise deadlines, or redesign SSE subscriptions. Eight injected streams across two workspaces are deliberate pressure, not a claim to recreate every retained tab. No visual UI redesign.
Verification — Passed
Final head:
2b15b906a47f896395a3d005b113fbced7f5dd06.Combined head-specific evidence: all eight test sections
Local isolated source-built Electron / engine v1: 8 testkit tests passed, 0 failed, 0 skipped. Includes the full working-session/approval/queue/child/Undo matrix, accepted-command admission, pressure regression, pinned/held-preflight recovery, independent live-renderer mailbox expiry, deadline suite (117 native tests), and transport/cancellation boundaries. App, Electron and evals typechecks and the 976-callback browser check passed.
The final-head pressure case observed archive success in 119.1 ms, exactly one successful main PATCH, zero renderer PATCHes, no abort/prompt replay, and unchanged neighbors while raw renderer GETs still timed out behind the held SSEs.
Revert-fails control: restore #5014's archive hook, retain tests/witness; the identical fixed-mode oracle fails at 10008.9 ms. Signed fix restored and green again. Historical deliberately dirty control is not fixed-head evidence.
Unmount-oracle provenance: clean #5014-only control reproduced the old late-success expectation failing after unmount. The revised step explicitly asserts cancellation, no late mutation/retry, and Settings navigation safety; production was not changed to resurrect canceled work.
CI
openwork-tests-requiredpasses, Warden approves this exact head, all branch commits are signed and signed off, and no policy/workflow files are changed. Final merge-gate receipt is in the PR comments.