Skip to content

fix(desktop): restore cloud sessions after runtime replacement - #4711

Merged
reachjalil merged 2 commits into
devfrom
fix/desktop-session-redelivery
Sep 9, 2026
Merged

reachjalil merged 2 commits into
devfrom
fix/desktop-session-redelivery

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Current readiness — 2026-09-09

Head b446e7eed33fc40b9ca068bea096451f5982063a: required build/core checks passed; Warden completed all four reported skills with zero findings and its clearance review approved this head. GitHub reports CLEAN / APPROVED. The local review authentication failure below remains historical, not the current CI review outcome.

Runtime proof is still Incomplete. Product journeys run 34415818735 selected the changed cloud-provider-sync-contract journey and the critical journeys, but they are waiting for the protected pr-slow-specs environment. The configured reviewer must approve the test execution; the current account cannot approve it. No bypass, manual approval, or merge was performed.

Current-head Warden analysis. Full delivery clearance still requires current-head runtime evidence; GitHub merge eligibility alone is not that proof.

Summary

Desktop sessions can outlive the local server process. A same-address restart previously left session delivery memoized against the old process, while a failed delivery could leave synchronization marked as attempted without scheduling recovery.

  • Scope successful delivery and in-flight requests to the signed-in identity, local server credentials, and runtime generation.
  • Observe runtime generation changes in Session and Settings and ensure session delivery succeeds before provider synchronization.
  • Retry transient delivery failures up to three attempts with bounded backoff; keep explicit authorization denials, rate limits, and identity changes terminal.
  • Cancel obsolete delivery work on sign-out, disposal, and runtime/identity changes. Match shared synchronization outcomes to the context that actually executed.
  • Publish host information together with its endpoint, avoiding mixed old-endpoint/new-credential state.
  • Keep remote workspaces and non-loopback local URL overrides hostless. They use endpoint-specific config access, never desktop session delivery.
  • Extend existing regression tests and the cloud-provider-sync journey with same-address runtime replacement coverage.

Policy enforcement remains unchanged. This does not add stale-policy authorization or automatic replay of a failed user command.

Review follow-up

Confirmed high finding 4R2-5S8; fixed in b446e7eed33fc40b9ca068bea096451f5982063a and replied to the review thread. Three non-loopback override regressions failed before the fix and pass afterward. They assert no session PUT, no provider-sync POST, no desktop host header or Den token body, while endpoint-specific config access still works. The thread is resolved; this is not full review clearance.

Verification — Incomplete

Candidate: b446e7eed33fc40b9ca068bea096451f5982063a
Base: 440504bb9010ea7be822f5f9144e2627c84d32d3 (dev)

Passed on the updated tree:

  • pnpm --filter @openwork/app exec bun test --isolate ./tests/session-provider-auth-server-sync.test.ts ./tests/cloud-provider-sync-gateway.test.ts — 42 passed, 0 failed, 163 assertions; exit 0.
  • pnpm --filter @openwork/app typecheck — exit 0.
  • git diff --check — exit 0.

Historical only:

  • Browser callback check passed on the initial candidate (796 callbacks).
  • The existing CI evidence comment names initial head 4429d978c8529a3887f09bc3b284579d4cd053a9; it does not establish proof for this updated head.

Missing runtime proof:

  • The extended cloud-provider-sync-contract desktop journey has not been executed or published for this head. Placement discovery selected Daytona; no sandbox was provisioned for the local verification pass.
  • Next proof command: OPENWORK_EVAL_REF=b446e7eed33fc40b9ca068bea096451f5982063a pnpm evals:e2e cloud-provider-sync-contract.
  • The new assertion replaces the local runtime without reloading or navigating the renderer, requires the same port and a changed runtime generation, then requires a fresh successful provider sync within 30 seconds with unchanged sign-in and route.
  • Source-level tests are feedback, not desktop runtime proof. Failed-delivery, cancellation, and override-isolation behavior still require runtime validation.

Final local review:

  • pnpm warden:check — exit 1, authentication failure: no OpenAI API key available to the configured review runtime.
  • Expected skills: diff-security-review, confidentiality-review, spec-provenance-review, desktop-den-sync-review. None established completed local review coverage; skipped output is not clearance.
  • Review run: a2c75cf3-2026-09-09T23-04-24-021Z. The candidate and base above were unchanged before/after review. No new validated finding IDs were produced.
  • Clear when: the exact-head journey evidence is published and all applicable review skills complete without blockers.

Open ready for review as requested, with an Incomplete verdict; not a merge-ready claim.

@vercel

vercel Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 9, 2026 11:06pm UTC
openwork-den Ready Ready Preview Sep 9, 2026 11:06pm UTC
openwork-diagnostics Ready Ready Preview Sep 9, 2026 11:06pm UTC
openwork-landing Ready Ready Preview, v0 Sep 9, 2026 11:06pm UTC

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Passed · 3/3 tests · 4/4 assertions · 2 images

Commit b446e7eed33fc40b9ca068bea096451f5982063a · selected evidence

Open review report

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native 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 (381275 ms), confidentiality-review (202388 ms), spec-provenance-review (121276 ms), desktop-den-sync-review (316589 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 2
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 1 observed
  • Observed resolved/unresolved transitions in retained snapshots: 1 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 1
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 2/20 run attempts retained; truncated: false
  • Transition snapshot: 1/1 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (b446e7eed33fc40b9ca068bea096451f5982063a). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil merged commit c13e38f into dev Sep 9, 2026
29 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-den — b446e7ee Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-landing — b446e7ee Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-app — b446e7ee Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-diagnostics — b446e7ee Deployed Sep 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant