Skip to content

No preload/renderer protocol version check (spec-promised) #184

Closed

Description

@currentbits

Problem

PRODUCT-SPEC §2 promised "version the protocol lightly (protocolVersion: 1) so we can reject mismatched preload/renderer builds." Today protocolVersion appears only in MCP handshake fixtures; electron/preload.js has no version constant or handshake.

Impact

The project has already shipped a stale-bundle bug where the UI was a round behind the main process (docs/ISSUES.md:93). A channel-shape mismatch between an old cached renderer and a new main would fail as unexplained IPC errors.

Fix direction

Add a protocol version constant to preload and renderer, check it at boot, and show a hard "reload required" state on mismatch. Cheap insurance, explicitly spec-promised.

Activity

  1. added
    enhancement
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 16, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Status check: the spec-promised protocolVersion handshake was deliberately replaced with build-SHA equality — src/buildMismatch.ts compares app.status().build.sha with the compile-time __BUILD_SHA__ at boot, and App.tsx shows a restart banner on mismatch (tests in test/buildMismatch.test.ts). The code comment frames it as a considered decision: 'sha equality is the ceiling; no protocolVersion registry.' Remaining gap vs. this issue: the mismatch UI is a banner over a still-rendered app, not a hard blocking 'reload required' state. Moving back to todo for that gap (or close if the banner is deemed enough).

  3. added
    plan:todo
    plan:doing
    and removed
    plan:doing
    plan:todo
    on Aug 18, 2026
  4. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Ready for review on worktree branch coder/fork-we-have-a-lot-of-in-progress-a482c3 (commit 3b6d077, thread a482c358). On build-SHA mismatch the app shell is now replaced by a full-screen 'Reload required' state (BuildMismatchScreen, role=alertdialog) instead of rendering under a banner; Restart still calls applyUpdate; sha-equality mechanism unchanged. 7/7 tests pass (test/buildMismatch.test.ts + new test/buildMismatchUi.test.tsx).

  5. added
    plan:done
    and removed
    plan:doing
    on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions