Skip to content

Send a question or a plan to an older paired desktop as a notice it can read (CF-6) - #330

Merged
BunsDev merged 5 commits into
mainfrom
cf6-desktop-kinds
Oct 19, 2026
Merged

BunsDev merged 5 commits into
mainfrom
cf6-desktop-kinds

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Finding 6 from the CF-6 review on #279: older paired desktops showed nothing for a Codex question.

Store builds cut before CF-3, such as TestFlight Store 0.0.8, have no question or plan in their renderer, so a thread waiting on a question looked stuck. Their answers were already refused, so this was safe, just not readable.

Why a capability field, not a protocol bump
Val first chose a protocol bump, then switched to this option. A bump would have left TestFlight Store 0.0.8, uploaded October 6 and so before #166's "incompatible host" screen, retrying "Waiting for your Mac host" indefinitely. Today that build works for everything except questions and plans.

Change

  • A paired desktop names the item kinds it draws in an x-modex-item-kinds header on every request. Hosts that predate the header ignore it.

  • A client that names none is a Store build from before CF-3. The host sends it a question or a plan, and any later kind it doesn't list, as an info notice with the same id. That covers:

    • thread:items;
    • live and journaled events;
    • journal replay.

    An update to such an item arrives as the whole current notice, which every client replaces by id. A question's answers are never included.

  • Current clients draw every kind and get every event unchanged. Each broadcast is framed once per distinct set of kinds.

  • DESKTOP_PROTOCOL and the installed-host markers are unchanged.

  • Docs: human-requests.md ("Older paired desktops"), the Store README and status.md.

Evidence (3da1d75, on main at c345779)

  • Red first: c44985f adds test/desktop-item-kinds.test.ts. On c345779 the older client got [["a","assistant"],["q","question"],["p","plan"]] from thread:items, and a raw question in replay.
  • Green:
    • With pnpm 10.34.5 and Node 24.18.1: pnpm build and pnpm typecheck passed.
    • Root pnpm test: desktop 1,655 tests, with 1,639 passed, 16 skipped (the existing ones) and 0 failed. Every other suite passed.
    • e2e: store-desktop, workspace-store, desktop-host-launch, human-requests and event-journal passed 14/14, after pnpm --filter @modex/store-desktop build.

Limits

The rest of the CF-6 residue is in #329 (findings 9 and 3) and #318 (finding 11). Findings 4 and 7 are #316's, and finding 10 is waiting on #316. The full classification is on #279.

Coven-Harness: Claude Code / claude-opus-5-5

…ce (CF-6, finding 6)

Store builds cut before CF-3, such as TestFlight Store 0.0.8 (October 6), have
no question or plan in their renderer and show nothing for one. The test
drives a real DesktopClient and a client that names no item kinds through
thread:items, live item and item_update events, journal replay and journaled
events. On c345779 the older client gets [question, plan] unchanged.

Coven-Harness: Claude Code / claude-opus-5-5
…an read (CF-6, finding 6)

Val chose a capability field over a protocol bump: a bump would leave
TestFlight Store 0.0.8, which predates #166's recovery screen, retrying
"Waiting for your Mac host" indefinitely.

- A paired desktop names the item kinds it draws in an x-modex-item-kinds
  header on every request. Hosts that predate it ignore it.
- The host treats a client that names none as a Store build from before CF-3.
  It sends that client any kind outside the seven it draws (today question and
  plan) as an info notice with the same id, in thread:items, live and
  journaled events, and journal replay. An update to one arrives as the whole
  current notice, which every client replaces by id. A question's answers are
  never included.
- Current clients draw every kind and get every event unchanged; each
  broadcast is framed once per distinct set of kinds.

DESKTOP_PROTOCOL and the installed-host markers are unchanged.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
modex Ready Ready Preview Oct 19, 2026 10:35pm UTC

Request Review

@github-code-quality

github-code-quality Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 75d6003 cf6-desktop-kinds 6f3a6c9 +/-
63% 63% 0%
View coverage of the 3 most impacted files.
File main 75d6003 cf6-desktop-kinds 6f3a6c9 +/-
apps/desktop/sr...desktop-host.ts 98% 98% 0%
apps/desktop/sr...top-protocol.ts 100% 100% 0%
apps/desktop/sr...esktop-items.ts 0% 98% +98%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 19, 2026 22:59 UTC

The raw client in desktop-item-kinds.test.ts turned certificate
validation off, which CodeQL flags as high severity. It now pins the
host's certificate through pinnedDesktopCertificate, the same way the
real DesktopClient and Store builds connect.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev

BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

CodeQL flagged one high-severity alert on 187243d: the raw legacy client in desktop-item-kinds.test.ts set rejectUnauthorized: false. 71bae66 makes it pin the host certificate through pinnedDesktopCertificate, the same way DesktopClient connects. This changes only the test, and both of its tests pass locally. The guard is waiting on the new CI run.

This branch was successfully deployed

1 active deployment
Preview — 6f3a6c98 Deployed Oct 19, 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.

2 participants