Skip to content

Record who answered from the phone's YOLO switch and paired desktops, and test a card open at a crash (CF-6) - #329

Merged
BunsDev merged 4 commits into
mainfrom
cf6-residue
Oct 19, 2026
Merged

BunsDev merged 4 commits into
mainfrom
cf6-residue

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Two findings from the CF-6 review on #279: who answered (finding 9) and a card left open at a crash (finding 3).

Who answered (finding 9)

  • Switching a thread to YOLO answers the approvals already waiting. Each one was saved as answered by this Mac's window, even when the phone set YOLO. A desktop paired through the host was recorded as the window, too.
  • The phone's policy route now passes "phone" through setApprovals, and the runner's YOLO switch answers as whoever made the change.
  • Commands that arrive through the desktop host carry no IPC event, so thread:answer, thread:answer-question and thread:update record "paired-desktop" for them.
  • The card says "Answered from a paired desktop." under such an answer. docs/human-requests.md lists the three values and the YOLO rule.

A card open at a crash (finding 3)

Red first

  • the companion policy test (by was undefined);
  • the answerNote case;
  • the new test/request-attribution.test.ts (updateThread had no by option);
  • the Store e2e (no note under the paired desktop's approval);
  • test/request-crash.test.ts on 396b17c (delta: true, items: 0).

Checks (30ac266, on main at c345779, which includes #309)

  • With pnpm 10.34.5 and Node 24.18.1: pnpm install --frozen-lockfile, pnpm build and pnpm typecheck all passed.
  • Root pnpm test: desktop 1,658 tests, with 1,642 passed, 16 skipped (the existing ones) and 0 failed. Every other suite passed: 109, 16, 21, 10 and 16.
  • e2e: store-desktop, human-requests, approvals, approval-policy, event-journal and companion passed 20/20, after pnpm --filter @modex/store-desktop build.

Not in this PR

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

…op answers (CF-6, finding 9)

Switching a thread to YOLO answers the approvals already waiting, and each one
was saved as answered by this Mac's window even when the phone set YOLO.
Answers and policy changes from a desktop paired through the host were also
saved as the window's own.

- The phone's policy route passes "phone" to setApprovals, and the runner's
  YOLO switch answers as whoever made the change.
- Commands that arrive through the desktop host carry no IPC event, so
  thread:answer, thread:answer-question and thread:update record
  "paired-desktop" for them.
- The card says "Answered from a paired desktop." under such an answer.

Red first: the companion policy test (by was undefined), the answerNote case,
the new runner test (updateThread had no by option) and the Store e2e (no
note under the paired desktop's approval).

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

After a crash the new process closes a card nobody answered only when it first
reads that thread. The phone's poll reads its journal cursor before that, so on
main at 396b17c the first poll answered delta: true with no items and the card
stayed actionable (probe p2 in the #279 review).

#309 gives the journal a new id after an unclean shutdown. The phone's old
cursor then reloads to a full snapshot, which the same read settles. This
test fails on 396b17c ("delta: true, items: 0") and passes with #309's
journal. A clean quit, which stops the turn before the journal closes, passes
either way and is kept as the control case.

Coven-Harness: Claude Code / claude-opus-5-5
… journal docs (CF-6)

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 7:36pm UTC

Request Review

Brings in #328 (CF-5 removal-only and notebook comparison) and #331 (status Still open).

Coven-Harness: Claude Code / claude-opus-5-5
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 58b468d cf6-residue faa69d7 +/-
63% 63% 0%

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

@BunsDev
BunsDev merged commit 9a2e15f into main Oct 19, 2026
13 checks passed
@BunsDev
BunsDev deleted the cf6-residue branch October 19, 2026 21:33
BunsDev added a commit that referenced this pull request Oct 20, 2026
Conflicts:
- companion.ts: keeps this branch's question notice text and main's
  fallback notice for an unknown item kind (#329).
- docs/human-requests.md: keeps this branch's phone paragraph and main's
  "Who answered" bullet and paired-desktop window line (#329).

journal-resume.test.ts (#309) was written against delivery being
recorded the moment an answer is accepted. On this branch a backend
confirms its write through sink.deliverRequest, as the mock backend and
the runner tests do. Its two fake backends now pass a native request id
and write inside deliverRequest, so the crash test still checks that the
card reloads answered and the CLI hears one decision.

Full desktop unit suite: 1,704 tests, 1,688 passed, 16 skipped, 0 failed.

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

This branch was successfully deployed

1 active deployment
Preview — faa69d76 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.

1 participant