Skip to content

feat(diagnostics): retain connection and send-blocking history - #5030

Merged
reachjalil merged 1 commit into
devfrom
feat/connection-diagnostic-history
Sep 15, 2026
Merged

reachjalil merged 1 commit into
devfrom
feat/connection-diagnostic-history

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Problem

Intermittent connection failures and disabled Send controls can recover before diagnostics are exported. Current-state snapshots and optional debug logs cannot reliably reconstruct what happened.

Change

  • Add an always-on, renderer-memory-only connectionHistory field to existing Copy diagnostics / Export diagnostics bundles: at most 500 events from the last hour, with bounded source state and repeated-event coalescing.
  • Record Den HTTP/transport/timeout failures, authentication transitions, scoped session and organization retries/recovery, and engine stream reconnect states and durations.
  • Record categorical Send blockers and their clearing, distinguishing a busy Stop control from disabled-button causes. Unmounts are recorded as ended, not recovered.
  • Allowlist reason codes and numeric metadata before storage. No request bodies, raw error text, URLs, paths, credentials, conversation content, or real account/session identifiers enter the new history. Sources are ephemeral numeric aliases. Nothing is persisted or automatically uploaded.
  • Preserve existing request errors, retry behavior, composer behavior, and diagnostic sanitization. This is additive to the redaction work in fix(privacy): redact credentials in feedback and diagnostics #4526, not a replacement for it.

Raw request failures are anonymous observations, not a global Den-outage verdict. Recovery belongs to a specific session-check, organization-resolution, or stream lifecycle; unrelated successful requests cannot mark another source recovered. History cannot reconstruct incidents before this build started, after a renderer restart, or outside its retention window.

Verification — Incomplete

Candidate: cb52989
Base: 391d794

Passed:

  • pnpm --filter @openwork/app exec bun test --isolate tests/connection-diagnostic-history.test.ts tests/den-request-diagnostics.test.ts tests/composer-diagnostics.test.ts tests/diagnostics-bundle.test.ts tests/den-auth-provider.test.ts tests/session-sync-stream-generation-restart.test.ts — 28 passed, 0 failed, 0 skipped.
  • After final review refined busy-control diagnostics: pnpm --filter @openwork/app exec bun test --isolate tests/composer-diagnostics.test.ts — 3 passed, 0 failed; verifies all 32 input combinations.
  • pnpm --filter @openwork/app typecheck — exit 0.
  • git diff --check — exit 0.

Not run / deferred:

  • Exact-head app/Den/Daytona journey evidence, mounted authentication/composer coverage, and an end-to-end Copy/Export exercise. Focused tests establish buffer/privacy and instrumented request/stream behavior, not full runtime proof.
  • Broader eval/typecheck and cross-platform suites; no eval files changed.

No failing or skipped tests in the executed focused selection. Overall proof remains Incomplete because full runtime evidence is missing.

UI/UX impact

None — existing UI/UX preserved. No visual, navigation, connection, or sending behavior changes; only exported diagnostic information expands.

@vercel

vercel Bot commented Sep 15, 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 15, 2026 6:27pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Skipped Skipped Sep 15, 2026 6:27pm UTC
openwork-diagnostics Skipped Skipped Sep 15, 2026 6:27pm UTC
openwork-landing Skipped Skipped v0 Sep 15, 2026 6:27pm UTC

@github-actions

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 (108185 ms), confidentiality-review (171529 ms), desktop-den-sync-review (236254 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 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 (cb52989c52657f5313b4a067518890ca91e6220e). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit cb52989c52657f5313b4a067518890ca91e6220e · selected evidence

Open review report

@reachjalil
reachjalil merged commit 916c0ba into dev Sep 15, 2026
28 checks passed

This branch was successfully deployed

1 active and 3 inactive deployments
Preview – openwork-app — cb52989c Deployed Sep 15, 2026 by vercel[bot]
Preview – openwork-diagnostics — cb52989c Deployed Sep 15, 2026 by vercel[bot]
Preview – openwork-den — cb52989c Deployed Sep 15, 2026 by vercel[bot]
Preview – openwork-landing — cb52989c Deployed Sep 15, 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