Repository navigation
Webview stream liveness & rail self-heal (#1583) - #1587
Merged
jeonghun-jj-lee merged 7 commits intoSep 27, 2026
Merged
jeonghun-jj-lee merged 7 commits into
jeonghun-jj-lee merged 7 commits into
Conversation
The overlay app's live SSE stream had no client-side liveness detection: when the socket goes silently half-open (sleep/wake, Wi-Fi blip, engine replaced without FIN/RST), the v1 event iterator neither throws nor completes, so onSseError never fires, the for-await parks forever, streamStatus stays "connected", and the transcript freezes until a manual reload. - New zero-dependency pure module stream-liveness.ts exporting shouldReconnectIdleStream (unit-tested in-place via bun:test) — reconnect iff connected AND now - lastFrameAt > staleMs (strict). - Watchdog in createServerSdkContextBase: track lastFrameAt (set on connect and each frame), a 5s setInterval force-reconnects a stale-but-connected stream at 30s by aborting the per-attempt controller (same generation reconnects with the lastEventID cursor — lossless); cleared in onCleanup. Intentional abort is treated as closed by the existing catch, so the banner does not flip. - Wake re-arm in onMount: visibilitychange (visible + stale >10s) and online (when connected) force a reconnect via a shared forceReconnect() closure, guarded on started && !abort.signal.aborted. A healthy stream (fresh lastFrameAt) causes no reconnect on a quick tab toggle. - Refresh manifest hashes for the edited/added overlay files.
…-timeline.tsx The slice-1 manifest patch corrupted two unrelated overlay entries to stale pre-#1579 hashes, reddening drift_gate.mjs. Restore both to their committed-disk hashes (disk is the source of truth). drift-gate PASS.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…nect (#1585) Add pure shouldRefetchOnReconnect(prev, next) to the UI package's problem.ts (true iff false→true — a rising edge after a real disconnect; initial connect undefined→true does not refetch). Wire AmicodeEntityRail with an optional streamConnected?: () => boolean prop and a createEffect that tracks the prior value in a plain closure let and refetches on the reconnect edge, never reading the resource's own state (no feedback loop). The app mount supplies the app's live SSE status via serverSDK().event.status().
…verlay typecheck Base defect from #1570 (byte-identical to base HEAD): mock(() => {}) types mock.calls[0] as [] so the .toEqual(["s1"]) assertion failed the fail-closed overlay typecheck gate on feature/free-tier-fleet independent of #1583. Type the mock param (id: string) so the assertion typechecks. Integration repair recorded in the session ledger as a finding.
jeonghun-jj-lee
marked this pull request as ready for review
September 27, 2026 21:34
This was referenced Sep 27, 2026
added 3 commits
September 27, 2026 17:59
…ico/issue-1583-webview-stream-liveness # Conflicts: # packages/app-bundle/manifest.json
…gate typecheck Pre-existing base defect (from #1579 lineage): the import at extension.ts:114 went unused when its last consumer was removed, so 'pnpm -r run typecheck' (the CI 'fast' gate) failed with TS6133 on feature/free-tier-fleet, independent of #1583. UNARMED_PASSWORD on the same line stays (used at ~L1307).
The suite inherits the Amicode terminal's operational env (AMICODE_SERVICE_AUTH=open, AMICO_FLEET_MULTIPLEX=1, AMICODE_ENGINE_UNARMED, AMICODE_SERVICE_PORT, AMICODE_APP_DIST, OPENCODE_DB, OPENCODE_CONFIG_CONTENT, ...) that CI never sets — flipping service auth mode, fleet data-plane routing, app-shelf boot shape, and terminal env injection under the tests, so ~17 tests red locally while green in CI. - add test/setup_hermetic_env.ts (vitest setupFiles): snapshot + clear AMICO*/AMICODE*/ OPENCODE* per file, restore on teardown; explicit per-test values still win. - cli_gate: skip the really-staged-bins check on a staged LAUNCHER, not just bin/ (bin/launcher/* are gitignored build artifacts; a fresh worktree false-failed it). Verified: full fast suite green in a dirty dev env (4991 passed, 0 failed); CI clean-env behavior unchanged.
jeonghun-jj-lee
deleted the
amico/issue-1583-webview-stream-liveness
branch
September 27, 2026 22:34
This was referenced Sep 27, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integration PR for #1583 — client-side recovery so local chat sessions stop needing a window reload.
Webview fix (the campaign)
Landing against the drifted base (integration repairs)
origin/feature/free-tier-fleet(4 commits incl. chore(app-bundle): refresh manifest — stale overlay hashes trip the drift gate on feature/free-tier-fleet #1588 manifest refresh, Regression: adopted hub engine runs without OPENCODE_CONFIG_CONTENT / external-skill suppression — skill catalog + instruction merge lost #1581/fix(fleet): serialize concurrent prompts to one session — queue instead of coalesce-and-drop #1582 fleet); resolved themanifest.jsonconflict by regenerating from the merged overlay (drift-gate PASS, 885 files).fix(extension): dropped a pre-existing unusedisUnarmedHandshakeimport that reddened the CIfasttypecheck (TS6133, from feat: hub service runner writes the handshake file so the extension adopts instead of spawning #1579 lineage — independent of Local chat sessions go stale / 'status unavailable' until a window reload — no client-side stream liveness #1583).test(Extension test suite isn't hermetic against ambient AMICODE_*/AMICO_*/OPENCODE_* dev env (local↔CI parity) #1589): made the extension suite hermetic against ambient dev-shell env (AMICODE_SERVICE_AUTH=open,AMICO_FLEET_MULTIPLEX=1,OPENCODE_DB, …) so ~17 tests that pass in CI's clean env no longer red on a developer's machine; hardenedcli_gate's staged-bins skip guard.session-status-reconcilemock (Fix remote session SSE delivery + host-side presence awareness (#1564) #1570) that reddened the overlay typecheck.Gates (director-run, all green)
slice unit 4/4 + 38/38 · drift-gate PASS · overlay typecheck clean (7 pkgs) · build:binary compiles + smoke v1.18.29 · full fast suite 4991 passed / 0 failed (verified in a dirty dev env).
Base:
feature/free-tier-fleet.