Skip to content

Establish one daemon-readiness contract to stop per-call-site startup races #1525

Closed

Description

@malibio

Overview

Startup/readiness races between the UI and the daemon recur and are patched per call site (readiness probes that disagree on the socket path, layout gating on readiness with no failure path, a finally marking a viewer ready even when hydration failed).

Problem Statement

Because readiness is probed inconsistently across paths, each new path can reopen a startup race. There is no single readiness contract or test.

Proposed Solution

Define one readiness contract (the reachability check and the gRPC dialer resolve the identical socket; a single readiness signal the UI consumes) and an integration test that boots the UI against a not-yet-ready / reconnecting daemon and asserts a degraded state that recovers. Relates to ADR-044.

Acceptance Criteria

  • A single readiness contract shared by the reachability check and the dialer
  • An integration test covers not-ready → degraded → recovered
  • Code passes bun run quality:fix; tests pass

Technical Specifications

Reference Files

  • packages/desktop-app/src-tauri/src/{lib.rs, services/grpc_client.rs}, +layout.svelte, daemon_setup.rs
  • Context: ADR-044, ADR-048

Related Issues

Activity

  1. malibio commented on Jul 6, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 146 test files passed, 3939 tests passed.

  2. self-assigned this
    on Jul 6, 2026
  3. added 2 commits that reference this issue on Jul 6, 2026
    02da79f
    678a2f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions