Skip to content

Collapse the four-way hand-synced backend-adapter duplication #1500

Closed

Description

@malibio

Overview

The backend adapter exists in four hand-synced implementations: TauriAdapter and HttpAdapter in backend-adapter.ts, a third REST→gRPC translation in the dev-proxy, and a fourth embedded HttpAdapter in the e2e harness. Every parameter/shape change must be edited in up to four places with nothing asserting they agree — the source of the browser-vs-Tauri dev drift.

Problem Statement

Nothing guarantees the adapters and proxy stay in sync, so they drift; recent commits are drift being repaid after the fact.

Proposed Solution

Factor a transport-agnostic adapter core with DTOs sourced from nodespace-proto; TauriAdapter/HttpAdapter become thin invoke-vs-fetch shims; add a contract test asserting both adapters + the proxy deserialize into the same daemon-side request and call the same core op, so drift becomes a compile/test error. Governed by ADR-048.

Acceptance Criteria

  • A single transport-agnostic adapter core sourced from nodespace-proto
  • TauriAdapter/HttpAdapter reduced to thin transport shims
  • A contract test proves adapter + proxy parity
  • Code passes bun run quality:fix; tests pass

Technical Specifications

Reference Files

  • backend-adapter.ts (TauriAdapter, HttpAdapter), dev-proxy.ts, daemon-harness.ts
  • Decision: ADR-048

Related Issues

  • (companion to the Tauri-seam e2e work)

Activity

  1. malibio commented on Jul 6, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 147 test files / 3948 tests passed (44s)

  2. self-assigned this
    on Jul 6, 2026
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